-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No distortion_model and D param in /pepper_robot/camera/depth/camera_info #50
Comments
Hi, I am not sure why, but exactly these two lines for the distortion model are commented in https://github.com/ros-naoqi/naoqi_driver/blob/master/src/converters/camera_info_definitions.hpp#L176 This can definitely be a PR. |
Thank you so much! I uncommented the 6 lines for the distortion and recompiled it. Then it finally worked! |
@yoshimalucky , any news on that ? thx. |
After I uncomment and tried to recompile, the following mistake arises. Any reasons why? |
Since you're using melodic, my guess would be that it's a boost related issue. Take a look at this version of the file here (softbank robotics research's fork), this should allow you to get rid of boost for that file, and include the distortion model. What we use in the file is pretty old (for retro-compatibility purposes), you could consider using the functionalities of the standard lib instead. |
Thanks again. @mbusy I did change it. No error but the issue is still the same. |
@dac31415, that's weird, the distortion model and D should be specified in the camera_info (checkout these lines, that's for the VGA quality but it's also enabled for QVGA and QQVGA) How did you launch the driver ? |
@mbusy the problem might be when with the pepper bringup package. |
Thanks @dac31415. We probably won't be investigating the errors in the pepper bringup package, we want to focus the maintaining efforts on the driver. That being said, PRs would definitely be considered / reviewed / merged |
Ok, thanks @mbusy. I'll keep looking on how to solve it. The naoqi_driver is working fine for image viewing but is when I try to convert the data from the cameras. (depth to point cloud) as I haven't been able to do it. So I don't know if it's the pepper_bringup or I am missing some other dependencies or packages. |
Hi @dac31415 , Did you solve this issue(depth to point cloud)? |
@UdayRockzz follow steps from @mbusy (softbank robotics research's fork) |
I have exactly the same problem. In addition I have uncommented those lines in camer_info_definitions.hpp and corrected the resulting error adding ".convert_to_container<std::vector >();" to all cam_info_msg.D lines like how it has been done for front and bottom camera in the same file. I compile it and all seems work. When I do depth camera calibration following Pepper/Tutorial/Calibration guide to generate .yaml file and then use depthimage_to_laserscan ros package, the front and bottom camera works but the depth camera can't calibrate so I can't use depthimage_to_laserscan. Can you provide me any suggestion on how fix it? Am I doing it wrong? This is my camera_info_definitions.hpp without the correction that I did: #include <sensor_msgs/CameraInfo.h> namespace naoqi /**
inline sensor_msgs::CameraInfo createCameraInfoTOPQVGA() cam_info_msg.header.frame_id = "CameraTop_optical_frame"; cam_info_msg.width = 320; cam_info_msg.distortion_model = "plumb_bob"; cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }}; cam_info_msg.P = boost::array<double, 12>{{ 272.423675537109, 0, 141.131930791285, 0, 0, 273.515747070312, 107.391746054313, 0, 0, 0, 1, 0 }}; return cam_info_msg; inline sensor_msgs::CameraInfo createCameraInfoTOPQQVGA() cam_info_msg.header.frame_id = "CameraTop_optical_frame"; cam_info_msg.width = 160; cam_info_msg.distortion_model = "plumb_bob"; cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }}; cam_info_msg.P = boost::array<double, 12>{{ 137.541534423828, 0, 76.3004646597892, 0, 0, 136.815216064453, 59.3909799751191, 0, 0, 0, 1, 0 }}; return cam_info_msg; /**
inline sensor_msgs::CameraInfo createCameraInfoBOTTOMQVGA() cam_info_msg.header.frame_id = "CameraBottom_optical_frame"; cam_info_msg.width = 320; cam_info_msg.distortion_model = "plumb_bob"; cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }}; cam_info_msg.P = boost::array<double, 12>{{ 273.491455078125, 0, 155.112454709117, 0, 0, 275.743133544922, 126.057357467223, 0, 0, 0, 1, 0 }}; return cam_info_msg; inline sensor_msgs::CameraInfo createCameraInfoBOTTOMQQVGA() cam_info_msg.header.frame_id = "CameraBottom_optical_frame"; cam_info_msg.width = 160; cam_info_msg.distortion_model = "plumb_bob"; cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }}; cam_info_msg.P = boost::array<double, 12>{{ 138.705535888672, 0, 77.2544255212306, 0, 0, 138.954086303711, 58.7000861760043, 0, 0, 0, 1, 0 }}; return cam_info_msg; /**
inline sensor_msgs::CameraInfo createCameraInfoDEPTHQVGA() cam_info_msg.header.frame_id = "CameraDepth_optical_frame"; cam_info_msg.width = 320; //cam_info_msg.distortion_model = "plumb_bob"; cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }}; cam_info_msg.P = boost::array<double, 12>{{ 525/2.0f, 0, 319.500000/2.0f, 0, 0, 525/2.0f, 239.5000000000/2.0f, 0, 0, 0, 1, 0 }}; return cam_info_msg; inline sensor_msgs::CameraInfo createCameraInfoDEPTHQQVGA() cam_info_msg.header.frame_id = "CameraDepth_optical_frame"; cam_info_msg.width = 160; //cam_info_msg.distortion_model = "plumb_bob"; cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }}; cam_info_msg.P = boost::array<double, 12>{{ 525/4.0f, 0, 319.500000/4.0f, 0, 0, 525/4.0f, 239.5000000000/4.0f, 0, 0, 0, 1, 0 }}; return cam_info_msg; /**
inline sensor_msgs::CameraInfo createCameraInfoDEPTH720P() inline sensor_msgs::CameraInfo createCameraInfoDEPTHQ720P() inline sensor_msgs::CameraInfo createCameraInfoDEPTHQQ720P() inline sensor_msgs::CameraInfo createCameraInfoDEPTHQQQ720P() inline sensor_msgs::CameraInfo createCameraInfoDEPTHQQQQ720P() // Complete methods for stereo image parameteres inline sensor_msgs::CameraInfo createCameraInfoStereoQ720PX2() inline sensor_msgs::CameraInfo createCameraInfoStereoQQ720PX2() inline sensor_msgs::CameraInfo createCameraInfoStereoQQQ720PX2() inline sensor_msgs::CameraInfo createCameraInfoStereoQQQQ720PX2() } // camera_info_definitions #endif |
The values for distortion_model and D is blank in /pepper_robot/camera/depth/camera_info like below:
distortion_model:
D:
These two are supposed to be:
distortion_model: plumb_bob
D: [0.0, 0.0, 0.0, 0.0, 0.0]
Is it difficult to publish these values?
Because of this, I can not use depthimage_to_laserscan.
The text was updated successfully, but these errors were encountered: