lgsvl / simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Other
2.29k stars 780 forks source link

How to change the car model into motorbike model for autodriving #469

Closed clouddd9 closed 4 years ago

clouddd9 commented 5 years ago

Hello, I'm a beginner and using lgsvl&apollo5.0 for autonomous driving simulation. However, there are some changes in my LAB's experiments. Our entity prototype is a motorbike, so I need to change the default model into motorbike model. And I find it extremely difficult to modify the simulator code. therefore I hope you could help me. Thank you very much!

Q1: Does lgsvl using canbus to control the car? (OR What type of message does apollo5.0 send to lgsvl via cyber_bridge to control the car in the simulator?) If so, does that mean I need to add a new canbus model of the motorbike in both apollo5.0 and lgsvl?

Q2:I've looked over the Jaguar2015XE in Unity3D, and I notice that I need to change the following scripts: /Components/VehicleActions /Components/VehicleDynamics /Controllers/VehicleController what else codes in lgsvl simulator should I change for using motorbike if I've got the motorbike models(lights and indicators are not necessary in our experiments)?

OutOfCage commented 5 years ago

I have done the work about car model. Let me try to answer.

clouddd9 commented 5 years ago

Thank you for your help!!! I've tried to edit my motorcycle in unity3D based on Jaguar2015XE following the steps #401 . image Do you mean that all I need to do are 1.adjusting the parameters of VehicleDynamics; 2.copy and adjust the Lightsgroup of Jaguar2015XE to my motorcycle model to avoid adjust the VeicleActions (which is the easiest way for me......); to match my motorcycle model? Besides, I've been confused about How does the canbus work with cyber_bridge. Here's my understanding:

the lgsvl simulator doesn't send the message of the type of the car model to Apollo5.0. It just sends normal canbus info and perception&localization messages to Apollo. It's in Apollo that we choose the type of car model and then Apollo makes planning based on the input messages(especially the corresponding vheicle prototype in /apollo5.0/modules/canbus/vehicle ). So if I want to make the autodriving simulation of my own motorcycle, I still need to create a motorcycle canbus prototype just like Lincoln, Lexus, gem and so on. (and, yes, another set of planning, control algorithms...But that's no the point now)

Am I wrong? Hope you can give me some advice, thank you!

OutOfCage commented 5 years ago