I’m working with the RMF (Robot Management Framework) and implementing a custom fleet adapter using Python.
During task execution, I would like to retrieve the speed limit associated with the traffic lane the robot is about to follow. In the navigate() function of the fleet adapter, the destination object includes a speed_limit field, but it always returns None.
Here is a simplified version of the code:
def navigate(self, destination, execution):
self.execution = execution
if destination.dock is not None:
self.node.get_logger().info(f'Commanding [{self.name}] to dock at {destination.dock}')
self.update_handle.more().log_info(f"Commanding [{self.name}] to dock at {destination.dock}")
return self.perform_docking(destination)
self.node.get_logger().info(f'Commanding [{self.name}] to navigate to {destination.position} on map [{destination.map}]')
self.update_handle.more().log_info(f"Commanding [{self.name}] to navigate to {destination.position} on map [{destination.map}]")
return self.api.navigate(destination.position, destination.map, destination.speed_limit)
I have a few questions:
I know that destination.speed_limit
should not be None
, but in my case it always is. How can I make sure that this field is properly populated with the speed limit defined in the navigation graph?
How can I access the actual speed_limit defined in the navigation graph (nav_graph) for the lane?
Is there an alternative method or recommended way to retrieve lane-specific parameters like speed_limit from within the fleet adapter?
I’m using ROS 2 Jazzy, running on Ubuntu 24.04.2 LTS, and writing the adapter in Python.
Thanks in advance for your help!