Reverse driving in RoadRunner

22 次查看(过去 30 天)
Hello community,
I am developing a parking scenario in RoadRunner in which the ego vehicle moves into the parking slot in reverse direction. I also need it follow a particular trajectory, however, it seems like RR is not supporting a reverse trajectory. Does anyone know how this can be achieved.
Note : I'm attaching screenshot from a video (for some reason I can't upload ) which shows a scenario in which the car moves on a trajectory and upon reaching the end uses -ve velocity to retract. I want to achieve just the second part, which is starting at a the end of trajectory and moving in reverse.

采纳的回答

Pushpa Raj
Pushpa Raj 2023-11-10
I've managed to find a solution, and I'm sharing it here in case others encounter a similar issue.
For the creation of a backward trajectory in RR, a feature called Actor Orientation must be enabled.
Actor Orientation symbol :
To do the enabling, a specific configuration should be modified while launching RR.
Apart from directly launching, The typical method to launch RoadRunner is by executing the command : AppRoadRunner.exe
To execute RoadRunner with Actor Orientation enabled, use the command : AppRoadRunner.exe --MW_RR_FEATURE_ActorOrientation=ON
If properly enabled, the Actor Orientation icon should be visible at the top, alongside other simulation icons. :
By selecting Actor Orientation and then choosing a vehicle, you can adjust the vehicle's direction in relation to the center waypoint.
This helps us align the vehicle the way we need.
So, if we set Actor Orientation - Heading Delta to 180, the waypoint will now face the backward direction of the car. This facilitates achieving reverse driving.

更多回答(1 个)

Rishi
Rishi 2023-10-27
Hi Pushpa,
I understand from your query that you’d like to drive your vehicle in reverse direction with a particular trajectory in RoadRunner.
The vehicle can be set to a negative speed to achieve this. This can be done by the following steps –
  • Add a vehicle to the scenario
  • Add a new waypoint to the path by right-clicking the lane on the trajectory you wish to drive your vehicle on
  • Open the Logic Editor
  • Add a new Action Phase by clicking ‘Add Action Phase After’
  • Set the Action Type to ‘Change Speed’
  • Set the Relative to parameter to ‘Absolute’ and change the velocity to a negative value of your choice.
The screenshots showing the steps are attached herewith.
You can find more about negative speed from the following documentation:
To read more about path following scenarios, you can refer to the following documentation:
You can also learn more about vehicle behaviour in RoadRunner from the below documentation:
Hope this helps.
  1 个评论
Pushpa Raj
Pushpa Raj 2023-11-10
Hi Rishi,
Thank you for your response. I get that we can make the vehicle go backward by giving it a negative velocity. However, the real challenge seems to be getting the trajectory right. The waypoint for the vehicle, the one at its starting point, always ends up facing the front of the vehicle. When we try to change the waypoint's direction, it ends up turning the whole vehicle.
In the image I shared, the red line coming from the center of the vehicle is where the waypoint is. When we try to rotate it, the entire vehicle moves, which isn't what we want when trying to point the waypoint to the back of the vehicle.

请先登录,再进行评论。

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by