An action server behavior for assisted teleop.
More...
#include <nav2_behaviors/include/nav2_behaviors/plugins/assisted_teleop.hpp>
|
|
using | AssistedTeleopActionGoal = AssistedTeleopAction::Goal |
| |
|
using | AssistedTeleopActionResult = AssistedTeleopAction::Result |
| |
|
using | ActionServer = nav2::SimpleActionServer< AssistedTeleopAction > |
| |
|
using | Ptr = std::shared_ptr< Behavior > |
| |
|
| ResultStatus | onRun (const std::shared_ptr< const AssistedTeleopActionGoal > command) override |
| | Initialization to run behavior. More...
|
| |
|
void | onActionCompletion (std::shared_ptr< AssistedTeleopActionResult >) override |
| | func to run at the completion of the action
|
| |
| ResultStatus | onCycleUpdate () override |
| | Loop function to run behavior. More...
|
| |
| CostmapInfoType | getResourceInfo () override |
| | Method to determine the required costmap info. More...
|
| |
|
| 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.
|
| |
|
virtual | ~Behavior () |
| | Virtual destructor.
|
| |
|
|
void | onConfigure () override |
| | Configuration of behavior action.
|
| |
| geometry_msgs::msg::Pose | projectPose (const geometry_msgs::msg::Pose &pose, const geometry_msgs::msg::Twist &twist, double projection_time) |
| | project a position More...
|
| |
| void | preemptTeleopCallback (const std_msgs::msg::Empty::ConstSharedPtr &msg) |
| | Callback function to preempt assisted teleop. More...
|
| |
| bool | isTeleopCommandStale (const rclcpp::Time &now) const |
| | Check whether the last teleop command is older than teleop_command_timeout. More...
|
| |
| 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 () |
| |
|
|
AssistedTeleopAction::Feedback::SharedPtr | feedback_ |
| |
|
double | projection_time_ |
| |
|
double | simulation_time_step_ |
| |
|
double | teleop_command_timeout_ |
| |
|
geometry_msgs::msg::TwistStamped | teleop_twist_ |
| |
|
bool | received_first_command_ {false} |
| |
|
bool | preempt_teleop_ {false} |
| |
|
std::unique_ptr< nav2_util::TwistSubscriber > | vel_sub_ |
| |
|
nav2::Subscription< std_msgs::msg::Empty >::SharedPtr | preempt_teleop_sub_ |
| |
|
rclcpp::Duration | command_time_allowance_ {0, 0} |
| |
|
rclcpp::Time | end_time_ |
| |
|
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_ |
| |
An action server behavior for assisted teleop.
Definition at line 36 of file assisted_teleop.hpp.
◆ getResourceInfo()
| CostmapInfoType nav2_behaviors::AssistedTeleop::getResourceInfo |
( |
| ) |
|
|
inlineoverridevirtual |
◆ isTeleopCommandStale()
| bool nav2_behaviors::AssistedTeleop::isTeleopCommandStale |
( |
const rclcpp::Time & |
now | ) |
const |
|
protected |
Check whether the last teleop command is older than teleop_command_timeout.
- Parameters
-
| now | Current time to compare the command stamp against |
- Returns
- true if the timeout is enabled, a command was received, and it is stale
Definition at line 186 of file assisted_teleop.cpp.
◆ onCycleUpdate()
| ResultStatus nav2_behaviors::AssistedTeleop::onCycleUpdate |
( |
| ) |
|
|
overridevirtual |
◆ onRun()
| ResultStatus nav2_behaviors::AssistedTeleop::onRun |
( |
const std::shared_ptr< const AssistedTeleopActionGoal > |
command | ) |
|
|
override |
Initialization to run behavior.
- Parameters
-
- Returns
- Status of behavior
Definition at line 64 of file assisted_teleop.cpp.
◆ preemptTeleopCallback()
| void nav2_behaviors::AssistedTeleop::preemptTeleopCallback |
( |
const std_msgs::msg::Empty::ConstSharedPtr & |
msg | ) |
|
|
protected |
◆ projectPose()
| geometry_msgs::msg::Pose nav2_behaviors::AssistedTeleop::projectPose |
( |
const geometry_msgs::msg::Pose & |
pose, |
|
|
const geometry_msgs::msg::Twist & |
twist, |
|
|
double |
projection_time |
|
) |
| |
|
protected |
project a position
- Parameters
-
| pose | initial pose to project |
| twist | velocity to project pose by |
| projection_time | time to project by |
Definition at line 158 of file assisted_teleop.cpp.
The documentation for this class was generated from the following files: