Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
Public Member Functions | |
SimpleChargingDock () | |
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 bool | isCharging () |
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... | |
virtual bool | disableCharging () |
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... | |
virtual bool | hasStoppedCharging () |
Similar to isCharging() but called when undocking. | |
![]() | |
virtual | ~ChargingDock () |
Virtual destructor. | |
virtual bool | isCharger () |
Gets if this is a charging-typed dock. | |
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::BatteryState >::SharedPtr | battery_sub_ |
bool | is_charging_ |
bool | use_battery_status_ |
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 | charging_threshold_ |
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< ChargingDock > |
Definition at line 35 of file simple_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::ChargingDock.
Definition at line 24 of file simple_charging_dock.cpp.
|
virtual |
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.
NOTE: this function is expected to return QUICKLY. Blocking here will block the docking controller loop.
Implements opennav_docking_core::ChargingDock.
Definition at line 295 of file simple_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::ChargingDock.
Definition at line 191 of file simple_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::ChargingDock.
Definition at line 163 of file simple_charging_dock.cpp.
|
virtual |
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.
NOTE: this function is expected to return QUICKLY. Blocking here will block the docking controller loop.
Implements opennav_docking_core::ChargingDock.
Definition at line 290 of file simple_charging_dock.cpp.
References isDocked().
Referenced by hasStoppedCharging().
|
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::ChargingDock.
Definition at line 260 of file simple_charging_dock.cpp.
Referenced by isCharging().