apollo
apollo copied to clipboard
How Fusion_conmponet gets target object data?
In the code ,no related reader functions are seen,and how does it get the target data
https://github.com/ApolloAuto/apollo/blob/master/modules/perception/onboard/component/fusion_component.cc#L54
bool FusionComponent::Proc(const std::shared_ptr<SensorFrameMessage>& message) {
if (message->process_stage_ == ProcessStage::SENSOR_FUSION) {
return true;
}
When the fusion module is started, the proc function always waits for the message to come in. Fusion module gets data from SensorFrameMessage. SensorFrameMessage comes from all sensor perception result.
https://github.com/ApolloAuto/apollo/blob/master/modules/perception/onboard/component/fusion_component.cc#L54
bool FusionComponent::Proc(const std::shared_ptr<SensorFrameMessage>& message) { if (message->process_stage_ == ProcessStage::SENSOR_FUSION) { return true; }
When the fusion module is started, the proc function always waits for the message to come in. Fusion module gets data from SensorFrameMessage. SensorFrameMessage comes from all sensor perception result.
Sorry ,I don't understand the Proc(const std::shared_ptr<SensorFrameMessage>& message) ,and Where is the "const std::shared_ptr<SensorFrameMessage>& message" comes from? I don't see reader function to subscribe to that msg in the code.
https://github.com/ApolloAuto/apollo/blob/master/modules/perception/onboard/component/fusion_component.h#34 FusionComponent is an inherited class of cyber::Component, it gets target data in the cyber framework.
Closed due to inactivity. If the problem persists, pls feel free to reopen it or create a new one and refer to it.