Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 20.04 and CI Dockerfiles #515

Merged
merged 77 commits into from
May 3, 2022
Merged

Conversation

goldbattle
Copy link
Collaborator

This is a PR of the ori-drs/kalibr repo which has fixes for 20.04 and python3. As mentioned in #405 (comment) I forked and am willing to handle review comments to make this mergeable. I have additionally added Docker files and a CI github action to build the Docker files to ensure that the codebase builds on all platforms (ubuntu 16.04 kinetic, 18.04 melodic, 20.04 noetic). There were some modifications I needed to perform from the ori-drs repo to ensure that everything still built with python2.

I have tested performing camera calibration, and camera to IMU calibration with the sample datasets. One can see the github action CI builds here. The goldbattle/kalibr Readme has instructions on how to build and use the docker.

A short summary of changes:

The readme will likely need some small changes along with the wiki (or just add example build instructions to the readme).

mintar and others added 30 commits November 5, 2019 14:28
Moved the creation of the cv2.namedWindow from the MonoCameraValidator
constructor to the callback function. Otherwise, this caused the
following error:

    QObject::startTimer: Timers cannot be started from another thread

... with the result that the image windows remained black and the node
became stuck.

Fixes ethz-asl#201 .
@goldbattle
Copy link
Collaborator Author

Docker instructions to be added to the wiki:

First make sure that you have install docker on your system using the official Docker Get Docker guide.
We can then build the docker container using:

cd <workspace>/src/kalibr
docker build -t kalibr -f Dockerfile_ros1_20_04 .

Then after building we can first download an example dataset and then perform following to calibrate.

cd <workspace>
mkdir example && cd example
wget http://robotics.ethz.ch/~asl-datasets/ijrr_euroc_mav_dataset/calibration_datasets/cam_april/april_6x6.yaml
wget http://robotics.ethz.ch/~asl-datasets/ijrr_euroc_mav_dataset/calibration_datasets/cam_april/cam_april.bag

We can now mount the data folder in the container /data path and enter the command prompt.
Some more details can be found on the ROS wiki for Docker.

FOLDER=$(pwd)
xhost +local:root
docker run -it -e "DISPLAY" -e "QT_X11_NO_MITSHM=1" \
    -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    -v "$FOLDER:/data" \
    kalibr
source devel/setup.bash
rosrun kalibr kalibr_calibrate_cameras \
    --bag /data/cam_april.bag --target /data/april_6x6.yaml \
    --models pinhole-radtan pinhole-radtan \
    --topics /cam0/image_raw /cam1/image_raw

@goldbattle goldbattle merged commit c528449 into ethz-asl:master May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants