Program Listing for File non_charging_dock.hpp
↰ Return to documentation for file (include/opennav_docking_core/non_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__NON_CHARGING_DOCK_HPP_
#define OPENNAV_DOCKING_CORE__NON_CHARGING_DOCK_HPP_
#include <string>
#include <memory>
#include "opennav_docking_core/charging_dock.hpp"
namespace opennav_docking_core
{
class NonChargingDock : public ChargingDock
{
public:
using Ptr = std::shared_ptr<NonChargingDock>;
virtual ~NonChargingDock() {}
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;
bool isCharging() final
{
throw std::runtime_error("This dock is not a charging dock!");
}
bool disableCharging() final
{
throw std::runtime_error("This dock is not a charging dock!");
}
bool hasStoppedCharging() final
{
throw std::runtime_error("This dock is not a charging dock!");
}
bool isCharger() final {return false;}
};
} // namespace opennav_docking_core
#endif // OPENNAV_DOCKING_CORE__NON_CHARGING_DOCK_HPP_