Program Listing for File RobotCommandHandle.hpp
↰ Return to documentation for file (/tmp/ws/src/rmf_ros2/rmf_fleet_adapter/include/rmf_fleet_adapter/agv/RobotCommandHandle.hpp
)
/*
* Copyright (C) 2020 Open Source Robotics Foundation
*
* 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 RMF_FLEET_ADAPTER__AGV__ROBOTCOMMANDHANDLE_HPP
#define RMF_FLEET_ADAPTER__AGV__ROBOTCOMMANDHANDLE_HPP
#include <rmf_traffic/agv/Planner.hpp>
namespace rmf_fleet_adapter {
namespace agv {
//==============================================================================
class RobotCommandHandle
{
public:
using Duration = rmf_traffic::Duration;
using ArrivalEstimator =
std::function<void(std::size_t path_index, Duration remaining_time)>;
using RequestCompleted = std::function<void()>;
virtual void follow_new_path(
const std::vector<rmf_traffic::agv::Plan::Waypoint>& waypoints,
ArrivalEstimator next_arrival_estimator,
RequestCompleted path_finished_callback) = 0;
virtual void stop() = 0;
virtual void dock(
const std::string& dock_name,
RequestCompleted docking_finished_callback) = 0;
// Virtual destructor
virtual ~RobotCommandHandle() = default;
};
} // namespace agv
} // namespace rmf_fleet_adapter
#endif // RMF_FLEET_ADAPTER__AGV__ROBOTCOMMANDHANDLE_HPP