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

My understanding is that you would use the arg rospack command when attempting to parse a commandline input argument (e.g. xacro myfile.xacro myarg:=true).

You can define a default value in your file with<xacro:arg name="myarg" default="false"/>, and have them behave similarly to properties, except for the syntax of how you access the value. Rospack commands use parentheses ($())

In the file you attached, robot_ip is a param input to your macro, not an argument. Parameters are evaluated as macro-local properties, and properties and expressions are all evaluated within braces (${}).

As to why parsing $(arg robot_ip) works on your coworkers computer and not yours... I'm not entirely sure, but my hunch would be that your coworker's launch script is slightly different and they define the arg somewhere.