Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HandsomeAIccx opened this issue Nov 3, 2023 · 1 comment
Labels
Module: Canbus Indicates canbus module related issues

Comments

@HandsomeAIccx
Copy link

HandsomeAIccx commented Nov 3, 2023

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

  • OS Platform and Distribution and Hardware (Linux Ubuntu 20.04, orin):
  • Apollo installed from (source):
  • Apollo version (9.x_alpha):
@daohu527
Copy link
Contributor

daohu527 commented Nov 7, 2023

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.

--load_vehicle_class_name=LincolnVehicleFactory

The following code will automatically create a vehicle class based on the VehicleFactory name.

auto vehicle_object = loader.CreateClassObj<AbstractVehicleFactory>(
FLAGS_load_vehicle_class_name);
if (!vehicle_object) {
AERROR << "Failed to create the vehicle factory: "
<< FLAGS_load_vehicle_class_name;
return false;
}

@daohu527 daohu527 added the Module: Canbus Indicates canbus module related issues label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Canbus Indicates canbus module related issues
Projects
None yet
Development

No branches or pull requests

2 participants