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.
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.
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.