From: Walter Fetter Lages Date: Thu, 16 Mar 2023 19:10:39 +0000 (-0300) Subject: Add support for ros2_control in Gazebo Ignition. X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=f51082f7c7c335ac283423794ce4dd219f1915cd;p=ufrgs_wam.git Add support for ros2_control in Gazebo Ignition. --- diff --git a/bhand_bringup/launch/ignition.launch.xml b/bhand_bringup/launch/ignition.launch.xml new file mode 100644 index 0000000..a88bf87 --- /dev/null +++ b/bhand_bringup/launch/ignition.launch.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/bhand_description/launch/bhand.launch.xml b/bhand_description/launch/bhand.launch.xml index 631d77d..91c96aa 100644 --- a/bhand_description/launch/bhand.launch.xml +++ b/bhand_description/launch/bhand.launch.xml @@ -1,9 +1,10 @@ + - + diff --git a/bhand_description/launch/ignition.launch.xml b/bhand_description/launch/ignition.launch.xml index 1776afb..3621bd1 100644 --- a/bhand_description/launch/ignition.launch.xml +++ b/bhand_description/launch/ignition.launch.xml @@ -1,7 +1,7 @@ - - + + - - - + + + - - - + + + - + - + - - + + - - - gazebo_ros2_control/GazeboSystem - - - - - 0.0 - ${140 * M_PI /180} - - - - - - bhand_finger1_joint_2 - ${48 / 140} - - - - - - - 0,9 - ${140 * M_PI /180} - - - - - - bhand_finger2_joint_2 - ${48 / 140} - - - - - - - 0.0 - ${140 * M_PI /180} - - - - - - bhand_finger3_joint_2 - ${48 / 140} - - - - - - - 0.0 - ${M_PI} - - - - - - bhand_spread - -1.0 - - - - - + + - - - robot_description - robot_state_publisher - $(find bhand_description)/config/controller_manager.yaml - - + diff --git a/bhand_description/xacro/gazebo.urdf.xacro b/bhand_description/xacro/gazebo.urdf.xacro new file mode 100644 index 0000000..8696a29 --- /dev/null +++ b/bhand_description/xacro/gazebo.urdf.xacro @@ -0,0 +1,27 @@ + + + + + + + + + + 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/ros2_control.urdf.xacro b/bhand_description/xacro/ros2_control.urdf.xacro new file mode 100644 index 0000000..a1b52cc --- /dev/null +++ b/bhand_description/xacro/ros2_control.urdf.xacro @@ -0,0 +1,78 @@ + + + + + + + + gazebo_ros2_control/GazeboSystem + + + + + + ign_ros2_control/IgnitionSystem + + + + + + 0.0 + ${140 * M_PI /180} + + + + + + bhand_finger1_joint_2 + ${48 / 140} + + + + + + + 0,9 + ${140 * M_PI /180} + + + + + + bhand_finger2_joint_2 + ${48 / 140} + + + + + + + 0.0 + ${140 * M_PI /180} + + + + + + bhand_finger3_joint_2 + ${48 / 140} + + + + + + + 0.0 + ${M_PI} + + + + + + bhand_spread + -1.0 + + + + + diff --git a/wam_bringup/config/computed_torque_controller.yaml b/wam_bringup/config/computed_torque_controller.yaml index 0575b87..422fbb3 100644 --- a/wam_bringup/config/computed_torque_controller.yaml +++ b/wam_bringup/config/computed_torque_controller.yaml @@ -1,4 +1,4 @@ -/computed_torque_controller: +computed_torque_controller: ros__parameters: joints: - wam_joint_1 diff --git a/wam_bringup/config/pid_independent_joint_controller.yaml b/wam_bringup/config/pid_independent_joint_controller.yaml index a188c75..f143aab 100644 --- a/wam_bringup/config/pid_independent_joint_controller.yaml +++ b/wam_bringup/config/pid_independent_joint_controller.yaml @@ -1,4 +1,4 @@ -/pid_independent_joint_controller: +pid_independent_joint_controller: ros__parameters: joints: - wam_joint_1 diff --git a/wam_bringup/config/pid_plus_gravity_controller.yaml b/wam_bringup/config/pid_plus_gravity_controller.yaml index a10c775..bad0c11 100644 --- a/wam_bringup/config/pid_plus_gravity_controller.yaml +++ b/wam_bringup/config/pid_plus_gravity_controller.yaml @@ -1,4 +1,4 @@ -/pid_plus_gravity_controller: +pid_plus_gravity_controller: ros__parameters: joints: - wam_joint_1 diff --git a/wam_bringup/launch/ignition.launch.xml b/wam_bringup/launch/ignition.launch.xml new file mode 100644 index 0000000..b0dbf9d --- /dev/null +++ b/wam_bringup/launch/ignition.launch.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wam_description/launch/ignition.launch.xml b/wam_description/launch/ignition.launch.xml index 77ab329..a59e2b9 100644 --- a/wam_description/launch/ignition.launch.xml +++ b/wam_description/launch/ignition.launch.xml @@ -1,7 +1,7 @@ + + + + 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/ros2_control.urdf.xacro b/wam_description/xacro/ros2_control.urdf.xacro new file mode 100644 index 0000000..418100d --- /dev/null +++ b/wam_description/xacro/ros2_control.urdf.xacro @@ -0,0 +1,88 @@ + + + + + + + + gazebo_ros2_control/GazeboSystem + + + + + + ign_ros2_control/IgnitionSystem + + + + + + ${-1.8*42.00} + ${1.8*42.00} + + + + + + + + + ${-1.8*28.25} + ${1.8*28.25} + + + + + + + + + ${-1.8*28.25} + ${1.8*28.25} + + + + + + + + + ${-1.6*18.00} + ${1.6*18.00} + + + + + + + + + ${-0.6*9.48} + ${0.6*9.48} + + + + + + + + + ${-0.6*9.48} + ${0.6*9.48} + + + + + + + + + ${-0.613*14.93} + ${0.613*14.93} + + + + + + + diff --git a/wam_description/xacro/wam.urdf.xacro b/wam_description/xacro/wam.urdf.xacro index 6730364..fb4490e 100644 --- a/wam_description/xacro/wam.urdf.xacro +++ b/wam_description/xacro/wam.urdf.xacro @@ -29,90 +29,9 @@ - - - gazebo_ros2_control/GazeboSystem - - - - - ${-1.8*42.00} - ${1.8*42.00} - - - - - - - - - ${-1.8*28.25} - ${1.8*28.25} - - - - - - - - - ${-1.8*28.25} - ${1.8*28.25} - - - - - - - - - ${-1.6*18.00} - ${1.6*18.00} - - - - - - - - - ${-0.6*9.48} - ${0.6*9.48} - - - - - - - - - ${-0.6*9.48} - ${0.6*9.48} - - - - - - - - - ${-0.613*14.93} - ${0.613*14.93} - - - - - - + + - - - robot_description - robot_state_publisher - $(find wam_description)/config/controller_manager.yaml - - -