apollo icon indicating copy to clipboard operation
apollo copied to clipboard

how_to_add_a_new_vehicle.md does not coordinate with the current vehicle_control.cc file

Open hlchen1043 opened this issue 8 years ago • 3 comments

I'm trying to register a new vehicle in Apollo and it seems that the how-to tutorial does not coordinate with the current vehicle_control.cc file, as the file was updated this April, but the how-to file was last updated last July.

Also, I'm having the following question when registering for a new vehicle:

  1. Do I have to build a newvehicle controller class in the vehicle_controller.h file or I can just use the current class, if I'm not writing my own control algorithm?
  2. When I'm building the customized kernel, it seems that there are two "vehicles" registered, one is the lincon_MKZ, the other is the GEM vehicle, but in the dreamview I only saw one vehicle avaliable, that is the lincon_MKZ. Why is that happening?

Thank you!

hlchen1043 avatar Jun 11 '18 18:06 hlchen1043

Two types of cars are supported, but it does not mean you can see two vehicles in the dreamview. The vehicles in Apollo are those that can be enabled by Apollo. If you want to enable Apollo on your own vehicle other than GEM or Lincoln MKZ, you have to implement your own controller following the example of Lincoln and GEM, and register the controller in the controller factory.

jinghaomiao avatar Jun 13 '18 01:06 jinghaomiao

Dear Calvin, Thanks for your reply. Right now I have question with the tutorial now. In the tutorial when it says "implement the new controller" and "implement the new message manager". Does it mean that I have to write or edit the new message controller file and message manager file?

Also I see the following step as implement new factory class, register the new vehicle and update the config file. Does that mean with a single vehicle controller file and a message mananger file, I can register the vehicle after editing the abstract vehicle factory, vehicle_factory.cc and can_bus.conf file?

Thank you!

hlchen1043 avatar Jun 15 '18 15:06 hlchen1043

  1. You need to register your vehicle in vehicle_factory.cc
  2. The vehicle you see in dreamview is a folder in /modules/calibration/data which has nothing to do with the registered vehicle. The number of folders is the number of vehicles ——Reply reference comes from the Apollo developer community issue master contest https://apollo.auto/developer/questiondata_cn.html?target=681

apollodevcommunity avatar Feb 07 '21 06:02 apollodevcommunity