Robot Integration (#623)

Posted by @Cavalletta98:

Hi all, we are thinking to integrate some robots from PUDU robotics. We need help to understand which is the best integration based on their API. By reading their documentations seems that there API to retrieve robot position on the map but there is no possibility to send to the robot [x,y,theta]. In any case, i leave here the documentation link to get some help from the community: Refer to Open Platform API.Thanks

Posted by @xiyuoh:

Hi @Cavalletta98 ! After skimming through the docs via the link you’ve provided, it seems like you’d be able to make calls to a target position, e.g. table1, under the section Call the machine.

In general a workaround for the lack of coordinates is to name every single waypoint in your navigation graph. Then, in your fleet adapter, when RMF issues a navigation command, you can relay the Destination name to a position with the same name on the robot.

For example, you have a path from chair1 to table1 that looks like this:

               [chair1]
                  |
                  |
                  |
[table1] ----------

You can create the same map in RMF and provide all intermediate waypoints with a name:

               [chair1]
                  |
                  |
                  |
[table1] ------ [wp_0] 

You’ll have to make sure that all waypoints in RMF are reflected with the same name and approximate position on the robot. E.g. wp_0 will have to be added to the robot as well.

With that, the navigate callback in your fleet adapter may look something like this:

def navigate(self, destination, execution):
    self.execution = execution
    map_name = destination.map
    target_point = destination.name
    # Some logic to POST map_name and target_point to robot

Hope this helps! Let me know if I’m misunderstanding anything.

Posted by @Cavalletta98:

Hi @xiyuoh , thanks a lot for the clarification. Basically, i have to put the same waypoints name either on the robot side and on navigation graph, right? Then i will implement the navigate function as you explain. Is it all correct?

Posted by @xiyuoh:

Yup that’s right, both RMF and the robot should have the same waypoints, including intermediate ones. Feel free to ask more integration questions as they come up.

Posted by @Cavalletta98:

Thanks @xiyuoh .I have a doubt about this workaround. Does the robot will stop in every waypoints creating a no smooth navigation?

Posted by @xiyuoh:

With or without the workaround, we generally add intermediate waypoints in RMF navigation graphs. There are a few reasons for that:

  • Waypoints and lanes are how RMF understands the site and where robots are allowed to travel on
  • Providing intermediate waypoints helps to manage multiple robots within the site and facilitate traffic deconfliction
  • Creating different routes through waypoints/lanes allow RMF to propose alternate paths for your robot to go from point A to B
  • Waypoints on either side of doors and lifts are essential to signal to RMF that a robot is ready/done travelling through these building infrastructure

Taking the gifs in rmf_demos Office world for example, you’ll see that other than target locations, there are several waypoints around for the robots to turn and stop in place. This will enable RMF to have a robot_X wait in place on a waypoint while another robot_Y passes by, or even provide completely different routes so the robots wouldn’t come into conflict. You can imagine if the Office world only consists of target locations like coe and hardware_2 (inside the rooms) without intermediate waypoints, the robots wouldn’t have much space to move around.

If you’re working with AMRs like Pudu, you wouldn’t need an intermediate waypoint in every corner of your map since the robot would be able to navigate around obstacles. But it’d be good to scatter some throughout the navigation graph for reasons stated above. It helps to use intermediate waypoints to give RMF more granular control of the robots, since RMF won’t be able to dictate the exact path taken by the AMR when commanding it to go to a target position.

Posted by @Cavalletta98:

Hi @xiyuoh , i understand. Thank you so much