ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command

asked 2020-02-28 03:08:12 -0600

merco.may-pay-afidu gravatar image

updated 2020-02-28 08:11:56 -0600

gvdhoorn gravatar image

I use the ros melodic, when i launch my launch file, i have this error.

My launch is it :

<?xml version="1.0"?>

<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find robufast_base)/launch/robufast.urdf'" />

<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>

<!--<node name="rviz" pkg="rviz" type="rviz"/>-->

<arg name="gui" default="true" />

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />

<param name="use_gui" value="$(arg gui)"/>

edit retag flag offensive close merge delete


robot_state_publisher needs a model of your robot (usually a urdf file) and it expects its content to be available on the robot_description parameter.

You can see q267328 for an example of how to set the robot_description parameter.

If your robot is described using Xacro files and not urdf you can use the following pattern instead:

<param name="robot_description" command="$(find xacro)/ --inorder $(find pkg-name)/path/file.urdf.xacro" />
marguedas gravatar image marguedas  ( 2020-02-28 07:48:18 -0600 )edit

I believe there is actually a robot_description parameter being loaded.

It just wasn't visible due to incorrect formatting of the .launch file in the question text.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-28 08:12:56 -0600 )edit

oh right, converting to comment then, thanks

@mercomay-pay-afidu can you provide the full console output that gets printed when you launch your launchfile ?

marguedas gravatar image marguedas  ( 2020-02-28 11:06:10 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-17 12:00:29 -0600

jacobperron gravatar image

The error is that the <param> is in the top-level scope of the launch file. In ROS 2, <param> tags must be contained inside of <node> tags. Try changing your launch script to look more like this:

<?xml version="1.0"?>

<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
  <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find robufast_base)/launch/robufast.urdf'" />

<!--<node name="rviz" pkg="rviz" type="rviz"/>-->

<arg name="gui" default="true" />

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />

<!-- You'll need to a figure what node is consuming this parameter and pass it directly to the node -->
<!--param name="use_gui" value="$(arg gui)"/-->


The robot_description parameter should be passed directly to robot_state_publisher. As my comment in the above code states, you'll also need to move the use_gui parameter inside of tags for the node that needs it.

The above launch script will only work with the latest version of robot_state_publisher (ROS 2 Foxy or later).This is because it was changed to read the robot description from a parameter (like in ROS 1) in

For ROS 2 Eloquent, or older, you'll need to pass the robot description file as a command line argument. For example,

<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"
    args="$(find robufast_base)/launch/robufast.urdf'" />

With the caveat that robufast.urdf above has already been expanded by xacro.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2020-02-28 03:08:12 -0600

Seen: 3,178 times

Last updated: Mar 17 '20