Skip to content

Commit

Permalink
Add the unstamper node, remap the republished cmd_vel topic
Browse files Browse the repository at this point in the history
  • Loading branch information
civerachb-cpr committed Sep 11, 2024
1 parent 81d67bd commit 83c0d2c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 15 additions & 1 deletion turtlebot4_bringup/launch/robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@


def generate_launch_description():
republisher_ns = '_do_not_use'

pkg_turtlebot4_bringup = get_package_share_directory('turtlebot4_bringup')
create3_republisher = get_package_share_directory('create3_republisher')
Expand Down Expand Up @@ -79,8 +80,20 @@ def generate_launch_description():
package='create3_republisher',
executable='create3_republisher',
parameters=[create3_repub_param_yaml_file,
{'robot_namespace': '_do_not_use'}],
{'robot_namespace': republisher_ns}],
output='screen',
remappings=[
([republisher_ns, 'cmd_vel'], [republisher_ns, 'cmd_vel_unstamped'])
]
)
unstamper_node = Node(
package='twist_stamper',
executable='twist_unstamper',
name='twist_unstamper',
remappings=[
('cmd_vel_in', [republisher_ns, 'cmd_vel']),
('cmd_vel_out', [republisher_ns, 'cmd_vel_unstamped'])
]
)

ld = LaunchDescription(ARGUMENTS)
Expand All @@ -89,4 +102,5 @@ def generate_launch_description():
ld.add_action(turtlebot4_node)
ld.add_action(turtlebot4_base_node)
ld.add_action(create3_republisher_node)
ld.add_action(unstamper_node)
return ld
1 change: 1 addition & 0 deletions turtlebot4_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<depend version_gte="2.6.1">teleop_twist_joy</depend> <!-- TwistStamped support needed -->
<depend>tf2_ros</depend>
<depend>create3_republisher</depend>
<depend>twist_stamper</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down

0 comments on commit 83c0d2c

Please sign in to comment.