osrf / vrx

Virtual RobotX (VRX) resources.
Apache License 2.0
390 stars 180 forks source link

Gazebo monocular camera + lidar projection misalignment #676

Closed edvart-ros closed 1 year ago

edvart-ros commented 1 year ago

There seems to be a misalignment when viewing/projecting the lidar pointcloud on the simulated RGB camera. The error seems to be happening in at least yaw and pitch. When using the "camera" plugin in rviz, the misalignment is clear.

I'm not sure if this is a bug in the implementation of the plugins or in gazebo itself. This misalignment occurs both when using the built-in camera rViz display and when projecting the points manually. I am using the classic version of vrx, but I bet this occurs in vrx 2.0 as well.

To Reproduce

  1. Launch the vrx simulation with a vrx equipped with cam and lidar
  2. Start the robot state publisher and rviz
  3. Place an object in front of the camera and lidar
  4. Activate the "camera" rviz display/plugin to view the projection and misalignment

I've searched for solutions as this feels like a general problem and not necessarily a vrx problem, but i haven't found any solutions. The distortion coefficients are set to 0 (by default) so that shouldn't be causing this problem. I've attached a video which showcases the fault.

https://github.com/osrf/vrx/assets/94528774/df0a0b0c-0538-4e52-b7c1-6f325061bf8f

https://github.com/osrf/vrx/assets/94528774/bb337f00-a241-43e8-80cf-9cf5122b3dd9

edvart-ros commented 1 year ago

This issue is not occurring anymore, but i have no idea why. It's possible that the joint state publisher in the rviz_vrx launch file was causing redundant, incorrect transforms, but i have not confirmed this. closing issue,