error: ‘options’ does not name a type
Hello,
I am using ROS 2 Galactic on Ubuntu 20.04. I am trying to create a callback group using the tutorial on ROS2 documentation. I am getting this error
error: ‘options’ does not name a type
This is how I am defining my group:
rclcpp::CallbackGroup::SharedPtr my_callback_group = create_callback_group(rclcpp::CallbackGroupType::Reentrant);
rclcpp::SubscriptionOptions options;
options.callback_group = my_callback_group;
I have also tried:
auto my_callback_group = create_callback_group(rclcpp::CallbackGroupType::Reentrant);
rclcpp::SubscriptionOptions options;
options.callback_group = my_callback_group;
I still get the same error. Thanks.