安装kalibr docker,利用kalibr生成bag文件

 Installation · ethz-asl/kalibr Wiki · GitHub

解决Ubuntu18.04启动Docker“Got permission denied while trying to connect to the Docker daemon socket“问题_LL Leung的博客-CSDN博客 kalibr 如何从bag中提取图像/由图像生成bag_AndyCheng_hgcc的博客-CSDN博客

  1. Clone and build the docker image

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

git clone https://github.com/ethz-asl/kalibr.git
cd kalibr
docker build -t kalibr -f Dockerfile_ros1_20_04 . # change this to whatever ubuntu version you want
  1. Mounting a data folder for use in the container

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=/path/to/your/data/on/host
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
  1. Inside the docker, running commands

Using the above command you should have entered the docker container bash prompt. From here you should be able to run kalibr on any files that are in your /data directory. You will want to first load your ROS environment variables.

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

 rosrun kalibr kalibr_bagcreater --folder ./static/pic/cam0

rosrun kalibr kalibr_bagcreater --folder dataset-dir/. --output-bag awsome.bag

    输出的包 只能生成在当前目录,awsome.bag不能包含路径,只能命名包名

    dataset-dir文件夹的组织形式较为固定
    图片文件夹的命名可以是cam,但如果是image_rotation这种,在制作bag包的时候,就不会将图片信息加进去了

最后包制作完后验证一下,想要的信息是否都加进包里面了
 

 启动 docker run -t -i kalibr /bin/bash

退出ctrl+D

如何进入、退出docker的container_我是干勾鱼的博客-CSDN博客_docker 进入container

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值