Skip to content
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

Controller manager crashing with std::runtime_error #1126

Closed
fmauch opened this issue Oct 4, 2023 · 1 comment · Fixed by #1127
Closed

Controller manager crashing with std::runtime_error #1126

fmauch opened this issue Oct 4, 2023 · 1 comment · Fixed by #1127
Labels

Comments

@fmauch
Copy link
Contributor

fmauch commented Oct 4, 2023

Describe the bug
In current testing the controller manager crashes with a

[ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error'
[ros2_control_node-1]   what():  can't compare times with different time sources

To Reproduce
Steps to reproduce the behavior:

  1. build ros2_control, ros2_controllers and ros2_control_demos from source with latest master. I haven't checked with older versions at the moment.
  2. launch a demo example e.g. ros2 launch ros2_control_demo_example_1 rrbot.launch.py

Expected behavior
It should work :-)

Stacktrace

[ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error'
[ros2_control_node-1]   what():  can't compare times with different time sources
[ros2_control_node-1] Stack trace (most recent call last) in thread 101078:
[ros2_control_node-1] #13   Object "", at 0xffffffffffffffff, in
[ros2_control_node-1] #12   Source "../sysdeps/unix/sysv/linux/x86_64/clone3.S", line 81, in __clone3 [0x7f57959f3a3f]
[ros2_control_node-1] #11   Source "./nptl/pthread_create.c", line 442, in start_thread [0x7f5795961ac2]
[ros2_control_node-1] #10   Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f5795bf1252, in
[ros2_control_node-1] #9    Source "/home/ubuntu/checkout/ros2_control/colcon_ws/src/ros2_control/controller_manager/src/ros2_control_node.cpp", line 81, in operator() [0x55ad79027088]
[ros2_control_node-1]          79:         // execute update loop
[ros2_control_node-1]          80:         cm->read(cm->now(), measured_period);
[ros2_control_node-1]       >  81:         cm->update(cm->now(), measured_period);
[ros2_control_node-1]          82:         cm->write(cm->now(), measured_period);
[ros2_control_node-1]          83:
[ros2_control_node-1]          84:         // wait until we hit the end of the period
[INFO] [spawner-3]: process has finished cleanly [pid 101052]
[INFO] [rviz2-4]: process started with pid [101104]
[rviz2-4] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-ubuntu'
[ros2_control_node-1] #8    Source "/home/ubuntu/checkout/ros2_control/colcon_ws/src/ros2_control/controller_manager/src/controller_manager.cpp", line 2046, in update [0x7f57960977ac]
[ros2_control_node-1]        2043:         run_controller_at_cm_rate ? period
[ros2_control_node-1]        2044:                                   : rclcpp::Duration::from_seconds((1.0 / controller_update_rate));
[ros2_control_node-1]        2045:
[ros2_control_node-1]       >2046:       bool controller_go = (time == rclcpp::Time(0)) ||
[ros2_control_node-1]        2047:                            (time.seconds() >= loaded_controller.next_update_cycle_time->seconds());
[ros2_control_node-1]        2048:
[ros2_control_node-1]        2049:       RCLCPP_DEBUG(
[ros2_control_node-1] #7    Object "/opt/ros/rolling/lib/librclcpp.so", at 0x7f5795e45b09, in
[ros2_control_node-1] #6    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f5795bc34d7, in __cxa_throw
[ros2_control_node-1] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f5795bc3276, in std::terminate()
[ros2_control_node-1] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f5795bc320b, in
[ros2_control_node-1] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f5795bb7b9d, in
[ros2_control_node-1] #2    Source "./stdlib/abort.c", line 79, in abort [0x7f57958f57f2]
[ros2_control_node-1] #1    Source "../sysdeps/posix/raise.c", line 26, in raise [0x7f579590f475]
[ros2_control_node-1] #0  | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal
[ros2_control_node-1]     | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation
[ros2_control_node-1]       Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x7f57959639fc]
[ros2_control_node-1] Aborted (Signal sent by tkill() 101048 1000)
[ERROR] [ros2_control_node-1]: process has died

Environment (please complete the following information):

  • OS: Ubuntu 22.04
  • Version ROS Rolling with ros2_control built from source
@bmagyar
Copy link
Member

bmagyar commented Oct 4, 2023

Likely related to #1105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants