-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rclcpp::exceptions::RCLError / rcl_wait() failed: error not set #1977
Comments
Ran into a similar situation with the same exception thrown. Not sure why it happened, we simply use a workaround to spin with try-catch for RCLError. |
@liangyuwei thanks for confirming it.
Where did you put this try-catch ? In a fork of rclcpp ? |
@liangyuwei do you also use @doisyg this could be related to
i think user application code to catch the exception from |
@fujitatomoya Currently cannot test with |
|
@arslogavitabrevis also reported the issue on the nav2 ticket. Can you confirm OS, ROS version and DDS used ? |
We are using Cyclone DDS, Ubuntu 22.04 and Humble from debian binary. We also encontered this error during endurance tests on navigation2 nodes. |
There are no reproduced steps, I am not sure if the following path is the error case: rcl_wait -> rcl_timer_get_time_until_next_call -> rcutils_atomic_load_bool (updated 5 months ago) -> return RCL_RET_TIMER_CANCELED without setting a error state. (The log showed ret = rcl_timer_get_time_until_next_call(wait_set->timers[i], &timer_timeout);
if (ret != RCL_RET_OK) {
return ret; // The rcl error state should already be set.
} It seems we should deal with |
I had the same error in planner_server. I'm using fast DDS, ubuntu 22.04, and humble. [planner_server-3] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
[planner_server-3] what(): rcl_wait() failed: error not set
[ERROR] [planner_server-3]: process has died [pid 13889, exit code -6, cmd '/opt/floatic/workspace/dependency_ws/install/nav2_planner/lib/nav2_planner/planner_server --ros-args -r __node:=planner_server -r __ns:=/navigation --params-file /tmp/tmp7i39them --params-file /tmp/launch_params_06b_heu1 -r tf:=/tf -r tf_static:=/tf_static -r cmd_vel:=/nav_vel -r odom:=/odom -r goal_pose:=/goal_pose'].
[INFO] [planner_server-3]: process started with pid [27679]
[planner_server-3] [INFO] [1661392904.274648775] [navigation.planner_server]:
[planner_server-3] planner_server lifecycle node launched.
[planner_server-3] Waiting on external lifecycle transitions to activate
[planner_server-3] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-3] [INFO] [1661392904.279793060] [navigation.planner_server]: Creating
[planner_server-3] [INFO] [1661392904.282890912] [navigation.global_costmap.global_costmap]:
[planner_server-3] global_costmap lifecycle node launched.
[planner_server-3] Waiting on external lifecycle transitions to activate
[planner_server-3] See https://design.ros2.org/articles/node_lifecycle.html for more information.
|
I requested pr to solve this problem at this ticket ros2/rcl#1003 |
I believe that @ladianchad's PR can solve this issue, but I suspected that rolling back the ros2/rcl#963 is the correct way. Even if using The later checking the flag, the more accurate to process the timer event. |
@doisyg Sorry for the late reply, we do this: while (rclcpp::ok()) {
try {
executor.spin();
} catch (rclcpp::exceptions::RCLError & e) {
RCLCPP_ERROR_STREAM(
rclcpp::get_logger("rclcpp"),
"executor spin error: " << e.what());
}
} |
I believe that backport to humble/galactic/foxy required,
then we can close this issue. |
I am not sure why we need to backport to https://github.com/ros2/rcl/blob/foxy/rcl/src/rcl/timer.c#L305 didn't return https://github.com/ros2/rcl/blob/humble/rcl/src/rcl/timer.c#L319 did. |
@iuhilnehc-ynos thanks for pointing that out, you are correct. we should not check that something never returns it. |
@ladianchad thanks for the contribution, backport for @doisyg i will close this issue, please re-open the issue if you find the problem. |
This issue has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/preparing-for-humble-sync-2022-09-09/27240/2 |
Hello, I am having a similar issue when working with a custom action server. I am wondering if this is somehow related or if my issue is unrelated. The error happens after accepting the goal. It happens 1 in 20-30 action server executions so it is not easily reproducable.
I am using Galactic.
This is the offending line: I tried to add a try-catch like @liangyuwei but the output is: |
Just to add to this. The error happens more often when the send_goal request comes from a device on the same WAN than from within the localhost. |
@pepeRossRobotics |
I realised I was using an onld Docker of Galactic that have not been update/upgrade in awhile. The solved the problem for me. Since I have moved to Humble, and it seems it is more stable now. |
Bug report
Required Info:
Don't know if it is rclcpp or something nav2 specific, already posted here: ros-navigation/navigation2#3097
I get an
rclcpp::exceptions::RCLError / rcl_wait() failed: error not set
error randomly during endurance testing on a real robot on amcl, controller_server and some other navigation node. All were working fine undergalactic
.Struggling to understand the origin of it.
The text was updated successfully, but these errors were encountered: