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

Feature/pybind11 experimental lift entry watchdog #96

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion rmf_fleet_adapter_python/src/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,28 @@ PYBIND11_MODULE(rmf_adapter, m) {
return self.unstable().get_participant();
},
py::return_value_policy::reference_internal,
"Experimental API to access the schedule participant");
"Experimental API to access the schedule participant")
.def("set_unstable_lift_entry_watchdog",
[&](agv::RobotUpdateHandle& self,
agv::RobotUpdateHandle::Unstable::Watchdog watchdog,
rmf_traffic::Duration wait_duration)
{
self.unstable().set_lift_entry_watchdog(watchdog, wait_duration);
},
py::arg("watchdog"),
py::arg("wait_duration") = std::chrono::seconds(10),
"Experimental API to set the lift entry watchdog");

auto m_robot_update_handle = m.def_submodule("robot_update_handle");

py::enum_<agv::RobotUpdateHandle::Unstable::Decision>(
m_robot_update_handle, "Decision")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can explicitly mention this as unstable, or create an unstable def_submodule.

.value("Undefined",
agv::RobotUpdateHandle::Unstable::Decision::Undefined)
.value("Clear",
agv::RobotUpdateHandle::Unstable::Decision::Clear)
.value("Crowded",
agv::RobotUpdateHandle::Unstable::Decision::Crowded);

// FLEETUPDATE HANDLE ======================================================
py::class_<agv::FleetUpdateHandle,
Expand Down