How to change path scenario in Virtual Vehicle Composer?
9 次查看(过去 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.
0 个评论
采纳的回答
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
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
2024-8-29
Hey George.
You can refer to these examples -
- Build Pikes Peak RoadRunner 3D Scene Using RoadRunner HD Map - MATLAB & Simulink (mathworks.com)
- Follow Waypoints Around Oval Track - MATLAB & Simulink (mathworks.com)
- 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.
- Coordinate Systems in Vehicle Dynamics Blockset - MATLAB & Simulink (mathworks.com)
- What Is a RoadRunner Pose Matrix? - MATLAB & Simulink (mathworks.com)
I hope this helps you get started!
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!