How can I display points clouds in rviz in a different frame than the camera frame? Or: Is the camera calibration very inaccurate?

asked 2021-01-31 05:18:33 -0600

fabian gravatar image

I am trying to learn how to do hand-eye camera calibration appropriately. To that end, I would like to display the point clouds generated from the camera in rviz and check if they line up with the coordinate system of the robot.

At the moment, the point cloud, the camera coordinate frame and the robot base frame look as follows:

image description

As can be seen in the point cloud, the displayed point cloud "hangs in the air" although it should be on the floor as the robot coordinate system is. The transform between the camera coordinate frame and the robot coordinate frame resembles (with some good-will) my own impressions.

After having gone through this process a few questions emerged:

  1. Do I need to transform the point clouds from the camera coordinate frame to the robot base myself and publish them on a separate topic and then display them in rviz to check of the calibration is accurate?
  2. Does rviz already transform point clouds itself (I am running already a broadcaster for the transform on a different node) and does the poor quality of the picture indicate that the calibration is off?
  3. What are usual steps to check if hand-eye calibration is done well?

I am grateful for any hints or suggestions!

edit retag flag offensive close merge delete



Quick comment:

  1. no. Only thing needed is for the messages to have their frame_id set to something which can be reached from base_link and includes your calibrated transform
  2. this is the inverse of your first question. Consequently: yes, RViz transforms clouds such that they are "in the right position".
  3. what you are doing is a good first step. You could add a robot model display to your RViz configuration and let the camera look at the robot. Everything should line up if you've modelled and calibrated things correctly.

whether your calibration is of sufficient quality I can't say. I don't know enough of what you are capturing, what we're seeing in the screenshot and whether "the rest" of your system is setup correctly.

gvdhoorn gravatar image gvdhoorn  ( 2021-01-31 05:24:25 -0600 )edit

Thank you so much, @gvdhoorn! Your comments helped me a lot. The self-reference in step 3 is an excellent idea! I will do that next and try to understand the results.

fabian gravatar image fabian  ( 2021-01-31 07:06:37 -0600 )edit