Program Listing for File charging_dock.hpp
↰ Return to documentation for file (include/opennav_docking_core/charging_dock.hpp
)
// Copyright (c) 2024 Open Navigation LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef OPENNAV_DOCKING_CORE__CHARGING_DOCK_HPP_
#define OPENNAV_DOCKING_CORE__CHARGING_DOCK_HPP_
#include <string>
#include <memory>
#include "rclcpp/rclcpp.hpp"
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_util/lifecycle_node.hpp"
#include "tf2_ros/buffer.h"
namespace opennav_docking_core
{
class ChargingDock
{
public:
using Ptr = std::shared_ptr<ChargingDock>;
virtual ~ChargingDock() {}
virtual void configure(
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent,
const std::string & name, std::shared_ptr<tf2_ros::Buffer> tf) = 0;
virtual void cleanup() = 0;
virtual void activate() = 0;
virtual void deactivate() = 0;
virtual geometry_msgs::msg::PoseStamped getStagingPose(
const geometry_msgs::msg::Pose & pose, const std::string & frame) = 0;
virtual bool getRefinedPose(geometry_msgs::msg::PoseStamped & pose, std::string id) = 0;
virtual bool isDocked() = 0;
virtual bool isCharging() = 0;
virtual bool disableCharging() = 0;
virtual bool hasStoppedCharging() = 0;
virtual bool isCharger() {return true;}
std::string getName() {return name_;}
protected:
std::string name_;
};
} // namespace opennav_docking_core
#endif // OPENNAV_DOCKING_CORE__CHARGING_DOCK_HPP_