From bee690e2ab480cad8fbfe0053a9416e2e53157d8 Mon Sep 17 00:00:00 2001 From: Bartek Date: Mon, 16 Sep 2024 20:19:47 +0200 Subject: [PATCH] Cleaned up code, added new macros and properties --- .../actuator/actuator_macros.urdf.xacro | 16 ------- .../joints/joint_macros.urdf.xacro | 9 ++++ .../joints/joint_properties.urdf.xacro | 20 +++++++++ .../feet/feet.urdf.xacro | 0 .../hip/hip.urdf.xacro | 0 .../shank/shank.urdf.xacro | 0 .../thigh/thigh.urdf.xacro | 0 .../trunk/trunk.urdf.xacro | 0 .../description/meldog_core.urdf.xacro | 45 ++++++++++--------- .../joint_hardware_macros.urdf.xacro} | 14 +++--- .../joint_hardware_properties.urdf.xacro | 14 ++++++ .../ros2_control/ros2_control_core.urdf.xacro | 31 +++++++++++++ .../ros2_control_gazebo.urdf.xacro | 27 ++--------- .../transmission_macros.urdf.xacro | 20 ++++----- .../joint_trajectory_example.txt | 11 +++++ 15 files changed, 127 insertions(+), 80 deletions(-) delete mode 100644 src/meldog_simple_description/description/actuator/actuator_macros.urdf.xacro create mode 100644 src/meldog_simple_description/description/joints/joint_macros.urdf.xacro create mode 100644 src/meldog_simple_description/description/joints/joint_properties.urdf.xacro rename src/meldog_simple_description/description/{meldog_links => links}/feet/feet.urdf.xacro (100%) rename src/meldog_simple_description/description/{meldog_links => links}/hip/hip.urdf.xacro (100%) rename src/meldog_simple_description/description/{meldog_links => links}/shank/shank.urdf.xacro (100%) rename src/meldog_simple_description/description/{meldog_links => links}/thigh/thigh.urdf.xacro (100%) rename src/meldog_simple_description/description/{meldog_links => links}/trunk/trunk.urdf.xacro (100%) rename src/meldog_simple_description/description/ros2_control/{ros2_control_joint_macros.urdf.xacro => joints_hardware/joint_hardware_macros.urdf.xacro} (54%) create mode 100644 src/meldog_simple_description/description/ros2_control/joints_hardware/joint_hardware_properties.urdf.xacro create mode 100644 src/meldog_simple_description/description/ros2_control/ros2_control_core.urdf.xacro rename src/meldog_simple_description/description/ros2_control/{ => transmission}/transmission_macros.urdf.xacro (71%) diff --git a/src/meldog_simple_description/description/actuator/actuator_macros.urdf.xacro b/src/meldog_simple_description/description/actuator/actuator_macros.urdf.xacro deleted file mode 100644 index 0000542..0000000 --- a/src/meldog_simple_description/description/actuator/actuator_macros.urdf.xacro +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/meldog_simple_description/description/joints/joint_macros.urdf.xacro b/src/meldog_simple_description/description/joints/joint_macros.urdf.xacro new file mode 100644 index 0000000..caed7cf --- /dev/null +++ b/src/meldog_simple_description/description/joints/joint_macros.urdf.xacro @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/meldog_simple_description/description/joints/joint_properties.urdf.xacro b/src/meldog_simple_description/description/joints/joint_properties.urdf.xacro new file mode 100644 index 0000000..8320b56 --- /dev/null +++ b/src/meldog_simple_description/description/joints/joint_properties.urdf.xacro @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/meldog_simple_description/description/meldog_links/feet/feet.urdf.xacro b/src/meldog_simple_description/description/links/feet/feet.urdf.xacro similarity index 100% rename from src/meldog_simple_description/description/meldog_links/feet/feet.urdf.xacro rename to src/meldog_simple_description/description/links/feet/feet.urdf.xacro diff --git a/src/meldog_simple_description/description/meldog_links/hip/hip.urdf.xacro b/src/meldog_simple_description/description/links/hip/hip.urdf.xacro similarity index 100% rename from src/meldog_simple_description/description/meldog_links/hip/hip.urdf.xacro rename to src/meldog_simple_description/description/links/hip/hip.urdf.xacro diff --git a/src/meldog_simple_description/description/meldog_links/shank/shank.urdf.xacro b/src/meldog_simple_description/description/links/shank/shank.urdf.xacro similarity index 100% rename from src/meldog_simple_description/description/meldog_links/shank/shank.urdf.xacro rename to src/meldog_simple_description/description/links/shank/shank.urdf.xacro diff --git a/src/meldog_simple_description/description/meldog_links/thigh/thigh.urdf.xacro b/src/meldog_simple_description/description/links/thigh/thigh.urdf.xacro similarity index 100% rename from src/meldog_simple_description/description/meldog_links/thigh/thigh.urdf.xacro rename to src/meldog_simple_description/description/links/thigh/thigh.urdf.xacro diff --git a/src/meldog_simple_description/description/meldog_links/trunk/trunk.urdf.xacro b/src/meldog_simple_description/description/links/trunk/trunk.urdf.xacro similarity index 100% rename from src/meldog_simple_description/description/meldog_links/trunk/trunk.urdf.xacro rename to src/meldog_simple_description/description/links/trunk/trunk.urdf.xacro diff --git a/src/meldog_simple_description/description/meldog_core.urdf.xacro b/src/meldog_simple_description/description/meldog_core.urdf.xacro index 5bee428..b33e208 100644 --- a/src/meldog_simple_description/description/meldog_core.urdf.xacro +++ b/src/meldog_simple_description/description/meldog_core.urdf.xacro @@ -4,25 +4,26 @@ - - + + + - + - + - + @@ -30,7 +31,7 @@ - + @@ -38,19 +39,19 @@ - + - + + - - + @@ -60,7 +61,7 @@ - + @@ -69,7 +70,7 @@ - + @@ -78,7 +79,7 @@ - + @@ -87,7 +88,7 @@ - + @@ -97,7 +98,7 @@ - + @@ -106,7 +107,7 @@ - + @@ -115,7 +116,7 @@ - + @@ -124,7 +125,7 @@ - + @@ -134,7 +135,7 @@ - + @@ -143,7 +144,7 @@ - + @@ -152,7 +153,7 @@ - + @@ -161,7 +162,7 @@ - + diff --git a/src/meldog_simple_description/description/ros2_control/ros2_control_joint_macros.urdf.xacro b/src/meldog_simple_description/description/ros2_control/joints_hardware/joint_hardware_macros.urdf.xacro similarity index 54% rename from src/meldog_simple_description/description/ros2_control/ros2_control_joint_macros.urdf.xacro rename to src/meldog_simple_description/description/ros2_control/joints_hardware/joint_hardware_macros.urdf.xacro index 734c090..3c2d1d9 100644 --- a/src/meldog_simple_description/description/ros2_control/ros2_control_joint_macros.urdf.xacro +++ b/src/meldog_simple_description/description/ros2_control/joints_hardware/joint_hardware_macros.urdf.xacro @@ -1,21 +1,19 @@ - + - - - + ${lower} ${upper} - -${actuator_max_velocity} - ${actuator_max_velocity} + -${motor_max_velocity} + ${motor_max_velocity} - -${actuator_max_torque} - ${actuator_max_torque} + -${motor_max_torque} + ${motor_max_torque} diff --git a/src/meldog_simple_description/description/ros2_control/joints_hardware/joint_hardware_properties.urdf.xacro b/src/meldog_simple_description/description/ros2_control/joints_hardware/joint_hardware_properties.urdf.xacro new file mode 100644 index 0000000..05affec --- /dev/null +++ b/src/meldog_simple_description/description/ros2_control/joints_hardware/joint_hardware_properties.urdf.xacro @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/meldog_simple_description/description/ros2_control/ros2_control_core.urdf.xacro b/src/meldog_simple_description/description/ros2_control/ros2_control_core.urdf.xacro new file mode 100644 index 0000000..b5126c8 --- /dev/null +++ b/src/meldog_simple_description/description/ros2_control/ros2_control_core.urdf.xacro @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/meldog_simple_description/description/ros2_control/ros2_control_gazebo.urdf.xacro b/src/meldog_simple_description/description/ros2_control/ros2_control_gazebo.urdf.xacro index 1cfc992..5507615 100644 --- a/src/meldog_simple_description/description/ros2_control/ros2_control_gazebo.urdf.xacro +++ b/src/meldog_simple_description/description/ros2_control/ros2_control_gazebo.urdf.xacro @@ -1,35 +1,14 @@ - + ign_ros2_control/IgnitionSystem - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/src/meldog_simple_description/description/ros2_control/transmission_macros.urdf.xacro b/src/meldog_simple_description/description/ros2_control/transmission/transmission_macros.urdf.xacro similarity index 71% rename from src/meldog_simple_description/description/ros2_control/transmission_macros.urdf.xacro rename to src/meldog_simple_description/description/ros2_control/transmission/transmission_macros.urdf.xacro index 8ffc223..7505125 100644 --- a/src/meldog_simple_description/description/ros2_control/transmission_macros.urdf.xacro +++ b/src/meldog_simple_description/description/ros2_control/transmission/transmission_macros.urdf.xacro @@ -36,16 +36,16 @@ - - - - - + + + + + - - - - - + + + + + \ No newline at end of file diff --git a/src/meldog_simple_description/simple_commands/joint_trajectory_example.txt b/src/meldog_simple_description/simple_commands/joint_trajectory_example.txt index f66b9e6..1a3431d 100644 --- a/src/meldog_simple_description/simple_commands/joint_trajectory_example.txt +++ b/src/meldog_simple_description/simple_commands/joint_trajectory_example.txt @@ -22,3 +22,14 @@ PRZYSIAD: { positions: [0.0, 0.0, 0.0, 0.0, -0.78539, -0.78539, -0.78539, -0.78539, 1.5707, 1.5707, 1.5707, 1.5707], time_from_start: { sec: 9 } } ] } }" + + WYPROSTOWANIE: + + ros2 action send_goal /joint_trajectory_controller/follow_joint_trajectory control_msgs/action/FollowJointTrajectory -f "{ + trajectory: { + joint_names: ['FLH_joint', 'FRH_joint', 'BLH_joint', 'BRH_joint', 'FLT_joint', 'FRT_joint', 'BLT_joint', 'BRT_joint', 'FLS_joint', 'FRS_joint', 'BLS_joint', 'BRS_joint'], + points: [ + { positions: [0.0, 0.0, 0.0, 0.0, -0.78539, -0.78539, -0.78539, -0.78539, 1.5707, 1.5707, 1.5707, 1.5707], time_from_start: { sec: 1 } }, + { positions: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], time_from_start: { sec: 6 } } ] + } + }"