1、问题描述
启动ROS节点时,直接崩溃,打印信息如下:
terminate called after throwing an instance of 'rclcpp::exceptions::RCLInvalidArgument'
what(): failed to create guard condition: context argument is null, at ./src/rcl/guard_condition.c:65
[ros2run]: Aborted
2、原因分析
1) ROS2 未初始化
在使用 rclcpp接口 之前没有调用 rclcpp::init(),错误示例:
int main