ifm / ifm3d-ros

ifm pmd-based 3D ToF Camera ROS Package
Apache License 2.0
40 stars 40 forks source link

ifm3d config Extrinsics are different from ROS extrinsics #39

Closed ArviSyrjanen closed 2 years ago

ArviSyrjanen commented 4 years ago

Hi!

Firstly, I can not find the correct optical center point from any documentation. I have understood that the pointcloud start point is in the front lens middle point when the extrinsic calibration parameters are all 0, but this is not the optical center point as the pointcloud start point can be moved with the Extinsic parameters. These Extrinsics do not affect the radial Distance images, apparently these Radial distance images are in the optical frame which origin location cant be found.

Secondly I have noticed that polling for the extrinsic parameters using rosrun ifm3d dump and listening to the ROS topic by rostopic echo /ifm3d/camera/extrinsics yields different results.

From the dump i get the following extrinsic calibration

"ExtrinsicCalibRotX": "0",
"ExtrinsicCalibRotY": "0",
"ExtrinsicCalibRotZ": "0",
"ExtrinsicCalibTransX": "0",
"ExtrinsicCalibTransY": "0",
ExtrinsicCalibTransZ": "0"  

From the Extrinsics ros topic I get the following message

header: 
  seq: 27
  stamp: 
    secs: 1597251799
    nsecs: 624335584
  frame_id: "ifm3d/camera_optical_link"
tx: 3.1325378418
ty: -0.601551473141
tz: -17.6773967743
rot_x: 0.00143465423025
rot_y: -0.0
rot_z: -0.192064240575

When I change the extrinsic calibration with rosrun ifm3d dump | jq '.ifm3d.Device.ExtrinsicCalibTransX="1000"' | rosrun ifm3d config the extrinsics in the config changes as following:

"ExtrinsicCalibRotX": "0",
"ExtrinsicCalibRotY": "0",
"ExtrinsicCalibRotZ": "0",
"ExtrinsicCalibTransX": "1000",
"ExtrinsicCalibTransY": "0",
ExtrinsicCalibTransZ": "0"  

And the ros message changes to

header: 
  seq: 1804
  stamp: 
    secs: 1597257919
    nsecs: 915702866
  frame_id: "ifm3d/camera_optical_link"
tx: 1003.13256836
ty: -0.601551473141
tz: -17.6773967743
rot_x: 0.00143465423025
rot_y: -0.0
rot_z: -0.192064240575

And with rosrun ifm3d dump | jq '.ifm3d.Device.ExtrinsicCalibTransX="0"' | jq '.ifm3d.Device.ExtrinsicCalibRotY="90"' | rosrun ifm3d config:

"ExtrinsicCalibRotX": "0",
"ExtrinsicCalibRotY": "90",
"ExtrinsicCalibRotZ": "0",
"ExtrinsicCalibTransX": "0",
"ExtrinsicCalibTransY": "0",
ExtrinsicCalibTransZ": "0"  
header: 
  seq: 2658
  stamp: 
    secs: 1597258577
    nsecs: 449293516
  frame_id: "ifm3d/camera_optical_link"
tx: -17.6773338318
ty: -0.601551473141
tz: -3.13254904747
rot_x: 90.0
rot_y: 89.9985656738
rot_z: -90.1920700073

The extrinsics appear to add up. The rotation is not changed by +90deg around Y in the ros message, but the end result is the same orientation.

But what I don't understand that why the Extrinsics is not all 0's in the ros message when it is all 0's in the config.
Thank you in advance for your reply.

lola-masson commented 2 years ago

Closing due to inactivity. Please reopen if issue persists.