ori-drs / alphasense_description

URDF Model of the Alphasense Dev Kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alphasense_description

URDF Model definition of the Alphasense Dev Kit)

Kalibr URDF Calibration Converter

This package contains an utility that allows you to convert a set of calibration files created by kalibr into the YAML format that is loaded by the xacro at runtime.

Let's assume you have a directory with a list of kalibr files

~/my_calib/cam0-camchain-imucam.yaml
~/my_calib/cam1-camchain-imucam.yaml
...

where each file was generated by kalibr and has a structure like this:

cam0:
  T_cam_imu:
  - - 0.9999880402484476
    - -0.000942427662931895
    - -0.004799082221662863
    - 0.006416247252956556
  - - 0.004797008865106434
    - -0.0021900897852221157
    - 0.9999860960096802
    - 0.01670064540948574
  - - -0.0009529249803788974
    - -0.9999971576643774
    - -0.0021855427584387965
    - -0.07488037729385075
  - - 0.0
    - 0.0
    - 0.0
    - 1.0
  cam_overlaps: []
  camera_model: pinhole
  distortion_coeffs:
  - -0.03842764034005408
  - -0.005841411460411122
  - 0.003451041303088915
  - -0.0011463543672005018
  distortion_model: equidistant
  intrinsics:
  - 351.5132148653381
  - 351.7557554938886
  - 342.8425988673232
  - 259.91793254535776
  resolution:
  - 720
  - 540
  rostopic: /alphasense/cam4/image_raw
  timeshift_cam_imu: 0.0017123033924705262

if you run the following command:

rosrun alphasense_description kalibr_urdf_calibration_converter ~/my_calib/ my_calib.yaml

then the program will parse all of the files in the folder to produce a single yaml file with the poses of the cameras in the IMU frame. Then, you can include the alphasense in your xacro by passing the file to the macro as follows:

<xacro:alphasense parent="my_parent" calib_file="/path/to/my_calib.yaml">
<!-- put your origin here -->
</xacro:alphasense>

for an example of the calibration output see the default_calibration.yaml.

About

URDF Model of the Alphasense Dev Kit

License:Apache License 2.0


Languages

Language:C++ 87.8%Language:CMake 12.2%