Fixed gazebo camera depth not aligned with lidar #434
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As also observed in that post, in simulation, it seems the
horizontal_fov
parameter ofrgbd_camera
gazebo's sensor is not applied correctly either to publishedcamera_info
or how the rgb/depth images are captured in the simulator.turtlebot4/turtlebot4_description/urdf/sensors/oakd.urdf.xacro
Lines 122 to 129 in 1d23084
It seems that we have to use original fov value
1.047
instead of1.25
(from this example) so that data published look fine. See comparison below.Type of change
How Has This Been Tested?
Commands used to test:
then add DepthCloud plugin in rviz2 to show camera point cloud, and set global fixed frame to
base_link
.With current value
1.25
, we can see that the point cloud generated from the camera's depth is not aligned with the lidar (robot is not moving):With the fix (setting value to
1.047
), the alignment is as good as we could expect. Here the same point of view than above with this PR: