terminate called after throwing an instance of 'rclcpp::exceptions::RCLInvalidArgument'

asked 2019-02-11 23:13:28 -0500

himanshu gravatar image

updated 2019-02-12 02:46:38 -0500

gvdhoorn gravatar image

I am getting exception which is related to initialization of rcl or shutdown of rcl i.e:-

 terminate called after throwing an instance of 'rclcpp::exceptions::RCLInvalidArgument'
  what():  failed to create interrupt guard condition: context argument is null, at /home/mobis/ros2_ws/src/ros2/rcl/rcl/src/rcl/guard_condition.c:65

I tried to solve it but still getting the same problem....it would be a great help if anyone tell me how to solve this.

edit retag flag offensive close merge delete

Comments

Did you ever figure out what it was?

Obeseturtle gravatar image Obeseturtle  ( 2019-03-06 00:30:21 -0500 )edit
5

I guess you need to call rclcpp::init(argc, argv) in the main function.

Paulls20 gravatar image Paulls20  ( 2019-04-09 04:17:06 -0500 )edit

Did you solve this?

petal gravatar image petal  ( 2019-07-20 13:11:41 -0500 )edit
1

Yeah I have run into this also when trying to run gtest with a node, without calling rclcpp::init() in the main function.

vinny gravatar image vinny  ( 2021-10-25 11:35:29 -0500 )edit