15 #ifndef OPENNAV_DOCKING_CORE__NON_CHARGING_DOCK_HPP_
16 #define OPENNAV_DOCKING_CORE__NON_CHARGING_DOCK_HPP_
21 #include "opennav_docking_core/charging_dock.hpp"
22 #include "nav2_ros_common/tf2_factories.hpp"
25 namespace opennav_docking_core
35 using Ptr = std::shared_ptr<NonChargingDock>;
48 const nav2::LifecycleNode::WeakPtr & parent,
49 const std::string & name, nav2::TransformBuffer::SharedPtr tf) = 0;
75 const geometry_msgs::msg::Pose & pose,
const std::string & frame) = 0;
82 virtual bool getRefinedPose(geometry_msgs::msg::PoseStamped & pose, std::string
id) = 0;
104 throw std::runtime_error(
"This dock is not a charging dock!");
118 throw std::runtime_error(
"This dock is not a charging dock!");
126 throw std::runtime_error(
"This dock is not a charging dock!");
Abstract interface for a charging dock for the docking framework.
Abstract interface for a non-charging dock for the docking framework.
virtual ~NonChargingDock()
Virtual destructor.
virtual void deactivate()=0
Method to deactivate Behavior and any threads involved in execution.
bool disableCharging() final
Undocking while current is still flowing can damage a charge dock so some charge docks provide the ab...
bool isCharger() final
Gets if this is a charging-typed dock.
virtual bool getRefinedPose(geometry_msgs::msg::PoseStamped &pose, std::string id)=0
Method to obtain the refined pose of the dock, usually based on sensors.
virtual bool startDetectionProcess()=0
Start any detection pipelines required for pose refinement.
virtual geometry_msgs::msg::PoseStamped getStagingPose(const geometry_msgs::msg::Pose &pose, const std::string &frame)=0
Method to obtain the dock's staging pose. This method should likely be using TF and the dock's pose i...
virtual void activate()=0
Method to active Behavior and any threads involved in execution.
virtual bool isDocked()=0
Have we made contact with dock? This can be implemented in a variety of ways: by establishing communi...
bool hasStoppedCharging() final
Similar to isCharging() but called when undocking.
virtual void configure(const nav2::LifecycleNode::WeakPtr &parent, const std::string &name, nav2::TransformBuffer::SharedPtr tf)=0
bool isCharging() final
Are we charging? If a charge dock requires any sort of negotiation to begin charging,...
virtual bool stopDetectionProcess()=0
Stop any detection pipelines running for pose refinement.
virtual void cleanup()=0
Method to cleanup resources used on shutdown.