필터 지우기
필터 지우기

Reverse driving in RoadRunner

조회 수: 13 (최근 30일)
Pushpa Raj
Pushpa Raj 2023년 10월 20일
답변: Pushpa Raj 2023년 11월 10일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Design and Simulate Scenarios에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by