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

Try this:

Add an import for launch_ros.descriptions to your launch file:

import launch_ros.descriptions

Then wrap your xacro command with a parameter value:

parameters=[{'robot_description': launch_ros.descriptions.ParameterValue( launch.substitutions.Command(['xacro ',os.path.join(turtlebot2_description_package,'robots/kobuki_conveyor.urdf.xacro')]), value_type=str)  }]

Not using the ParameterValue to wrap the xacro output is unsafe unless you have a well curated xacro/urdf. If ANY text in the xacro output can be interpreted as yaml, the roslaunch system will try to interpret the ENTIRE text as yaml instead of passing on the string. The biggest cause of this false interpretation is commenting out xacro calls since the xacro:property or similar looks a lot like a yaml key:pair. Comments are not removed by xacro so they are included in the output.

In this case the Error text is trying to guide you on how to fix this exact issue.

Hope this helps!

Try this:

Add an import for launch_ros.descriptions to your launch file:

import launch_ros.descriptions

Then wrap your xacro command with a parameter value:

parameters=[{'robot_description': launch_ros.descriptions.ParameterValue( launch.substitutions.Command(['xacro ',os.path.join(turtlebot2_description_package,'robots/kobuki_conveyor.urdf.xacro')]), value_type=str)  }]

Not using the ParameterValue to wrap the xacro output is unsafe unless you have a well curated xacro/urdf. If ANY text in the xacro output can be interpreted as yaml, the roslaunch system will try to interpret the ENTIRE text as yaml instead of passing on the string. The biggest cause of this false interpretation is commenting out xacro calls since the xacro:property or similar looks a lot like a yaml key:pairkey:value. pair. Comments are not removed by xacro so they are included in the output.

In this case the Error text is trying to guide you on how to fix this exact issue.

Hope this helps!