ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.25k stars 9.72k forks source link

Error in Vehicle Adaptation Process: Outdated Documentation and Registration Issues #15182

Open HandsomeAIccx opened 1 year ago

HandsomeAIccx commented 1 year ago

The specific problem is related to vehicle adaptation. The previous documentation (https://github.com/ApolloAuto/apollo/blob/266afbf68d83fa6fac7a812ff8a950223f5ab2c0/docs/technical_tutorial/apollo_vehicle_adaption_tutorial_cn.md) seems to be outdated, and the contents in the new version do not correspond to the old one. The main problem is that I cannot find where to register a new vehicle. For example, in the fifth step of the documentation, I kindly request assistance. Thank you. image

System information

daohu527 commented 1 year ago

Yes, here is the latest vehicle chassis registration method

1. Generate vehicle protocol

Generate vehicle protocol and place it in modules/canbus_vehicle like other vehicles

2. Set AbstractVehicleFactory

Set your new VehicleFactory in the following configuration file.

https://github.com/ApolloAuto/apollo/blob/a3c851fc5844e0684b9c5108231fcc2c15cebb8e/modules/canbus/conf/canbus.conf#L4

The following code will automatically create a vehicle class based on the VehicleFactory name. https://github.com/ApolloAuto/apollo/blob/a3c851fc5844e0684b9c5108231fcc2c15cebb8e/modules/canbus/canbus_component.cc#L58-L64