Apollo Autonomous Driving Development Notes 43 - Compilation error 'this' argument discards qualifiers [-fpermissive]
The compilation error is as follows:
error: passing ‘const movex::perception::onboard::Yolov8PerceptionComponent’ as ‘this’ argument discards qualifiers [-fpermissive]
876 | int ret=push_data(“input_img”, output_image, ms);
Related to const modifier
The problem I encountered was in a function decorated with const as follows
void Yolov8Visualize(const camera::CameraFrame& frame) const;
Another function is called.
Here you need to change the function to
void Yolov8Visualize(const camera::CameraFrame& frame) ;
That’s it.