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

How can I remap enitre roslaunch file?

asked 2015-09-03 08:04:08 -0500

tal_eldar gravatar image

Hello,

I have 2 real turtlebots (for now.. I'll have more in the near future) and I want them to run on one ros-master, since they have identical topics if I launch in one turtlebot the other get it also. for example if I launch turtlebot_bringup minimal.launch in one and afterwards in the other it will shutdown the first and open in the last. since that I've thought to create groups and remap the topics but since all the topics are the same it seems like allot of work.

can I remap entire launch file without remapping every topic one by one?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-09-03 08:13:15 -0500

dornhege gravatar image

You should be able to just export ROS_NAMESPACE to the namespace you want and launch the same file.

It might also be possible to nest the whole roslaunch in one more group, but I'm not sure how well that deals with nesting.

The main thing to look out for is that all nodes/launch parts are written properly to support nesting, i.e., not topics with / when not needed, etc.

edit flag offensive delete link more

Comments

damned, you were faster ;-)

cyborg-x1 gravatar image cyborg-x1  ( 2015-09-03 08:18:24 -0500 )edit
1

For multiple turtlebots he you should probably check out http://wiki.ros.org/turtlebot_concert... (because of the APP stuff and so on ...)

cyborg-x1 gravatar image cyborg-x1  ( 2015-09-03 08:56:51 -0500 )edit

Hi, thanks for the fast response! I'm new in ROS and the tutorials I've encountered so far regarded nodes, can you give me an example? I'm lauching allot of topics with: roslaunch turtlebot_bringup minimal.launch how can remap this argument? and concert is no solution for me (joint computer issues)

tal_eldar gravatar image tal_eldar  ( 2015-09-04 03:55:26 -0500 )edit

I was finally able to test the answer and it is working fine with exporting ROS_NAMESPACE before launching the launch file, is there a way to permanently set the ROS_NAMESPACE?

tal_eldar gravatar image tal_eldar  ( 2015-09-08 07:22:09 -0500 )edit

You could put that into your .bashrc. However setting that permanently is usually unnecessary as then you could also just not set it. It is mostly an advantage if you want to start launches in multiple different namespaces.

dornhege gravatar image dornhege  ( 2015-09-08 08:13:41 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-03 08:04:08 -0500

Seen: 185 times

Last updated: Sep 03 '15