stereo_image_proc PointCloud2 transform

asked 2014-09-29 14:13:03 -0600

l0g1x gravatar image

updated 2014-12-11 11:30:46 -0600

Im using a Bumblebee2 stereo camera, and using the camera1394stereo package to interface with the camera. I then plug the outputs of that node into stereo_image_proc, to get a point cloud, which i later want to try and cut off any points below some Z value (basically cut off the ground because i don't want to consider that as a object, for navstack purposes).

I basically have everything setup, except once i try to use my tf_publisher class to publish a static transform from where the camera is located on my robot, it does not look correct at all. The "ground" points in the point cloud should be roughly around the plane in rviz (z = 0), but instead my offset that i apply to the camera, only shifts the point cloud slightly higher.

Here is my line of code for the tf offset (the camera is 74.5 cm above the ground and at a 24.5 degree angle):

                   // Height from table is 74.5cm and angle from table facing the floor is 24.5 
                      angle in degrees, but +245degrees from origin counter clockwise.

                    broadcaster.sendTransform(
                            tf::StampedTransform(tf::Transform(
                            tf::Quaternion(0.8433914458128858, 0, 0, -0.5372996083468237), 
                            tf::Vector3(0.0, 0.0, .745)),
                            ros::Time::now(),"base_link", "stereo_camera"));

and here is what it looks like in rviz:

image description

I pretty much need the blue points on the bottom (which are the points hitting the ground), to be at the same level as the grid.

I don't know what I'm doing wrong, and am starting to think my calibration is off, but when i did the camera_calibration tutorials, i did everything as told, and everything went fine. I didn't not touch any parameters. Maybe i should use the pointgrey bumblebee driver instead? Do i need to specify camera offsets and things like that?

EDIT:

So it does seem like using the camera1394 node may be my issue with the bumblebee actually not being calibrated and not sending the correct intensity values as mentioned here in this issue. But I'm still wondering if because of the calibration issue, my transform is still SEVERLY offset from what it should look like.

EDIT2: Also, i just realized (by setting up the bumbleebee gazebo plugin) that the direction (+-) i was rotating was wrong. Which would result in the ground pointclouds not being aligned with the ground plane.. maybe the calibration was actually correct. Will make another edit about this tomorrow

edit retag flag offensive close merge delete

Comments

this might be really obvious, but is your fixed_frame in rviz set to base_link?

paulbovbel gravatar imagepaulbovbel ( 2014-09-29 14:31:28 -0600 )edit

Yes it is. If i didn't have the .745 offset, all the points would be below the grid

l0g1x gravatar imagel0g1x ( 2014-09-29 14:48:10 -0600 )edit