Finding it difficult to integrate my Physical robot with the Open-RMF software (#593)

Posted by @CreativeInterested:

Hi, I am currently using ROS2 Humble, Ubuntu 22.04, and I am trying to integrate my physical robot, The Originbot, with the Open-RMF system. I have tried to adapt the code from unit 6 of the Robot Fleet Management ROS2 Humble course in TheConstruct, but I am getting some errors when I run the fleet_adapter.py file. The first one is the one below:

Coordinate transformation error: 40041472014.35689
RMF to Robot transform:
rotation:0.1669748345397551
scale:22436.581919543834
trans:[-144220.278841231, 26674.508565925025]
Robot to RMF transform:
rotation:-0.16697483453975506
scale:6.903932766499679e-06
trans:[5.659233432489587, -5.09914031887319]

The second error is that the robot is not able to appear in the RMF Panel once all the necessary commands are launched and run, and the system is not able to recognise that the robot exists. The ones below are the links to the gists containing all the codes, as well as the commands I used to launch and run:

(rmf_to_nav.py): rmf_to_nav.py code (for rmf physical robot integration) · GitHub
(RobotClientAPI.py): RobotClientAPI.py code (for rmf physical robot integration) · GitHub
(RobotCommandHandle.py): RobotCommandHandle.py code (for rmf physical robot integration) · GitHub
(robot_api_server_originbot.py): robot_api_server_originbot.py code (for rmf physical robot integration) · GitHub
(fleet_adapter.py): fleet_adapter.py code (for rmf physical robot integration) · GitHub
(adapters_rmf_only_launch.xml): adapters_rmf_only_launch.xml · GitHub
(originbot_config.yaml): originbot_config.yaml (for rmf physical robot integration) · GitHub

These are the commands that were launched and run:

ros2 run physical_rmf rmf_to_nav.launch.xml

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ros2 launch physical_rmf adapters_rmf_only.launch.xml 

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ros2 run physical_api robot_api_server_originbot 

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export NAV_GRAPH=~/rmf_ws/install/physical_rmf/share/physical_rmf/maps/lab07/nav_graphs/1.yaml
export CONFIG_FILE=~/rmf_ws/src/physical_rmf/adapter_config/originbot_config.yaml
ros2 run physical_api fleet_adapter -c $CONFIG_FILE -n $NAV_GRAPH 

Is someone aware of why this occurs and how to resolve it? Would be a great help.

Posted by @aaronchongth:

Hi @CreativeInterested! Based on fleet_adapter.py code (for rmf physical robot integration) · GitHub, the Coordinate transformation error: ... block is not an error, but rather it is telling you the mean squared error of the points after the transformation, which looks suspiciously large.

This may be due to a mistake made in defining the transformations in originbot_config.yaml (for rmf physical robot integration) · GitHub. This will most likely cause a robot to not be found anywhere near a navigation graph.

the system is not able to recognise that the robot exists

Please provide more information regarding what this means, any error logs might be helpful.

It looks like this is a custom fleet adapter written for the course. Unfortunately we do not have much knowledge or context of the course, especially when it comes to implementation decisions. It might be a more constructive discussion to resolve any outstanding issues if you can ping TheConstruct team to discuss here.

Posted by @CreativeInterested:

Hi, thank you for replying. So you are suggesting that it may be an indentation error of some sort? I can take a look at it. As for the robot not being recognised, it is because when I run the fleet_adapter.py, it keeps giving me the message saying, line 2 column 5 char or something of that sort, which probably means the robot is not recognised by the system. I tried starting the RMF Panel, but under the robots list, the robot is not there, and when I dispatch a task, I get an error message saying that there are no available robots to carry out the task.

However, based on these issues, do you have another method in mind that I can integrate RMF system in a more reliable way? It would be very helpful, given I have been spending a bit of time trying to solve these errors, and the fact that I am using ROS2 Humble Ubuntu 22.04. My physical robot is ROS2-based and is using the Humble Navigation stack. Furthermore, I can start a discussion in TheConstruct to let them know that I have started a discussion here. Thank you.