pal-robotics / realsense_gazebo_plugin

157 stars 134 forks source link

Incorrect Image (lens shown) #11

Closed ShrutheeshIR closed 4 years ago

ShrutheeshIR commented 4 years ago

Hello! I am able to get the camera in my world, and obtain images. However, the images are incorrect. As you can see in the image, the lens of the camera and the outer mesh seems to be overlayed onto the image.

Screenshot from 2020-04-30 15-30-58

I haven't changed the source code. I followed the instructions you provided in another issue #7

Please let me know where I am going wrong :)

v-lopez commented 4 years ago

I believe this should be solved by the clip parameters in the gazebo files. https://github.com/pal-robotics-forks/realsense/blob/kinetic-devel/realsense2_description/urdf/_d435.gazebo.xacro#L39

Also if you are using an rviz camera display, you should be able to choose what is visible and what is not, probably you have to disable your robot head or camera support.

ShrutheeshIR commented 4 years ago

Hi @v-lopez The issue is not with the robot head as you can see. Also, I will be dumping the images directly onto some folder, I'm using rviz just to verify my setup. I need the values to be perfect since I'll be extracting the camera pose to great precision.

v-lopez commented 4 years ago

Have you checked the clipping? Also if you use an rqt_image view to view the image, it appears the same?

ShrutheeshIR commented 4 years ago

Hey @v-lopez Yes, I checked clipping. I tried varying the values and did not work. I recorded the image as a rosbag, and the images obtained there are completely different as well.

Screenshot from 2020-05-01 00-47-17

The images recorded by using rosbag record seems to be definitely not corresponding to the rviz component. What exactly is going wrong here?

Edit: Forgot to clarify. The image seen here was obtained using rosbag

ShrutheeshIR commented 4 years ago

Hi @v-lopez . Update: Using rqt image_view, I am getting the right images. (Without the problems) Could you explain why I am getting 3 different outputs? (I am fairly new to ROS and simulations) I essentially need to extract the images that I got using the image_view, onto files, along with camera poses. How would I go about doing this?

Thanks!

ShrutheeshIR commented 4 years ago

I was not exactly sure as to what the issue could be. However, when I recorded the images in a rosbag and played it, the images seemed fine. Will be closing the issue. Any explanation for the behaviour would be appreciated though :)