Apollo: Can we run and test canbus module in docker container?

Created on 19 Jun 2018  路  9Comments  路  Source: ApolloAuto/apollo

Hi Apollo developers, is there a way to test the message subscription and processing (e.g., Canbus::OnControlCommand) in canbus module in Apollo's docker container, rather than really installing a CAN card? Currently, when I start it while replaying the demo bag, it will return the error "Failed to create can client" at this line within its Init() function.

Canbus Question

Most helpful comment

Change configuration parameters in canbus_conf.pb.txt for canbus so it initializes a fake_can_client instance. You can take a look of code under modules/drivers/canbus/canclient/fake. I never did it myself but that should be the way.

All 9 comments

Change configuration parameters in canbus_conf.pb.txt for canbus so it initializes a fake_can_client instance. You can take a look of code under modules/drivers/canbus/canclient/fake. I never did it myself but that should be the way.

@jilinzhou Thanks very much for your information! I will give a try following your suggestion.

@jilinzhou Your idea actually works to resolve the previous error! However, it currently gets stuck at vehicle_controller_->Start() inside Canbus::Start(), with error "ChassisDetail has NO eps" that occurs within LincolnController::CheckChassisError(). Because I am running canbus module in the docker, message_manager_->GetSensorData(&chassis_detail) will not set the correct ChasissDetail info for chassis_detail variable.
To Apollo developers: is it possible to provide some sample ChassisDetail messages that we can use to test the canbus module in a docker environment?

@hongkedavid:

It should be a config option (in one config file) to disable chassisDetails msg if I remember correctly. I don't have access to the code now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BenBaek picture BenBaek  路  3Comments

zmsunnyday picture zmsunnyday  路  3Comments

YaoQii picture YaoQii  路  3Comments

Wsine picture Wsine  路  3Comments

c-xyli picture c-xyli  路  3Comments