0
$\begingroup$

I am migrating a node that send goals to nav2 (originally move_base) thru an action since I need to know if it has been reached or cancelled by the planner.

It will work with the Turtlebot4. I've been reading the nav2 documentation and launching the nav2 launch of Turtlebot4 and I guess that I need to call the action /navigate_to_pose of the node bt_navigator. However showing the interface, I see that the result is a std_msgs/Empty.

How can I easily send goals to Turtlebot4 from a cpp node and know the status of the navigation (i.e. goal reached/cancelled/travelling)?

$\endgroup$

1 Answer 1

0
$\begingroup$

I found this example and I realized that the class rclcpp_action::ClientGoalHandle<T>::WrappedResult already has the attribute code (that can be either rclcpp_action::ResultCode::SUCCEEDED , rclcpp_action::ResultCode::ABORTED or rclcpp_action::ResultCode::CANCELLED) so there is no need of putting this information in the action interface.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.