Skip to content

Commit

Permalink
Add Speed Limit Requests (#222) (#335)
Browse files Browse the repository at this point in the history
* add FleetUpdateHandle speed limit API to python bindings



* add continuous checker option for dynamic obstacles



* refactor Lane Close and Open msg building



* add speed limits



* Fix style



* Fix const correctness and do not pass unordered_map by ref to publisher

Signed-off-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Co-authored-by: Pranay Shirodkar <[email protected]>
  • Loading branch information
Yadunund and PranayShirodkar authored Mar 18, 2024
1 parent 1e73cac commit 1c26611
Showing 1 changed file with 15 additions and 0 deletions.
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 @@ -10,6 +10,7 @@
#include "rmf_traffic_ros2/Time.hpp"
#include "rmf_fleet_adapter/agv/Adapter.hpp"
#include "rmf_fleet_adapter/agv/EasyFullControl.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/Transformation.hpp>
Expand Down Expand Up @@ -391,6 +392,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 @@ -590,6 +597,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

0 comments on commit 1c26611

Please sign in to comment.