Posted by @cwrx777:
Hi,
Consider the map below.
I notice that the door request is only published when the robot is at position door_in or door_out.
When the robot is moving from pos_A to pos_C, is it possible so that the door open request can be sent earlier, e.g. when the robot is at pos_A or pos_B?
Chosen answer
Answer chosen by @cwrx777 at 2022-09-08T23:54:16Z.
Answered by @mxgrey:
I have a grand vision for the future of RMF that would allow exactly what you’re describing. The idea is once we have builtin support for freespace planning in the traffic system, we could use the traffic editor to draw “trigger zones” that will trigger customizable behavior when a robot enters/exits. That feature would allow you to draw a 2D zone on the map that will have the fleet adapter request the door to open as soon as the robot crosses into the zone.
Unfortunately I can’t offer any timeline for that feature since we don’t have a source of funding to develop it yet, and we have no indication at the moment of when anyone might be interested in funding it. Anyone who might be interested in funding or contributing towards these features is always welcome to contact us about engaging on it.
In the meantime, it should be possible for you to implement something similar within your own fleet adapter integration. You can have your fleet adapter integration track the position of the robot, and if you detect that it’s “close enough” to a door, then you can publish a DoorRequest
to the adapter_door_requests
topic. The robot will still stop for a moment at door_in
to make sure that the door is open before proceeding, but that should only take a fraction of a second if your network is decent.
If you use that method, I suggest making sure that requester_id
matches what the fleet adapter is using for your robot, which will be fleet_name/robot_name
. Using the correct requester_id
for the robot means that the task management system will automatically clear your DoorOpen request once the robot reaches door_out
. If you use a different requester_id
, then your fleet adapter integration will need to clear the request itself by sending a DoorClose request with the same requester_id
once the robot has moved far enough away from the door.
If there’s any possibility that your fleet adapter will send a DoorOpen request but the robot does not pass through the door, then you should make sure to send DoorClose requests when the robot has moved far enough away.