Nav2 Navigation Stack - jazzy
jazzy
ROS 2 Navigation Stack
|
Public Member Functions | |
SimpleChargingDock () | |
Constructor. | |
virtual void | configure (const rclcpp_lifecycle::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 deactive 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. | |
std::string | getName () |
Protected Member Functions | |
void | jointStateCallback (const sensor_msgs::msg::JointState::SharedPtr state) |
Protected Attributes | |
rclcpp::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_ |
rclcpp::Subscription< sensor_msgs::msg::BatteryState >::SharedPtr | battery_sub_ |
bool | is_charging_ |
bool | use_battery_status_ |
rclcpp::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_ |
rclcpp_lifecycle::LifecycleNode::SharedPtr | node_ |
std::shared_ptr< tf2_ros::Buffer > | tf2_buffer_ |
![]() | |
std::string | name_ |
Additional Inherited Members | |
![]() | |
using | Ptr = std::shared_ptr< ChargingDock > |
Definition at line 34 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 23 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 274 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 170 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 142 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 269 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 239 of file simple_charging_dock.cpp.
Referenced by isCharging().