lunes, 9 de agosto de 2010

Launch File Configuration - Tag Reference

The launch file is an XML code that describes how the nodes of a package are configured. It consists of the following tags (Not all of them are always necessary):

<launch>
It is used as a container of the other tags. It is the root element of any roslaunch file. As any XML file it starts with and ends with . In this case this tag is always at the beginning and the end of every launch file.

<node>
The node tag specifies a node that you want to have launched. It brings up and takes down nodes.

Note: "roslaunch does not provide any guarantees about what order nodes start in. This is intentional: there is no way to externally know when a node is fully initialized, so all code that is launched must be robust to launching in any order"


<machine>
This tag declares a machine that runs ROS nodes on. "It is mainly used to declare SSH and ROS environment variable settings for remote machines".

Attributes:
name, address, ros-root, ros-package-path, default, user, password and timeout.

It's only Element is: env.

More info about this tag in:
Note: "You do not need this tag if you are launching all the nodes locally"

<include>
This tag allows you to include another roslaunch file into your current file.

Attributes: file, ns, clear_params.

More info about this tag in: <include>

<remap>
"The tag allows you to pass in name remapping arguments to the ROS node that you are launching in a more structured manner than setting the args attribute of a directly"

Attributes:
from, to.

More info about this tag in:

<env>
This tag allows you to set environment variables on nodes that are launched in the XML file.

Attributes:
name, value.

More info about this tag in:

<param>
Instead of a value you can specify a textfile or binfile attribute to set the value of a parameter to be set on the Parameter Server.

Attributes:
name, value, type, textfile, binfile, command.

More info about this tag in:

<rosparam>
"The tag enables the use of rosparam YAML files for loading and dumping parameters from the ROS Parameter Server. It can also be used to remove parameters."

Attributes:
command, file, param and ns.

More info about this tag in:

Note: The attribute ns is deprecated.

<group>
With this tag you can apply settings to a defined group of nodes.

Attributes:
ns, clear_params.

More info about this tag in:

<test>
This node is like a tag, but the difference is that it refers to a test node.

More info about this tag in:

<arg>
"The tag allows you to create more re-usable and configurable launch files by specifying values that are passed via the command-line, passing in via an , or declared for higher-level files."

More info about this tag in:

---

Key Concepts:

Parameter Server: "A parameter server is a shared, multi-variate dictionary that is accessible via network APIs. Nodes use this server to store and retrieve parameters at runtime. As it is not designed for high-performance, it is best used for static, non-binary data such as configuration parameters. It is meant to be globally viewable so that tools can easily inspect the configuration state of the system and modify if necessary. "

---

More information available at: ROSLAUNCH/XML
The examples showed in this post are from the same link.

Also if you need to learn XML you can use this free tutorial: XML Tutorial

No hay comentarios:

Publicar un comentario