ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

robot_state_publisher has died, joint_state_publisher has died

asked 2019-05-14 00:02:03 -0600

Yash gravatar image

updated 2019-05-14 02:17:12 -0600

gvdhoorn gravatar image

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.

edit retag flag offensive close merge delete

Comments

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?

asma gravatar image asma  ( 2021-01-31 14:09:10 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2019-05-14 02:19:22 -0600

Delb gravatar image

updated 2019-05-15 04:32:39 -0600

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.

edit flag offensive delete link more

Comments

1

@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?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-14 02:26:31 -0600 )edit

Yes, it is not a xacro. Should i upload my URDF file?

Yash gravatar image Yash  ( 2019-05-14 15:40:36 -0600 )edit

@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.

Yash gravatar image Yash  ( 2019-05-17 01:37:47 -0600 )edit
1

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 ?

Delb gravatar image Delb  ( 2019-05-17 01:50:32 -0600 )edit

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 <robot> tag. Thank You once again. You guys have been helpful.

Yash gravatar image Yash  ( 2019-05-20 01:05:27 -0600 )edit
1

answered 2021-01-31 14:08:15 -0600

asma gravatar image

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?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-05-14 00:02:03 -0600

Seen: 7,005 times

Last updated: May 15 '19