From b99edfd661f5f80109eb86a9eda04fcf40b2954c Mon Sep 17 00:00:00 2001 From: ilithebutterfly Date: Tue, 18 Jun 2024 15:39:31 -0400 Subject: [PATCH 1/2] Cleaned up ros2 control xacro, added macros, fixed cmd_vel for diffdrive --- .../rove_controller_bluetooth.launch.py | 4 +- .../launch/rove_controller_usb.launch.py | 3 + .../urdf/rove.ros2_control.urdf.xacro | 118 +++++------------- src/rove_description/urdf/rove.urdf.xacro | 2 +- 4 files changed, 41 insertions(+), 86 deletions(-) diff --git a/src/rove_bringup/launch/rove_controller_bluetooth.launch.py b/src/rove_bringup/launch/rove_controller_bluetooth.launch.py index 43dc67e..3c4a870 100644 --- a/src/rove_bringup/launch/rove_controller_bluetooth.launch.py +++ b/src/rove_bringup/launch/rove_controller_bluetooth.launch.py @@ -25,7 +25,9 @@ def generate_launch_description(): parameters=[teleop_joy_params_file], remappings=[ ('/joy', '/joy'), - # ('/cmd_vel', '/model/rove/cmd_vel') + # Remap needs to happen here since the diff_drive_controller node + # is started via a spawner, thus remappings do not work on it + ('/cmd_vel', '/diff_drive_controller/cmd_vel_unstamped') ], ), Node( diff --git a/src/rove_bringup/launch/rove_controller_usb.launch.py b/src/rove_bringup/launch/rove_controller_usb.launch.py index 61153ce..9d34d47 100644 --- a/src/rove_bringup/launch/rove_controller_usb.launch.py +++ b/src/rove_bringup/launch/rove_controller_usb.launch.py @@ -25,6 +25,9 @@ def generate_launch_description(): parameters=[teleop_joy_params_file], remappings=[ ('/joy', '/joy'), + # Remap needs to happen here since the diff_drive_controller node + # is started via a spawner, thus remappings do not work on it + ('/cmd_vel', '/diff_drive_controller/cmd_vel_unstamped') ], ), Node( diff --git a/src/rove_description/urdf/rove.ros2_control.urdf.xacro b/src/rove_description/urdf/rove.ros2_control.urdf.xacro index 45461da..a061319 100644 --- a/src/rove_description/urdf/rove.ros2_control.urdf.xacro +++ b/src/rove_description/urdf/rove.ros2_control.urdf.xacro @@ -1,14 +1,33 @@ - + + + ${nodeid} + + + + + + + + + + + + + + + + + - + - + - + @@ -18,91 +37,22 @@ odrive_ros2_control_plugin/ODriveHardwareInterface can0 - - 23 - - - - - - - 24 - - - - - - - - 21 - - - - - - - 22 - - - - - - - - + + + + - - + + + + + - - - \ No newline at end of file diff --git a/src/rove_description/urdf/rove.urdf.xacro b/src/rove_description/urdf/rove.urdf.xacro index 3dae78e..077788b 100644 --- a/src/rove_description/urdf/rove.urdf.xacro +++ b/src/rove_description/urdf/rove.urdf.xacro @@ -42,7 +42,7 @@ - + From b4256e026453a9da2cc5cf1e3763c991886df620 Mon Sep 17 00:00:00 2001 From: ilithebutterfly Date: Tue, 18 Jun 2024 15:54:59 -0400 Subject: [PATCH 2/2] Added comment to indicate how to mock odrives --- src/rove_description/urdf/rove.urdf.xacro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rove_description/urdf/rove.urdf.xacro b/src/rove_description/urdf/rove.urdf.xacro index 077788b..82334f1 100644 --- a/src/rove_description/urdf/rove.urdf.xacro +++ b/src/rove_description/urdf/rove.urdf.xacro @@ -42,6 +42,7 @@ +