How to change path scenario in Virtual Vehicle Composer?

13 次查看(过去 30 天)
Hello, I am developing some control logic in Virtual Vehicle Composer (VVC). There are some example scenarios like the one below. However, when I use the "Double lane change" scenario, the steering response is a bit weird (too sudden compared to other simulations such as CarSim). So, I want to know how to change the scenario or manually replace the driver model.
I tried once, but it was difficult to consider the related signals from other vehicles. If anyone has attempted this or if I could get some help regarding this, I would appreciate it.

采纳的回答

Mike Sasena
Mike Sasena 2024-7-26
Hi JGP,
Yes, you're able to customize the models generated by the Virtual Vehicle Composer. There are lots of things you could do to tailor the model to your needs, but I'll give you a few ideas to get you started.
If you want to replace the driver model, you could select the "Open Loop" option by double-clicking on the driver block mask. This will add 4 inports where you can directly specify the steer, accel, brake and gear commands. That would let you bring in your own driver model that behaves the way you'd like.
In a similar way, you could double-click on the Scenarios subsystem and turn on the external inputs for driver reference and driver commands. This lets you override our scenario with your own.
To create your own path for the vehicle to follow, check out the "Follow Waypoints Around Oval Track" example. Hopefully that should give you a few ideas of how to customize the model to better suit your application.
  2 个评论
George Jaeger
George Jaeger 2024-8-26
Hi there!
Could you please provide some recommendations about adding my custom scenario to Virtual Vehicle Composer?
I have an idea for building my scenario using GPS data in RoadRunner.
Is it possible?
Abhisek Roy
Abhisek Roy 2024-8-29
Hey George.
You can refer to these examples -
  1. Build Pikes Peak RoadRunner 3D Scene Using RoadRunner HD Map - MATLAB & Simulink (mathworks.com)
  2. Follow Waypoints Around Oval Track - MATLAB & Simulink (mathworks.com)
  3. Overview of Simulating RoadRunner Scenarios with MATLAB and Simulink - MATLAB & Simulink (mathworks.com)
The first example shows you how to create a RoarRunner scene from GPS coordinates. The third example talks about integrating RoadRunner scenarios and Simulink model. The second example shows how to implement waypoint tracking. You can integrate these three examples.
Another point to keep in mind is the coordinate systems used by RoadRunner and Vehicle Dynamics Blockset.
I hope this helps you get started!

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by