Skip to content
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

gazebo_ros_openni_kinect plugin with roll + pitch orientation generates wrong depth image #243

Open
efernandez opened this issue Sep 12, 2014 · 4 comments
Labels

Comments

@efernandez
Copy link
Contributor

The problem is probably because of a wrong depth image coming from gazebo, as explained here:
http://answers.gazebosim.org/question/7005/gazebo_ros_openni_kinect-plugin-with-roll-pitch/

I'm asking here because it's related with a plugin tough.

@j-rivero j-rivero added the bug label Apr 28, 2016
@j-rivero
Copy link
Contributor

There is a good explanation of the problem and a possible workaround in ros answers

@annamannucci
Copy link

Hi, I have the same problem. I'm using gazebo 4, ROS Indigo with Ubuntu 14.04. I would like to know if someone has tried to correct this bug.

@felixvd
Copy link

felixvd commented Jul 11, 2018

This is still a bug in Kinetic. I get incorrectly rotated point clouds. It seems like something is wrong with the coordinate systems, because moving the robot results in behavior like shown below.

camprob2
camprob3

In these pictures, the camera is looking down at the bins. The point cloud is not displayed at the correct place. When the robot moves to the goal pose of the second picture, the point cloud rotates in more than one axis:

camprob4

Another shot with an extra movement:
camprob5

And a close-up of the frames:
camprob1

I assumed that the realsense camera URDF I am using is rotating the camera frames, and gazebo might not like that. The question posted by @j-rivero seems to imply as much. But removing all rotations from the camera's xacro so that the frames are oriented like this does not change the behavior:

camprob6

I wondered if it had something to do with Gazebo connecting the sensor to the wrist link, whose parent frame is not oriented like the camera, but even taking out the rotation from that did not fix it. In the last picture, all the frames on wrist_link_2 have the same orientation, and the camera is looking towards the right at the robot and wall. The projection is still not correct.

camprob7
camprob8

Any ideas?

@vib2810
Copy link

vib2810 commented Jan 11, 2021

Here is a possible fix:

There are 3 approaches

  1. edit, recompile and replace the .so plugin file (Quite hard to compile)
  2. Edit the baselink->camera transform
  3. If 2 isn't possible due to the transform being published according to the URDF, a dummy link can be created and the frameName of the camera attached to this dummy link RPY(-pi/2, 0, -pi/2) wrt the initial camera frame

All these solutions can be found here:
https://answers.gazebosim.org/question/4266/gazebo-15-libgazebo_openni_kinectso-pointcloud-data-is-rotated-and-flipped/?answer=26388#post-id-26388
Code for my fix(Method 3) is also present in this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants