Project Error "'CameraInfo' object has no attribute 'encoding' "

Hello Everyone,

I am doing the line following part in the Aibo project and encounter an error saying " ‘CameraInfo’ object has no attribute ‘encoding’ ". The error comes from line33 in the screenshot below. What I did is simply copying the follow_line_step_hsv.py from Unit 3: Vision Basics Follow Line and change the camera topic to /head_camera/rgb/camera_info with CameraInfo message. Thanks anyone who would help me out from this error!

Hi,

You have to use the image_raw, not the camera_info. That camera_cllback needs Image message st process images, an dthe camera info is not for that.

Thanks, that works. I also wonder if there is any procedures to pick the lower and upper RGB color range for white color? I know R:255, G:255, B:255 is for standard white color but not sure what would be a good range for white color.

Hi,

If you mean that you want to track the white color, that depends a lot on the lighting conditions and the algorithm you are using. Its more an experimental thing, change the range and see when your tracker gets good results.