ros / xacro

Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Home Page:http://www.ros.org/wiki/xacro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

name 'namespace' is not defined

johnwaneboy opened this issue · comments

There is a strange issue. I have install and run a program successfully, and no adjustments were made. When I ran another program, but there is no changes in the first program, the following problems occurred.

name 'namespace' is not defined
when evaluating expression 'namespace'
when processing file: /home/wane/catkin_ws/src/rotors_simulator/rotors_description/urdf/component_snippets.xacro
included from: /home/wane/catkin_ws/src/rotors_simulator/rotors_description/urdf/hummingbird_base.xacro
included from: /home/wane/catkin_ws/src/rotors_simulator/rotors_description/urdf/mav_generic_odometry_sensor.gazebo
RLException: while processing /home/wane/catkin_ws/src/rpg_quadrotor_control/simulation/rpg_rotors_interface/launch/basics/base_quad_simulation.launch:
while processing /home/wane/catkin_ws/src/rotors_simulator/rotors_gazebo/launch/spawn_mav.launch:
Invalid tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/wane/catkin_ws/src/rotors_simulator/rotors_description/urdf/mav_generic_odometry_sensor.gazebo', 'enable_logging:=false', 'enable_ground_truth:=true', 'enable_mavlink_interface:=false', 'log_file:=hummingbird', 'wait_to_record_bag:=false', 'mav_name:=hummingbird', 'namespace:=hummingbird']] returned with code [2].

Param xml is
The traceback for the exception was written to the log file

The error message states that your are accessing the xacro property ${namespace}, which isn't defined in component_snippets.xacro. I see that you pass a namespace argument via cmdline, but this needs to be referenced via $(arg namespace). For further debugging, you should provide a minimal code example exhibiting the issue.

I am running into a similar problem. On the rotors_simulator repo there is an issue that suggest using older xacro version and rebuild the package.

Thanks for referencing the rotors_simulator repo (even better would have been referencing the issue: ethz-asl/rotors_simulator#695). The problem is resolved in xacro 1.14.13. Please simply update.