From: Walter Fetter Lages Date: Mon, 16 Dec 2024 01:25:22 +0000 (-0300) Subject: Porto to Jazzy. X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=73fc2a7983d277e1583bc0ecc67aa48c96f04f65;p=ufrgs_wam.git Porto to Jazzy. --- diff --git a/bhand_bringup/config/bhand_controller.yaml b/bhand_bringup/config/bhand_controller.yaml index 17f9608..e1af790 100644 --- a/bhand_bringup/config/bhand_controller.yaml +++ b/bhand_bringup/config/bhand_controller.yaml @@ -1,8 +1,9 @@ bhand_controller: ros__parameters: + type: position_controllers/JointGroupPositionController joints: - bhand_finger1_joint_2 - bhand_finger2_joint_2 - bhand_finger3_joint_2 - bhand_spread - + diff --git a/bhand_bringup/config/joint_state_broadcaster.yaml b/bhand_bringup/config/joint_state_broadcaster.yaml new file mode 100644 index 0000000..29015ca --- /dev/null +++ b/bhand_bringup/config/joint_state_broadcaster.yaml @@ -0,0 +1,3 @@ +joint_state_broadcaster: + ros__parameters: + type: joint_state_broadcaster/JointStateBroadcaster diff --git a/bhand_bringup/launch/bhand_controller.launch.xml b/bhand_bringup/launch/bhand_controller.launch.xml index d76ed96..d317e58 100644 --- a/bhand_bringup/launch/bhand_controller.launch.xml +++ b/bhand_bringup/launch/bhand_controller.launch.xml @@ -1,7 +1,7 @@ - + - - - - - - - - + + - + diff --git a/bhand_description/CMakeLists.txt b/bhand_description/CMakeLists.txt index 48e9fb6..ff97a71 100644 --- a/bhand_description/CMakeLists.txt +++ b/bhand_description/CMakeLists.txt @@ -15,8 +15,6 @@ install(DIRECTORY config launch meshes xacro DESTINATION share/${PROJECT_NAME} ) -ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/${PROJECT_NAME}.dsv.in") - if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) # the following line skips the linter which checks for copyrights diff --git a/bhand_description/config/ros_gz_bridge.yaml b/bhand_description/config/ros_gz_bridge.yaml new file mode 100644 index 0000000..33167fe --- /dev/null +++ b/bhand_description/config/ros_gz_bridge.yaml @@ -0,0 +1,10 @@ +- ros_topic_name: "/clock" + gz_topic_name: "/clock" + ros_type_name: "rosgraph_msgs/msg/Clock" + gz_type_name: "gz.msgs.Clock" +# subscriber_queue: 5 # Default 10 +# publisher_queue: 6 # Default 10 +# lazy: true # Default "false" + direction: GZ_TO_ROS # Default "BIDIRECTIONAL" - Bridge both directions + # "GZ_TO_ROS" - Bridge Ignition topic to ROS + # "ROS_TO_GZ" - Bridge ROS topic to Ignition diff --git a/bhand_description/env-hooks/bhand_description.dsv.in b/bhand_description/env-hooks/bhand_description.dsv.in deleted file mode 100644 index 30a6001..0000000 --- a/bhand_description/env-hooks/bhand_description.dsv.in +++ /dev/null @@ -1,3 +0,0 @@ -prepend-non-duplicate;IGN_GAZEBO_RESOURCE_PATH;share - -set-if-unset;MESA_GL_VERSION_OVERRIDE;3.3 diff --git a/bhand_description/launch/bhand.launch.xml b/bhand_description/launch/bhand.launch.xml index 91c96aa..631d77d 100644 --- a/bhand_description/launch/bhand.launch.xml +++ b/bhand_description/launch/bhand.launch.xml @@ -1,10 +1,9 @@ - - + diff --git a/bhand_description/launch/gazebo.launch.xml b/bhand_description/launch/gazebo.launch.xml index de382c1..280f8e0 100644 --- a/bhand_description/launch/gazebo.launch.xml +++ b/bhand_description/launch/gazebo.launch.xml @@ -1,21 +1,50 @@ + + - + - - - + + + + + + + + - - - + - + + + + > + + diff --git a/bhand_description/launch/ignition.launch.xml b/bhand_description/launch/ignition.launch.xml deleted file mode 100644 index 3621bd1..0000000 --- a/bhand_description/launch/ignition.launch.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bhand_description/xacro/bhand.urdf.xacro b/bhand_description/xacro/bhand.urdf.xacro index 5b40b37..6cf0128 100644 --- a/bhand_description/xacro/bhand.urdf.xacro +++ b/bhand_description/xacro/bhand.urdf.xacro @@ -1,10 +1,7 @@ - - - @@ -26,13 +23,13 @@ Finger spread frame --> - + - - + + @@ -46,13 +43,13 @@ Finger spread frame --> - + - - + + @@ -69,14 +66,14 @@ Is this included in base? Fix this... --> - + - + @@ -104,7 +101,7 @@ - + diff --git a/bhand_description/xacro/bhand_base.urdf.xacro b/bhand_description/xacro/bhand_base.urdf.xacro index fd31c23..d084aa1 100644 --- a/bhand_description/xacro/bhand_base.urdf.xacro +++ b/bhand_description/xacro/bhand_base.urdf.xacro @@ -1,8 +1,6 @@ - - @@ -18,7 +16,7 @@ - + @@ -27,7 +25,7 @@ - + diff --git a/bhand_description/xacro/bhand_link1.urdf.xacro b/bhand_description/xacro/bhand_link1.urdf.xacro index 76d0a7d..67f3b8b 100644 --- a/bhand_description/xacro/bhand_link1.urdf.xacro +++ b/bhand_description/xacro/bhand_link1.urdf.xacro @@ -7,7 +7,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/bhand_description/xacro/bhand_link2.urdf.xacro b/bhand_description/xacro/bhand_link2.urdf.xacro index f0dea95..63e4c8d 100644 --- a/bhand_description/xacro/bhand_link2.urdf.xacro +++ b/bhand_description/xacro/bhand_link2.urdf.xacro @@ -42,11 +42,11 @@ - + - + diff --git a/bhand_description/xacro/bhand_link3.urdf.xacro b/bhand_description/xacro/bhand_link3.urdf.xacro index d81cdd2..2fe68a0 100644 --- a/bhand_description/xacro/bhand_link3.urdf.xacro +++ b/bhand_description/xacro/bhand_link3.urdf.xacro @@ -40,15 +40,15 @@ - + - + - - + + diff --git a/bhand_description/xacro/gazebo.urdf.xacro b/bhand_description/xacro/gazebo.urdf.xacro deleted file mode 100644 index 8696a29..0000000 --- a/bhand_description/xacro/gazebo.urdf.xacro +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - robot_description - robot_state_publisher - $(find bhand_description)/config/controller_manager.yaml - - - - - - - - - robot_description - robot_state_publisher - $(find bhand_description)/config/controller_manager.yaml - - - - diff --git a/bhand_description/xacro/gz_ros2_control.urdf.xacro b/bhand_description/xacro/gz_ros2_control.urdf.xacro new file mode 100644 index 0000000..9457b51 --- /dev/null +++ b/bhand_description/xacro/gz_ros2_control.urdf.xacro @@ -0,0 +1,9 @@ + + + + + + $(find bhand_description)/config/controller_manager.yaml + + + diff --git a/bhand_description/xacro/ros2_control.urdf.xacro b/bhand_description/xacro/ros2_control.urdf.xacro index a1b52cc..5d4fa71 100644 --- a/bhand_description/xacro/ros2_control.urdf.xacro +++ b/bhand_description/xacro/ros2_control.urdf.xacro @@ -2,76 +2,71 @@ - - - - gazebo_ros2_control/GazeboSystem - - - - - ign_ros2_control/IgnitionSystem + gz_ros2_control/GazeboSimSystem - 0.0 - ${140 * M_PI /180} + ${140 * pi /180} - + + ${140 * pi /180} + bhand_finger1_joint_2 ${48 / 140} - - 0,9 - ${140 * M_PI /180} + 0.0 + ${140 * pi /180} - + + ${140 * pi /180} + bhand_finger2_joint_2 ${48 / 140} - 0.0 - ${140 * M_PI /180} + ${140 * pi /180} - + + ${140 * pi /180} + bhand_finger3_joint_2 ${48 / 140} - 0.0 - ${M_PI} + ${pi} - + + ${pi} + bhand_spread -1.0 - diff --git a/wam_bringup/CMakeLists.txt b/wam_bringup/CMakeLists.txt index 607ac0a..61b3450 100644 --- a/wam_bringup/CMakeLists.txt +++ b/wam_bringup/CMakeLists.txt @@ -16,7 +16,6 @@ install(DIRECTORY config launch ) install(PROGRAMS - scripts/set_home.sh scripts/step.sh scripts/step_home.sh scripts/step_zero.sh diff --git a/wam_bringup/config/computed_torque_controller.yaml b/wam_bringup/config/computed_torque_controller.yaml index 422fbb3..849a413 100644 --- a/wam_bringup/config/computed_torque_controller.yaml +++ b/wam_bringup/config/computed_torque_controller.yaml @@ -1,5 +1,6 @@ computed_torque_controller: ros__parameters: + type: effort_controllers/ComputedTorqueController joints: - wam_joint_1 - wam_joint_2 diff --git a/wam_bringup/config/joint_state_broadcaster.yaml b/wam_bringup/config/joint_state_broadcaster.yaml new file mode 100644 index 0000000..29015ca --- /dev/null +++ b/wam_bringup/config/joint_state_broadcaster.yaml @@ -0,0 +1,3 @@ +joint_state_broadcaster: + ros__parameters: + type: joint_state_broadcaster/JointStateBroadcaster diff --git a/wam_bringup/config/pid_independent_joint_controller.yaml b/wam_bringup/config/pid_independent_joint_controller.yaml index f143aab..9d8e010 100644 --- a/wam_bringup/config/pid_independent_joint_controller.yaml +++ b/wam_bringup/config/pid_independent_joint_controller.yaml @@ -1,6 +1,7 @@ pid_independent_joint_controller: ros__parameters: - joints: + type: pid_controller/PidController + dof_names: - wam_joint_1 - wam_joint_2 - wam_joint_3 @@ -8,11 +9,14 @@ pid_independent_joint_controller: - wam_joint_5 - wam_joint_6 - wam_joint_7 + command_interface: effort + reference_and_state_interfaces: ["position"] + gains: # PID parameters from /etc/barrett/wam7w.conf - wam_joint_1/pid: {p: 900.0, i: 2.5, d: 10.0, i_clamp_min: -25.0, i_clamp_max: 25.0} - wam_joint_2/pid: {p: 2500.0, i: 5.0, d: 20.0, i_clamp_min: -20.0, i_clamp_max: 20.0} - wam_joint_3/pid: {p: 600.0, i: 2.0, d: 5.0, i_clamp_min: -15.0, i_clamp_max: 15.0} - wam_joint_4/pid: {p: 500.0, i: 0.5, d: 2.0, i_clamp_min: -15.0, i_clamp_max: 15.0} - wam_joint_5/pid: {p: 50.0, i: 0.5, d: 0.5, i_clamp_min: -5.0, i_clamp_max: 5.0} - wam_joint_6/pid: {p: 50.0, i: 0.5, d: 0.5, i_clamp_min: -5.0, i_clamp_max: 5.0} - wam_joint_7/pid: {p: 8.0, i: 0.1, d: 0.05, i_clamp_min: -5.0, i_clamp_max: 5.0} + wam_joint_1: {p: 900.0, i: 2.5, d: 10.0, i_clamp_min: -25.0, i_clamp_max: 25.0, antiwindup: false} + wam_joint_2: {p: 2500.0, i: 5.0, d: 20.0, i_clamp_min: -20.0, i_clamp_max: 20.0, antiwindup: false} + wam_joint_3: {p: 600.0, i: 2.0, d: 5.0, i_clamp_min: -15.0, i_clamp_max: 15.0, antiwindup: false} + wam_joint_4: {p: 500.0, i: 0.5, d: 2.0, i_clamp_min: -15.0, i_clamp_max: 15.0, antiwindup: false} + wam_joint_5: {p: 50.0, i: 0.5, d: 0.5, i_clamp_min: -5.0, i_clamp_max: 5.0, antiwindup: false} + wam_joint_6: {p: 50.0, i: 0.5, d: 0.5, i_clamp_min: -5.0, i_clamp_max: 5.0, antiwindup: false} + wam_joint_7: {p: 8.0, i: 0.1, d: 0.05, i_clamp_min: -5.0, i_clamp_max: 5.0, antiwindup: false} diff --git a/wam_bringup/config/pid_plus_gravity_controller.yaml b/wam_bringup/config/pid_plus_gravity_controller.yaml index bad0c11..5ceafd5 100644 --- a/wam_bringup/config/pid_plus_gravity_controller.yaml +++ b/wam_bringup/config/pid_plus_gravity_controller.yaml @@ -1,5 +1,6 @@ pid_plus_gravity_controller: ros__parameters: + type: effort_controllers/PidPlusGravityController joints: - wam_joint_1 - wam_joint_2 diff --git a/wam_bringup/launch/computed_torque_controller.launch.xml b/wam_bringup/launch/computed_torque_controller.launch.xml index 90b1d1c..415888e 100644 --- a/wam_bringup/launch/computed_torque_controller.launch.xml +++ b/wam_bringup/launch/computed_torque_controller.launch.xml @@ -1,7 +1,7 @@ - + - - - - - - - - - - + @@ -56,6 +47,6 @@ + args="-p $(var bhand_config) bhand_controller"/> diff --git a/wam_bringup/launch/pid_independent_joint_controller.launch.xml b/wam_bringup/launch/pid_independent_joint_controller.launch.xml index 1cef4ee..52e7dcf 100644 --- a/wam_bringup/launch/pid_independent_joint_controller.launch.xml +++ b/wam_bringup/launch/pid_independent_joint_controller.launch.xml @@ -1,7 +1,7 @@ + - + - - - + + + + + + + + - - - + @@ -19,5 +43,10 @@ - + + + + > + + diff --git a/wam_description/launch/ignition.launch.xml b/wam_description/launch/ignition.launch.xml deleted file mode 100644 index a59e2b9..0000000 --- a/wam_description/launch/ignition.launch.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wam_description/launch/wam.launch.xml b/wam_description/launch/wam.launch.xml index 7d1bb12..7524fa6 100644 --- a/wam_description/launch/wam.launch.xml +++ b/wam_description/launch/wam.launch.xml @@ -3,10 +3,9 @@ - - + diff --git a/wam_description/scripts/set_home.sh b/wam_description/scripts/set_home.sh deleted file mode 100755 index d14b55d..0000000 --- a/wam_description/scripts/set_home.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -ros2 service call /gazebo/set_model_configuration wam joint \ -"['wam_joint_1','wam_joint_2','wam_joint_3','wam_joint_4',' \ -wam_joint_5','wam_joint_6','wam_joint_7']" \ -"[0.0,-2.0,0.0,3.1,0.0,0.0,0.0]" diff --git a/wam_description/scripts/set_zero.sh b/wam_description/scripts/set_zero.sh deleted file mode 100755 index 7c9cb59..0000000 --- a/wam_description/scripts/set_zero.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -ros2 service call /gazebo/set_model_configuration wam joint \ -"['wam_joint_1','wam_joint_2','wam_joint_3','wam_joint_4', \ -'wam_joint_5','wam_joint_6','wam_joint_7']" \ -"[0.0,0.0,0.0,0.0,0.0,0.0,0.0]" diff --git a/wam_description/xacro/gazebo.urdf.xacro b/wam_description/xacro/gazebo.urdf.xacro deleted file mode 100644 index 977ae84..0000000 --- a/wam_description/xacro/gazebo.urdf.xacro +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - robot_description - robot_state_publisher - $(find wam_description)/config/controller_manager.yaml - - - - - - - - - robot_description - robot_state_publisher - $(find wam_description)/config/controller_manager.yaml - - - - diff --git a/wam_description/xacro/gz_ros2_control.urdf.xacro b/wam_description/xacro/gz_ros2_control.urdf.xacro new file mode 100644 index 0000000..e135ac7 --- /dev/null +++ b/wam_description/xacro/gz_ros2_control.urdf.xacro @@ -0,0 +1,9 @@ + + + + + + $(find wam_description)/config/controller_manager.yaml + + + diff --git a/wam_description/xacro/ros2_control.urdf.xacro b/wam_description/xacro/ros2_control.urdf.xacro index 418100d..80bb6cb 100644 --- a/wam_description/xacro/ros2_control.urdf.xacro +++ b/wam_description/xacro/ros2_control.urdf.xacro @@ -1,26 +1,19 @@ - - - - - gazebo_ros2_control/GazeboSystem - - - - - - ign_ros2_control/IgnitionSystem - - + + + gz_ros2_control/GazeboSimSystem + ${-1.8*42.00} ${1.8*42.00} - + + 0.0 + @@ -30,7 +23,9 @@ ${-1.8*28.25} ${1.8*28.25} - + + -2.0 + @@ -40,7 +35,9 @@ ${-1.8*28.25} ${1.8*28.25} - + + 0.0 + @@ -50,7 +47,9 @@ ${-1.6*18.00} ${1.6*18.00} - + + 3.1 + @@ -60,7 +59,9 @@ ${-0.6*9.48} ${0.6*9.48} - + + 0.0 + @@ -70,7 +71,9 @@ ${-0.6*9.48} ${0.6*9.48} - + + 0.0 + @@ -80,7 +83,9 @@ ${-0.613*14.93} ${0.613*14.93} - + + 0.0 + diff --git a/wam_description/xacro/table.urdf.xacro b/wam_description/xacro/table.urdf.xacro index 2db1b74..3da0c65 100644 --- a/wam_description/xacro/table.urdf.xacro +++ b/wam_description/xacro/table.urdf.xacro @@ -12,9 +12,6 @@ - - - diff --git a/wam_description/xacro/wam.urdf.xacro b/wam_description/xacro/wam.urdf.xacro index fb4490e..c08050f 100644 --- a/wam_description/xacro/wam.urdf.xacro +++ b/wam_description/xacro/wam.urdf.xacro @@ -6,8 +6,6 @@ - - @@ -30,7 +28,7 @@ - + @@ -69,8 +67,8 @@ - - + + diff --git a/wam_description/xacro/wam_base.urdf.xacro b/wam_description/xacro/wam_base.urdf.xacro index 6de0675..275637e 100644 --- a/wam_description/xacro/wam_base.urdf.xacro +++ b/wam_description/xacro/wam_base.urdf.xacro @@ -2,8 +2,6 @@ - - @@ -26,7 +24,7 @@ - + diff --git a/wam_description/xacro/wam_j1.urdf.xacro b/wam_description/xacro/wam_j1.urdf.xacro index a73bca6..0cb85eb 100644 --- a/wam_description/xacro/wam_j1.urdf.xacro +++ b/wam_description/xacro/wam_j1.urdf.xacro @@ -2,8 +2,6 @@ - - @@ -18,7 +16,7 @@ - + @@ -27,7 +25,7 @@ - + @@ -45,7 +43,7 @@ - + - + diff --git a/wam_description/xacro/wam_table.urdf.xacro b/wam_description/xacro/wam_table.urdf.xacro index b55d89f..36b966a 100644 --- a/wam_description/xacro/wam_table.urdf.xacro +++ b/wam_description/xacro/wam_table.urdf.xacro @@ -2,8 +2,6 @@ - -