From 803beb17137c087cf17fbad66a010007b2c795fd Mon Sep 17 00:00:00 2001 From: Brian Coltin Date: Wed, 8 Nov 2023 10:19:35 -0800 Subject: [PATCH] Calibrate honey and update calibration instructions for 20.04. (#752) --- astrobee/config/robots/honey.config | 6 +-- scripts/calibrate/intrinsics_calibrate.py | 2 +- scripts/calibrate/readme.md | 45 +++-------------------- 3 files changed, 9 insertions(+), 44 deletions(-) diff --git a/astrobee/config/robots/honey.config b/astrobee/config/robots/honey.config index fc8b814061..4305b4e3e0 100644 --- a/astrobee/config/robots/honey.config +++ b/astrobee/config/robots/honey.config @@ -46,10 +46,10 @@ robot_geometry = { robot_camera_calibrations = { nav_cam = { - distortion_coeff = 0.99872, + distortion_coeff = 0.998757, intrinsic_matrix = { - 607.64218, 0.0, 624.85552, - 0.0, 606.53899, 514.57737, + 610.12594, 0.0, 628.35064, + 0.0, 610.12594, 514.89592, 0.0, 0.0, 1.0 }, gain=100, diff --git a/scripts/calibrate/intrinsics_calibrate.py b/scripts/calibrate/intrinsics_calibrate.py index 0b64a302db..f5ad81aa39 100755 --- a/scripts/calibrate/intrinsics_calibrate.py +++ b/scripts/calibrate/intrinsics_calibrate.py @@ -222,7 +222,7 @@ def calibrate_camera( return None return ( - bag_dir + "/camchain-" + bag_name + ".yaml" + bag_dir + "/" + bag_name + "-camchain.yaml" ) # The file where kalibr writes its output diff --git a/scripts/calibrate/readme.md b/scripts/calibrate/readme.md index 2e4193d7d3..ce4a0970c1 100644 --- a/scripts/calibrate/readme.md +++ b/scripts/calibrate/readme.md @@ -7,52 +7,17 @@ This folder contains various scripts for calibration. - Build and install the Astrobee code on the robot. - Install Kalibr on your computer. -## Installation instructions for Kalibr for Ubuntu 18.04 +## Installation instructions for Kalibr for Ubuntu 20.04 - sudo apt install python-rosinstall ipython python-software-properties \ - python-git ipython python-catkin-tools - sudo apt install libopencv-dev ros-melodic-vision-opencv +Install Kalibr following the instructions at: -# Install pip and use it to install python packages +https://github.com/ethz-asl/kalibr -We assume that Python 2 is used. - - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py - sudo python get-pip.py - sudo -H pip install testresources - sudo -H pip install python-igraph==0.8 --upgrade - sudo -H pip install numpy==1.15.0 opencv-python==4.2.0.32 - -If necessary, pip and the other packages can be installed in user -space. The PYTHONPATH may need to be set for such packages. -The pip flags --user, --force, and --verbose may be useful. - -Kalibr uses Python 2, and many packages are transitioning to Python 3, -so some effort may be needed to install the Python 2 dependencies. - - # Build using catkin - export KALIBR_WS=$HOME/source/kalibr_workspace - mkdir -p $KALIBR_WS/src - cd $KALIBR_WS - source /opt/ros/melodic/setup.bash - catkin init - catkin config --extend /opt/ros/melodic - catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release - cd $KALIBR_WS/src - git clone git@github.com:oleg-alexandrov/Kalibr.git - -If the above cloning operation fails, it is likely due to some ssh settings on your machine not being as GitHub expects. Then try: +However, check out our fork which supports the assymetric aprilgrid +installed on Astrobee's dock: git clone https://github.com/oleg-alexandrov/Kalibr.git -In either case, continue as follows: - - # This line takes care of catkin not finding numpy. - ln -s /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy \ - $KALIBR_WS/src/Kalibr/Schweizer-Messer/numpy_eigen/include - - catkin build -DCMAKE_BUILD_TYPE=Release -j4 - # Prepare the environment. This is expected for all the steps below. Run, for example: