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

How to launch master_sync_fkie from the launch file?

asked 2019-05-20 09:49:46 -0600

kump gravatar image

The Multimaster FKIE package provides this node master_sync that sets topics to synchronize among multiple ROS masters. When I launch it from the terminal, I use command

rosrun master_sync_fkie master_sync _ignore_nodes:=[/gazebo*,/gazebo_gui*,/panda*]

so I'm passing this list to it. Now if I want to launch it from launch file, I would need to launch the node like this

<node name="my_master_sync_fkie" pkg="master_sync_fkie" type="master_sync" ... />

and then somehow put those list arguments to it. How can I do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-20 10:53:44 -0600

gvdhoorn gravatar image

updated 2019-05-20 10:58:40 -0600

When I launch it from the terminal, I use command

rosrun master_sync_fkie master_sync _ignore_nodes:=[/gazebo*,/gazebo_gui*,/panda*]

ignore_nodes here is a private parameter of master_sync. The ROS wiki for the package master_sync_fkie documents those here. The specific rosrun command line syntax you're using is documented here.

Private parameters can be passed to nodes in .launch files by adding a rosparam or param element as a child of the node element.

For the specific rosrun command line you show, that would look something like this:

<node name="my_master_sync_fkie" pkg="master_sync_fkie" type="master_sync">
      - '/gazebo*'
      - '/gazebo_gui*'
      - '/panda*'

Note that I used the "verbose list" form here, which I happen to like. You can also still use the single-line notation you used with rosrun.

Note also: the single quotes (') are probably not necessary, but when strings contain (what appear to be) globbing characters I'm always a bit careful and just wrap them in quotes.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-05-20 09:49:46 -0600

Seen: 238 times

Last updated: May 20 '19