1
$\begingroup$

I am running turtlebot3_navigation and want to make it subscribe to my own waypoints topic /my_waypoints rather than RVIZ's Set 2D Goal topic /move_base_simple/goal. What I actually want to do is roslaunch turtlebot3_gazebo turtlebot3_world.launch /move_base_simple/goal:=/my_waypoints. Command-line remapping of topics isn't working in this case, neither the remapping in launch file /opt/ros/kinetic/share/turtlebot3_navigation/launch/move_base.launch.

enter image description here

Can anyone please help me remapping the topics?

$\endgroup$
0
$\begingroup$

You cannot rename topics in your node and use them from the command line. If you want to use command line, you have to define them as args before the node. In your case, under arguments, define:

<arg name="goal_topic" default="/move_base_simple/goal" doc="goal topic for turtlebot3"/>

and in your remap,

<param name="/move_base_simple/goal" value="$(arg goal_topic)"/>

Then you should be able to use it over he command line as:

roslaunch turtlebot3_gazebo turtlebot3_world.launch goal_topic:=/my_waypoints
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.