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

Assigning namespaces for topics from Kinect (Turtlebot)

asked 2012-11-24 13:58:15 -0500

Ana gravatar image

updated 2016-10-24 08:59:27 -0500

ngrennan gravatar image

Hi,

I am doing a simulation with 2 Turtlebots in Gazebo (using ROS Fuerte). I used different namespaces (turtle1 and turtle2) for each robot in order to get their respective data. However, I noticed that some of the topics (topics with Kinect info) did not change their names. For instance after using this snippet:

<group ns="turtle2">
  <include file="$(find tortuninja)/launch/turtlebotNodes.launch" >
    <arg  name="model_name" value="turtle2" /> 
    <arg name="x" value = "-2.0" />
  </include>
</group>

Topics like /imu/data would become accordingly /turtle2/imu/data. But for others like /camera/depth/points I would still get /camera/depth/points.

I fixed the problem by editing the file ($find turtlebot_description)/urdf/gazebo.urdf.xacro . I changed the global topic names like /camera/depth/points to local ones camera/depth/points. After doing that I was able to get the corresponding namespace in front (and get info from both Kinects).

My question is: Is this the right approach? Or is there any other way to change the namespace for Kinect-topics in Turtlebot other than editing the gazebo.urdf.xacro file?

Thanks!

Ana

edit retag flag offensive close merge delete

Comments

1

There is another way by remapping the global topic names. However as @joq said, your way is how it should be done.

dornhege gravatar image dornhege  ( 2012-11-26 05:15:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-11-26 05:02:00 -0500

joq gravatar image

That sounds like a good solution to me.

Open a bug ticket for the turtlebot_description package to get it fixed permanently in a future release.

edit flag offensive delete link more

Comments

Done. Thank you very much for the suggestion.

Ana gravatar image Ana  ( 2012-11-26 07:27:06 -0500 )edit

Question Tools

Stats

Asked: 2012-11-24 13:58:15 -0500

Seen: 472 times

Last updated: Nov 26 '12