|
Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
An action server behavior for spinning in. More...
#include <nav2_behaviors/include/nav2_behaviors/plugins/spin.hpp>


Public Types | |
| using | SpinActionGoal = SpinAction::Goal |
| using | SpinActionResult = SpinAction::Result |
Public Types inherited from nav2_behaviors::TimedBehavior< SpinAction > | |
| using | ActionServer = nav2::SimpleActionServer< SpinAction > |
Public Types inherited from nav2_core::Behavior | |
| using | Ptr = std::shared_ptr< Behavior > |
Public Member Functions | |
| Spin () | |
| A constructor for nav2_behaviors::Spin. | |
| ResultStatus | onRun (const std::shared_ptr< const SpinActionGoal > command) override |
| Initialization to run behavior. More... | |
| void | onConfigure () override |
| Configuration of behavior action. | |
| ResultStatus | onCycleUpdate () override |
| Loop function to run behavior. More... | |
| CostmapInfoType | getResourceInfo () override |
| Method to determine the required costmap info. More... | |
Public Member Functions inherited from nav2_behaviors::TimedBehavior< SpinAction > | |
| TimedBehavior () | |
| A TimedBehavior constructor. | |
| virtual ResultStatus | onRun (const std::shared_ptr< const typename ActionT::Goal > command)=0 |
| virtual void | onCleanup () |
| virtual void | onActionCompletion (std::shared_ptr< typename ActionT::Result >) |
| void | configure (const nav2::LifecycleNode::WeakPtr &parent, const std::string &name, nav2::TransformBuffer::SharedPtr tf, std::shared_ptr< nav2_costmap_2d::CostmapTopicCollisionChecker > local_collision_checker, std::shared_ptr< nav2_costmap_2d::CostmapTopicCollisionChecker > global_collision_checker) override |
| void | cleanup () override |
| Method to cleanup resources used on shutdown. | |
| void | activate () override |
| Method to active Behavior and any threads involved in execution. | |
| void | deactivate () override |
| Method to deactivate Behavior and any threads involved in execution. | |
Public Member Functions inherited from nav2_core::Behavior | |
| virtual | ~Behavior () |
| Virtual destructor. | |
Protected Member Functions | |
| bool | isCollisionFree (const double &distance, const geometry_msgs::msg::Twist &cmd_vel, geometry_msgs::msg::Pose &pose) |
| Check if pose is collision free. More... | |
Protected Member Functions inherited from nav2_behaviors::TimedBehavior< SpinAction > | |
| bool | getCurrentPoseChecked (geometry_msgs::msg::PoseStamped &pose) |
| Get one checked robot pose in the local frame, preserving the TF timestamp. More... | |
| void | execute () |
| void | stopRobot () |
Protected Attributes | |
| SpinAction::Feedback::SharedPtr | feedback_ |
| double | min_rotational_vel_ |
| double | max_rotational_vel_ |
| double | rotational_acc_lim_ |
| double | cmd_yaw_ |
| bool | cmd_disable_collision_checks_ |
| double | prev_yaw_ |
| double | relative_yaw_ |
| double | simulate_ahead_time_ |
| rclcpp::Duration | command_time_allowance_ {0, 0} |
| rclcpp::Time | end_time_ |
Protected Attributes inherited from nav2_behaviors::TimedBehavior< SpinAction > | |
| nav2::LifecycleNode::WeakPtr | node_ |
| std::string | behavior_name_ |
| std::unique_ptr< nav2_util::TwistPublisher > | vel_pub_ |
| ActionServer::SharedPtr | action_server_ |
| std::shared_ptr< nav2_costmap_2d::CostmapTopicCollisionChecker > | local_collision_checker_ |
| std::shared_ptr< nav2_costmap_2d::CostmapTopicCollisionChecker > | global_collision_checker_ |
| nav2::TransformBuffer::SharedPtr | tf_ |
| double | cycle_frequency_ |
| double | enabled_ |
| std::string | local_frame_ |
| std::string | global_frame_ |
| std::string | robot_base_frame_ |
| double | transform_staleness_threshold_ |
| rclcpp::Duration | elapsed_time_ |
| rclcpp::Clock::SharedPtr | clock_ |
| rclcpp::Logger | logger_ |
|
inlineoverridevirtual |
Method to determine the required costmap info.
Implements nav2_core::Behavior.
|
protected |
Check if pose is collision free.
| distance | Distance to check forward |
| cmd_vel | current commanded velocity |
| pose2d | Current pose |
Definition at line 145 of file spin.cpp.
Referenced by onCycleUpdate().

|
overridevirtual |
Loop function to run behavior.
Implements nav2_behaviors::TimedBehavior< SpinAction >.
Definition at line 86 of file spin.cpp.
References nav2_behaviors::TimedBehavior< SpinAction >::getCurrentPoseChecked(), and isCollisionFree().

|
override |
Initialization to run behavior.
| command | Goal to execute |
Definition at line 62 of file spin.cpp.
References nav2_behaviors::TimedBehavior< SpinAction >::getCurrentPoseChecked().
