UniversalRobots / Universal_Robots_ROS2_Driver

Universal Robots ROS2 driver supporting CB3 and e-Series
BSD 3-Clause "New" or "Revised" License
414 stars 215 forks source link

Occasional crash with SJTC #380

Open Schnilz opened 2 years ago

Schnilz commented 2 years ago

Hi, first of all thanks for writing this, it is awesome :) The driver works realy well and setting it up was pretty straight forward because of the nice documentation, but i think i encountered a bug. Most of the time this issue doesn't occur but sometimes the SJTC crashes with following log messages:

[ur_ros2_control_node-1] [INFO] [1652881749.579905572] [scaled_joint_trajectory_controller]: Received new action goal
[ur_ros2_control_node-1] [INFO] [1652881749.580010468] [scaled_joint_trajectory_controller]: Accepted new action goal
[ur_ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error'
[ur_ros2_control_node-1]   what():  Executing action server but nothing is ready
[ERROR] [ur_ros2_control_node-1]: process has died [pid 57695, exit code -6, cmd ...

the error comes from rclcpp_action/src/server.cpp line 306 but im not realy sure what it actualy means :/ Like i said, reproducing it is not so easy as it works most of the time. I have a feeling it happens more often when the trajectory is short, but this could be wrong....

fmauch commented 2 years ago

Thanks for posting this. This is definitively something to look into. Could you tell us a little about your setup for us to reproduce this?

Schnilz commented 2 years ago

The newest commit on the glactic banch (so ae85525) with ros galactic. It is maybe caused by me not using a realtime kernel on my dual-core thinkpad which run the driver. I think that because if you put a delay (like printing to cout 10000 times) at the end of the JTC feedback callback setup function the error basicly never happens anymore (hit it once in 2h of running, compared to every ~2min before).

fmauch commented 2 years ago

This issue is not forgotten, but will need some more time to reproduce.

RoyCLR commented 2 years ago

I seems to hit the same issue, but with joint_trajectory_controller:

[ros2_control_node-1] [1661228175.046757625INFO] [joint_trajectory_controller::goal_callback]: Received new action goal
[ros2_control_node-1] [1661228175.046794670INFO] [joint_trajectory_controller::goal_callback]: Accepted new action goal
[ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error'
[ros2_control_node-1]   what():  Executing action server but nothing is ready
[ERROR] [ros2_control_node-1]: process has died [pid 1708770, exit code -6, cmd

Setup:

fmauch commented 11 months ago

Coming back to this: https://github.com/ros2/rclcpp/pull/2250

I've had this on my local long-term test and the linked PR fixes that for me.

tommy-erko commented 11 months ago

Detailed explanation of the issue is here: https://github.com/ros2/rclcpp/issues/2242

firesurfer commented 5 months ago

@fmauch Did you figure out if that fix is also backported to iron or humble ? Apparently it is finally merged into rolling but I couldn't figure out if there are plans to backport it

fmauch commented 5 months ago

https://github.com/ros2/rclcpp/issues/2242#issuecomment-2072845701 not necessarily :-/