Create an RMF map that has a different angle than the MIR maps
Example MiR map
Example RMF map
Set the proper transforms in fleet adapter the config file
Run the MIR fleet adapter with the Open-RMF core
The robot should move to the closest point
It is possible to successfully sending the robot to RMF waypoints, proving the map transform is right
Expected behavior
The robot should not moved when idle.
Actual behavior
When idle, every 30 seconds or so, the robot will rotate slightly. Looking at the mission send to the MiR, it can be seen that the robot is receiving its orientation increased by some value.
Tell us about your environment
Steps to reproduce issue
Expected behavior
Actual behavior
https://user-images.githubusercontent.com/43391966/235648292-41050108-cf43-4bb7-aaa0-1259d0b317d5.mp4
Are you willing to make a PR? If yes, add the PR link here.
The problem seems to come from these lines: https://github.com/osrf/fleet_adapter_mir/blob/23f96d16eb11fb2fef7cc422a4f9905d3cec4896/fleet_adapter_mir/MiRCommandHandle.py#L412-L432
To transform the robot orientation from RMF to MiR, the transform orientation should be added, not deducted (since it the transform from RMF to MiR already). https://github.com/osrf/fleet_adapter_mir/blob/23f96d16eb11fb2fef7cc422a4f9905d3cec4896/fleet_adapter_mir/MiRCommandHandle.py#L420
I will open a PR with a fix very soon.