Skip to content

Commit

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

Signed-off-by: Pranay Shirodkar <[email protected]>

* add continuous checker option for dynamic obstacles

Signed-off-by: Pranay Shirodkar <[email protected]>

* refactor Lane Close and Open msg building

Signed-off-by: Pranay Shirodkar <[email protected]>

* add speed limits

Signed-off-by: Pranay Shirodkar <[email protected]>

* Fix style

Signed-off-by: Yadunund <[email protected]>

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

Signed-off-by: Yadunund <[email protected]>

Signed-off-by: Pranay Shirodkar <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Co-authored-by: Yadunund <[email protected]>
Co-authored-by: Yadunund <[email protected]>
  • Loading branch information
3 people committed Mar 16, 2024
1 parent 1e73cac commit 435b0ba
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 435b0ba

Please sign in to comment.