Skip to Content
Hands-On ROS for Robotics Programming
book

Hands-On ROS for Robotics Programming

by Bernardo Ronquillo Japón
February 2020
Intermediate to advanced
432 pages
10h 50m
English
Packt Publishing
Content preview from Hands-On ROS for Robotics Programming

Explaining configurable launch files using the <arg> tag

Arguments are a way to use variables in the scope of a launch file. Let's take the example of the world_name argument inside the include tag:

<include file="$(find gazebo_ros)/launch/empty_world.launch">    <arg name="world_name" value="$(find gazebo_basics)/worlds/gopigo.world"/>

This tag tells us which Gazebo world to use—referenced by the name attribute—and specifies the path where the file for the world can be found—that is, value="$(find gazebo_basics)/worlds/gopigo.world". Be aware that how you specify the file path is done in exactly the same way in which we tell it the launch file to include.

The syntax for the <arg> tag is neatly explained in the official documentation at http://wiki.ros.org/roslaunch/XML/arg ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering ROS for Robotics Programming

Mastering ROS for Robotics Programming

Lentin Joseph
ROS Robotics By Example - Second Edition

ROS Robotics By Example - Second Edition

Lentin Joseph, Carol Fairchild, Dr. Thomas L. Harman

Publisher Resources

ISBN: 9781838551308Supplemental Content