husarion / rosbot_ros

ROS packages for ROSbot 2, 2R and 2 PRO
122 stars 62 forks source link

Depth Camera Limit #77

Closed farishajdarpasic closed 7 months ago

farishajdarpasic commented 8 months ago

Hello. While I was working with depth images that I got from this robot in ROS, I realized, depth is limited to about 5m. Is there any way to make this limit larger (or make it limitless)? Orbec Astra camera is used (the one from the URDF file in repo, I did not change anything).

rafal-gorecki commented 8 months ago

Hello and sorry you had to wait so long for a reply.

If you are working with a physical camera, it is not possible to increase this range as much as you expect. The Astra camera is a fairly cheap depth camera, but its capabilities are limited.

However, if you are working in a simulation, you can freely set the camera parameters. To do this, you should go to the ros_component_descriptions package and replace the following values ​​in the astra file:

    <clip>
      <near>0.6</near>
      <far>8.0</far>
    </clip>

Regards

farishajdarpasic commented 7 months ago

What does clip, near and far mean? Does far means depth? I am working only in simulation, I am not using physical camera. Thanks

rafal-gorecki commented 7 months ago

Gazebo use parameters in this file to create depth camera. near and far describe min and max distance returned by depth camera. After change remember to rebuild code. I also remember that rviz have trouble to decode and display this depth image, but it works so dont you worry about that. You can also have trouble to see the most distance obj on visualization, because is so dark.

farishajdarpasic commented 7 months ago

Thank you very much!