Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
Public Member Functions | |
SimpleNonChargingDock () | |
Constructor. | |
virtual void | configure (const nav2::LifecycleNode::WeakPtr &parent, const std::string &name, std::shared_ptr< tf2_ros::Buffer > tf) |
virtual void | cleanup () |
Method to cleanup resources used on shutdown. | |
virtual void | activate () |
Method to active Behavior and any threads involved in execution. | |
virtual void | deactivate () |
Method to deactivate Behavior and any threads involved in execution. | |
virtual geometry_msgs::msg::PoseStamped | getStagingPose (const geometry_msgs::msg::Pose &pose, const std::string &frame) |
Method to obtain the dock's staging pose. This method should likely be using TF and the dock's pose information to find the staging pose from a static or parameterized staging pose relative to the docking pose. More... | |
virtual bool | getRefinedPose (geometry_msgs::msg::PoseStamped &pose, std::string id) |
Method to obtain the refined pose of the dock, usually based on sensors. More... | |
virtual bool | isDocked () |
Have we made contact with dock? This can be implemented in a variety of ways: by establishing communications with the dock, by monitoring the the drive motor efforts, etc. More... | |
![]() | |
virtual | ~NonChargingDock () |
Virtual destructor. | |
bool | isCharging () final |
Are we charging? If a charge dock requires any sort of negotiation to begin charging, that should happen inside this function as this function will be called repeatedly after the docking loop to check if successful. More... | |
bool | disableCharging () final |
Undocking while current is still flowing can damage a charge dock so some charge docks provide the ability to disable charging before the robot physically disconnects. The undocking action will not command the robot to move until this returns true. More... | |
bool | hasStoppedCharging () final |
Similar to isCharging() but called when undocking. | |
bool | isCharger () final |
Gets if this is a charging-typed dock. | |
![]() | |
virtual | ~ChargingDock () |
Virtual destructor. | |
DockDirection | getDockDirection () |
Indicates the direction of the dock. This is used to determine if the robot should drive forwards or backwards onto the dock. More... | |
bool | shouldRotateToDock () |
Determines whether the robot should rotate 180ยบ to face away from the dock. For example, to perform a backward docking without detections. More... | |
std::string | getName () |
Protected Member Functions | |
void | jointStateCallback (const sensor_msgs::msg::JointState::SharedPtr state) |
Protected Attributes | |
nav2::Subscription< geometry_msgs::msg::PoseStamped >::SharedPtr | dock_pose_sub_ |
rclcpp::Publisher< geometry_msgs::msg::PoseStamped >::SharedPtr | dock_pose_pub_ |
rclcpp::Publisher< geometry_msgs::msg::PoseStamped >::SharedPtr | filtered_dock_pose_pub_ |
rclcpp::Publisher< geometry_msgs::msg::PoseStamped >::SharedPtr | staging_pose_pub_ |
geometry_msgs::msg::PoseStamped | detected_dock_pose_ |
geometry_msgs::msg::PoseStamped | dock_pose_ |
nav2::Subscription< sensor_msgs::msg::JointState >::SharedPtr | joint_state_sub_ |
std::vector< std::string > | stall_joint_names_ |
double | stall_velocity_threshold_ |
double | stall_effort_threshold_ |
bool | is_stalled_ |
bool | use_external_detection_pose_ |
double | external_detection_timeout_ |
tf2::Quaternion | external_detection_rotation_ |
double | external_detection_translation_x_ |
double | external_detection_translation_y_ |
std::shared_ptr< PoseFilter > | filter_ |
double | docking_threshold_ |
std::string | base_frame_id_ |
double | staging_x_offset_ |
double | staging_yaw_offset_ |
nav2::LifecycleNode::SharedPtr | node_ |
std::shared_ptr< tf2_ros::Buffer > | tf2_buffer_ |
![]() | |
std::string | name_ |
DockDirection | dock_direction_ {DockDirection::UNKNOWN} |
bool | rotate_to_dock_ {false} |
Additional Inherited Members | |
![]() | |
using | Ptr = std::shared_ptr< NonChargingDock > |
![]() | |
using | Ptr = std::shared_ptr< ChargingDock > |
Definition at line 35 of file simple_non_charging_dock.hpp.
|
virtual |
parent | pointer to user's node |
name | The name of this planner |
tf | A pointer to a TF buffer |
Implements opennav_docking_core::NonChargingDock.
Definition at line 24 of file simple_non_charging_dock.cpp.
|
virtual |
Method to obtain the refined pose of the dock, usually based on sensors.
pose | The initial estimate of the dock pose. |
frame | The frame of the initial estimate. |
Implements opennav_docking_core::NonChargingDock.
Definition at line 172 of file simple_non_charging_dock.cpp.
|
virtual |
Method to obtain the dock's staging pose. This method should likely be using TF and the dock's pose information to find the staging pose from a static or parameterized staging pose relative to the docking pose.
Implements opennav_docking_core::NonChargingDock.
Definition at line 144 of file simple_non_charging_dock.cpp.
|
virtual |
Have we made contact with dock? This can be implemented in a variety of ways: by establishing communications with the dock, by monitoring the the drive motor efforts, etc.
NOTE: this function is expected to return QUICKLY. Blocking here will block the docking controller loop.
Implements opennav_docking_core::NonChargingDock.
Definition at line 241 of file simple_non_charging_dock.cpp.