Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Speed Limit Requests #222

15 changes: 15 additions & 0 deletions rmf_fleet_adapter_python/src/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "rmf_traffic_ros2/Time.hpp"
#include "rmf_fleet_adapter/agv/Adapter.hpp"
#include "rmf_fleet_adapter/agv/FleetUpdateHandle.hpp"
#include "rmf_fleet_adapter/agv/test/MockAdapter.hpp"
#include "rmf_fleet_adapter_python/PyRobotCommandHandle.hpp"
#include <rmf_fleet_adapter/agv/Waypoint.hpp>
Expand Down Expand Up @@ -322,6 +323,12 @@ PYBIND11_MODULE(rmf_adapter, m) {
.def("open_lanes",
&agv::FleetUpdateHandle::open_lanes,
py::arg("lane_indices"))
.def("limit_lane_speeds",
&agv::FleetUpdateHandle::limit_lane_speeds,
py::arg("requests"))
.def("remove_speed_limits",
&agv::FleetUpdateHandle::remove_speed_limits,
py::arg("requests"))
.def("set_task_planner_params",
[&](agv::FleetUpdateHandle& self,
battery::BatterySystem& b_sys,
Expand Down Expand Up @@ -504,6 +511,14 @@ PYBIND11_MODULE(rmf_adapter, m) {
return self.errors();
});

// SPEED LIMIT REQUEST ===============================================
py::class_<agv::FleetUpdateHandle::SpeedLimitRequest>(
m_fleet_update_handle, "SpeedLimitRequest")
.def(py::init<std::size_t,
double>(),
py::arg("lane_index"),
py::arg("speed_limit"));

// EASY TRAFFIC LIGHT HANDLE ===============================================
py::class_<agv::Waypoint>(m, "Waypoint")
.def(py::init<std::string,
Expand Down
Loading