ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

I want to change turtlebot3 burger's '/scan' topic

asked 2022-09-29 10:04:49 -0500

leejaewon gravatar image

updated 2022-09-29 21:33:50 -0500

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 '<remap>' in the launch file, but it didn't work, and I specified namespace, but it was useless.

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.

image description

edit retag flag offensive close merge delete

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.

Ronoman gravatar image Ronoman  ( 2022-09-29 11:14:33 -0500 )edit

Thank you. I modified it.

leejaewon gravatar image leejaewon  ( 2022-09-29 21:21:28 -0500 )edit

Is this ROS1 or ROS2? Have you tried putting the remapping inside the node tag?

JustinBlack02 gravatar image JustinBlack02  ( 2022-09-29 21:46:07 -0500 )edit

It is ROS1, noetic. which node do you say??

leejaewon gravatar image leejaewon  ( 2022-09-29 22:18:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-29 22:33:20 -0500

JustinBlack02 gravatar image

I think your remap tag is backwards, try

<remap from="/robot_2/scan" to="/scan"/>
edit flag offensive delete link more

Comments

Thank you for your answer. but it doesn't work

leejaewon gravatar image leejaewon  ( 2022-09-29 22:50:55 -0500 )edit

Question Tools

Stats

Asked: 2022-09-29 10:04:49 -0500

Seen: 227 times

Last updated: Sep 29 '22