Implementing a right turn Driving Scenario in Simulink's Traffic Light Negotiation with Unreal Engine Visualization

1 view (last 30 days)
I have created a drivng scenario where the ego vehicle drives on the left hand side of the road (South African) and takes a right turn at the intersection. I did this by changing the referencePathsForUSCityBlock.mat and added a struct for the right hand side which contains the reference path, waypoints and curvature. When I run the simulation the vehicle keeps taking a sharp left turn just before the traffic light. When I use the drivingScenarioDesigner(scenario) the reference path and waypoints plotted are correct. Is there an issue with the curvature or is there something I need to change in one of the helperfunctions?
How can I configure the model to take a right turn as shown in the driving scenario below.
Another question I have is how to implement more than one radar detector into the model "Traffic Light Negotiation with Unreal Engine Visualization". Currently there is one radar and vision detection but how can I alter this?

Answers (1)

Yatharth
Yatharth on 11 Oct 2023
Hi Meg,
I understand that you have created a driving scenario where the ego vehicle drives on the left-hand side of the road and takes a right turn at the intersection. However, while running the simulation the vehicle takes a sharp left turn just before the traffic light.
If the ego vehicle is taking a sharp left turn just before the traffic light instead of a right turn, there could be a few possible issues to consider:
  1. Curvature: Make sure that the curvature values in the struct for the right-hand side reference path are correct. Double-check if the curvature values are consistent and appropriate for a right turn.
  2. Waypoints: Verify that the waypoints for the right-hand side reference path are correctly defined. Ensure that the waypoints guide the vehicle to take a right turn at the intersection.
  3. Lane configuration: Confirm that the lane configuration is set up properly for the right-hand side. Ensure that the ego vehicle is in the correct lane to make a right turn.
  4. Intersection configuration: Check if the intersection is properly defined in the scenario. Verify that the intersection layout and traffic light positions are accurate.
Here are some links that might help you to double check the settings required as per your requirements.
If the problem still is still not resolved please attach your file so that it is easy to debug.
Regarding implementing more than one radar detector into the "Traffic Light Negotiation with Unreal Engine Visualization" model, you will need to modify the sensor configuration and data processing accordingly. Here are the general steps to follow:
  1. Add additional radar sensors: Modify the sensor configuration to include more radar sensors. You can specify their positions, orientations, and detection ranges.
  2. Process radar data: Update the data processing logic to handle the data from multiple radar sensors. You may need to modify the code that processes radar detections and integrates them with other sensor data.
  3. Fusion and decision-making: Adjust the fusion and decision-making algorithms to consider the detections from multiple radar sensors. You might need to update the code that combines information from different sensors and makes decisions based on the detected objects.
  4. Visualization: If you want to visualize the detections from multiple radar sensors, ensure that the visualization component can handle and display the data accordingly. You may need to modify the visualization code to accommodate the additional radar sensors.
Remember to thoroughly test and validate your modifications to ensure the desired behaviour and accuracy of the model.
I hope this helps.

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!