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

Revision history [back]

click to hide/show revision 1
initial version

Background: YAML is a generic file format, and can be used to specify many, many things. In this particular context it's used to specify the configuration of the yocs_cmd_vel_mux nodelet, but be aware that you will see the YAML format used elsewhere for completely different things.

I will confine my answer specifically to using YAML to configure the yocs_cmd_vel_mux nodelet.

1) As far as I'm aware, you can't reference outside data from a YAML file. That said, a YAML file is a text file, so it's easy to modify.

2) The yocs_cmd_vel_mux node will not automatically pick up changes to the yaml file. It does have an interface through dynamic_reconfigure that can be used to load a new configuration file.

Further things to consider:

The yocs_cmd_vel_mux nodelet is a nodelet; this means that it needs to be run within a nodelet manager. It's usually run as part of the core Kobuki/Turtlebot2 launch, but if you're trying to use it on another robot, you'll need to learn a little about nodelets and how to run a nodelet manager in order to use it.

If you're trying to change the priorities of the input topics dynamically at run time in order to force a particular input, you're probably designing your system wrong. The purpose of a multiplexer like this is to prioritize and choose the input topic automatically; if you set the priorities correctly on startup, the mux should automatically choose whichever active topic has the highest priority.

If you're looking for a more generic mux that doesn't automatically do topic prioritization and switching, have a look at the topic_tools mux node.