introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
966 stars 557 forks source link

/voxel_cloud looking tilted #1052

Closed aravi-2001 closed 11 months ago

aravi-2001 commented 11 months ago

i read in another issue that /voxel_cloud uses the RGBD topics to make a cloud. For me that cloud is coming out to be a little skewed, hence the whole map looks strangely skewed. How can i verify if my input parameters are correct? I'm using RGBD camera Screenshot from 2023-10-18 10-34-45 from gazebo garden and receiving it in ros1 via the bridge.

matlabbe commented 11 months ago

If the point cloud is skewed, it looks like calibration parameter are wrong. What looks like the camera info topic?

aravi-2001 commented 11 months ago

this is the output:

header: seq: 837 stamp: secs: 1697640529 nsecs: 142438173 frame_id: "bluerov2/base_link/rgbd_camera" height: 720 width: 720 distortion_model: "plumb_bob" D: [0.0, 0.0, 0.0, 0.0, 0.0] K: [277.0, 0.0, 160.0, 0.0, 277.0, 120.0, 0.0, 0.0, 1.0] R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] P: [277.0, 0.0, 160.0, 0.0, 0.0, 277.0, 120.0, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 0 binning_y: 0 roi: x_offset: 0 y_offset: 0 height: 0 width: 0 do_rectify: False


even my rtabmap/cloud_map is coming empty, could camera_info be the same reason for it

matlabbe commented 11 months ago

What is the actual resolution of the rgb image? The camera info says 720x720, but cx/cy are wrong, they should be qround the half of the resolution, not 160 and 120. If there is nothing appearing on loop closure detection panel, the mapping node is not working, check the terminal for warnings.

aravi-2001 commented 11 months ago

yes, i increased the resolution, the original was 256, i changed it to 720 in the sdf

the terminal warnings look like this:

[ INFO] [1697641304.428494207]: Odom: quality=322, std dev=0.037289m|0.016851rad, update time=0.074814s [ INFO] [1697641304.716556198]: Odom: quality=302, std dev=0.071010m|0.014651rad, update time=0.082818s [ INFO] [1697641304.956128745]: Odom: quality=311, std dev=0.050619m|0.016851rad, update time=0.078620s [ WARN] (2023-10-18 11:01:45.089) SensorData.cpp:762::uncompressDataConst() Requested laser scan data, but the sensor data (15234) doesn't have laser scan. [ WARN] (2023-10-18 11:01:45.089) SensorData.cpp:762::uncompressDataConst() Requested laser scan data, but the sensor data (29713) doesn't have laser scan. [ WARN] (2023-10-18 11:01:45.130) Rtabmap.cpp:2922::process() Rejected loop closure 15234 -> 29713:

[ INFO] [1697641305.245070426]: Odom: quality=342, std dev=0.056821m|0.015492rad, update time=0.078233s [ INFO] [1697641305.418598746]: Odom: quality=330, std dev=0.088469m|0.017423rad, update time=0.073804s

matlabbe commented 11 months ago

You should adjust the camera calibration parameters if you change the resolution.

Rtabmap looks running. For the warnings about laserscan, I dont know what is your config, subscriptions... if it is from rtabmapviz, you may disable laserscan rendering under Preferences->3d Rendering panel