0
$\begingroup$

Rosanswers logo

Hello,

I am currently learning urdf and am trying to make a two wheeled robot. I created a base link (chassis) and am trying to visualize it in rviz. To run the urdf file, i have also created a launch file. But when i run the launch file it gives me following error:

[ERROR] [1557809580.250795964]: Error reading Element value.
[robot_state_publisher-3] process has died [pid 5324, exit code 255, cmd /opt/ros/kinetic/lib/robot_state_publisher/state_publisher __name:=robot_state_publisher __log:=/home/yash/.ros/log/25ab353a-7604-11e9-856b-7c2a31390882/robot_state_publisher-3.log].
log file: /home/yash/.ros/log/25ab353a-7604-11e9-856b-7c2a31390882/robot_state_publisher-3*.log

[joint_state_publisher-2] process has died [pid 5323, exit code 1, cmd /home/yash/catkin_ws/src/joint_state_publisher/joint_state_publisher/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/yash/.ros/log/25ab353a-7604-11e9-856b-7c2a31390882/joint_state_publisher-2.log].
log file: /home/yash/.ros/log/25ab353a-7604-11e9-856b-7c2a31390882/joint_state_publisher-2*.log

The Launch file i am running is mentioned below:

<?xml version="1.0"?>
<launch>
    <param name="robot_description" command="cat $(find urdf_tutorial)/urdf/2wheelrobot.urdf"/>

    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
        <param name="use_gui" value="False"/>
    </node>

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

I have searched for the solution on this forum but could not get any answers and hence i am posting this as a new question. Sometimes I also get an error saying:

invalid <param> tag: cannot load command parameter robot_description

Can anyone please guide me with the rectification of this issue?

Thanks.


Originally posted by Yash on ROS Answers with karma: 15 on 2019-05-14

Post score: 0


Original comments

Comment by asma on 2021-01-31:
I have the same problem and I followed these steps but the error still exists.. when I type the command roslaunch everything works normal and then suddenly this happens:

[robot_state_publisher-3] process has died [pid 7068, exit code -11, cmd /opt/ros/kinetic/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/robond/.ros/log/31078e02-63ff-11eb-8150-000c29954203/robot_state_publisher-3.log].
log file: /home/robond/.ros/log/31078e02-63ff-11eb-8150-000c29954203/robot_state_publisher-3*.log

I can't find the log file and i don't know why can someone help me please?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

You have an issue because of your last error. The nodes joint_state_publisher and robot_state_publisher need as param robot_description, which is your robot urdf but your last error say that this parameter couldn't be loaded, meaning that both nodes can't be run too.

You just need to properly load the parameter robot_description :

<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find urdf_tutorial)/urdf/2wheelrobot.urdf'"/>

EDIT

As @gvdhoorn said, you could use check_urdf to check if your urdf is well-formed (it's always a good practice). But I feel your error isn't due to a mistake in your urdf file because whenever I tried your example with a broken urdf file, the error directly pointed that out. The only times I managed to have the same error as you is when $(find PACKAGE) actually find the package you tell it to find but the urdf file isn't in this package. So you either have a typo in the name of your urdf file or you created a package within your workspace urdf_tutorial but forgot to source your package, since urdf_tutorial is also an official package that you've probably installed, the command $(find urdf_tutorial) do find the package but it's not yours, meanning it cannot find your file.


Originally posted by Delb with karma: 3907 on 2019-05-14

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by gvdhoorn on 2019-05-14:
@Delb: if 2wheelrobot.urdf is not actually a .xacro, then using xacro shouldn't be necessary.

It could be that @Yash has an error in his urdf.

Perhaps running check_urdf would be a good idea?

Comment by Yash on 2019-05-14:
Yes, it is not a xacro. Should i upload my URDF file?

Comment by Yash on 2019-05-17:
@Delb I have created another package and i tried running the same launch file (name of the package is changed) and still it does not work.

Comment by Delb on 2019-05-17:\

still it does not work

You need to give more informations than that please : is there an error (you should porovide the full error if it's different than the previous one) ? Also you didn't reply to us about the check_urdf, did it return errors or not ?

Moreover have you correctly sourced your catkin workspace as suggested ?

Comment by Yash on 2019-05-20:
I am sorry for replying so late. But i resolved the error. And you guys were correct. The error was in the URDF File. I had forgotten to close the tag. Thank You once again. You guys have been helpful.

$\endgroup$
0
$\begingroup$

Rosanswers logo

I have the same problem and I followed these steps but the error still exists.. when I type the command roslaunch everything works normal and then suddenly this happens:

[robot_state_publisher-3] process has died [pid 7068, exit code -11, cmd /opt/ros/kinetic/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/robond/.ros/log/31078e02-63ff-11eb-8150-000c29954203/robot_state_publisher-3.log].
log file: /home/robond/.ros/log/31078e02-63ff-11eb-8150-000c29954203/robot_state_publisher-3*.log

I can't find the log file and i don't know why can someone help me please?


Originally posted by asma with karma: 11 on 2021-01-31

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.