Robot rotates in place despite the orientation was set in traffic editor (#574)

Posted by @piliwilliam0306:

Hi,

I’m trying to understand the behavior when orientation is set in the Traffic Editor.
My expectation is that when tinyRobot1 moves from blah2 to tinyRobot1_charger, it should move forward.
Similarly, I expected tinyRobot2 to move forward when traveling from tinyRobot2_charger to supplies.
However, instead of moving forward, the robot rotates in place and moves backward.
Is this behavior expected? If so, how can I configure it to meet my expectation?

Script I ran for tinyRobot1:
ros2 run rmf_demos_tasks dispatch_patrol -p blah1 blah2 -n 1 --use_sim_time

Video recording:
Screencast from 12-22-2024 02:44:56 PM.webm

Script I ran for tinyRobot2:
ros2 run rmf_demos_tasks dispatch_patrol -p supplies lounge -n 1 --use_sim_time

Video recording:
Screencast from 12-22-2024 03:34:42 PM.webm

Thanks!


Edited by @piliwilliam0306 at 2024-12-22T07:46:04Z

Posted by @Yadunund:

It is expected behavior depending on how you’ve setup your traffic lanes and configure the capability of the robots in your fleet.

Looking at the video you shared it looks live you’ve added an orientation constraints to the lane extending out of blah2. If I were to guess it be that the constraint added is backward which causes the robot to rotate.

Feel free to repoen this ticket if the issue persists after removing orientation constraints on lanes.