I want to change turtlebot3 burger's '/scan' topic
Now I'm using a cartographer, the '/scan' topic is published when turtlebot3 burger is connected remotely.
I'd like to change this to 'robot_1/scan'.
I also tried '
This process was possible with namespace designation by starting with publishing '/scan' with another LiDAR. But it doesn't work as a turtlebot.
What kind of ways are there? Thank you in advance.
<group ns = "$(arg second_tb3)">
<remap from="/scan" to="/robot2_scan"/>
<param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model_tb).urdf.xacro" />
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher_2" output="screen">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" value="$(arg second_tb3)" />
</node>
<!-- TurtleBot3 -->
<include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
<arg name="model" value="$(arg model_tb)" />
</include>
<!-- SLAM: Gmapping, Cartographer, Hector, Karto, Frontier_exploration, RTAB-Map -->
<include file="$(find turtlebot3_slam)/launch/turtlebot3_$(arg slam_methods).launch">
<arg name="model" value="$(arg model_tb)"/>
<arg name="configuration_basename" value="$(arg configuration_basename)"/>
</include>
</group>
In the picture below, I'm trying to make '/scan' and 'robot_2/scan' equal.
Asked by leejaewon on 2022-09-29 10:04:49 UTC
Answers
I think your remap tag is backwards, try
<remap from="/robot_2/scan" to="/scan"/>
Asked by JustinBlack02 on 2022-09-29 22:33:20 UTC
Comments
Thank you for your answer. but it doesn't work
Asked by leejaewon on 2022-09-29 22:50:55 UTC
Comments
Could you please update your post to include the launch file with the remap and the namespace? It would give us a better idea of what might be going wrong.
Asked by Ronoman on 2022-09-29 11:14:33 UTC
Thank you. I modified it.
Asked by leejaewon on 2022-09-29 21:21:28 UTC
Is this ROS1 or ROS2? Have you tried putting the remapping inside the node tag?
Asked by JustinBlack02 on 2022-09-29 21:46:07 UTC
It is ROS1, noetic. which node do you say??
Asked by leejaewon on 2022-09-29 22:18:10 UTC