Robotics StackExchange | Archived questions

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

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.

Asked by himanshu on 2019-02-12 00:13:28 UTC

Comments

Did you ever figure out what it was?

Asked by Obeseturtle on 2019-03-06 01:30:21 UTC

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

Asked by Paulls20 on 2019-04-09 04:17:06 UTC

Did you solve this?

Asked by petal on 2019-07-20 13:11:41 UTC

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

Asked by vinny on 2021-10-25 11:35:29 UTC

Answers