【CMU-自主导航与规划】M-TARE planner 配置与运行

M-TARE docker
M-TARE 源码

一、依赖

Docker, Docker Compose, NVIDIA Container Toolkit, Nvidia GPU Driver(需要至少2个,带Nvidia GPU)

1.1 Docker

docker -v               #查询版本

1.2 Docker Compose

docker compose version

1.3 GPU

docker run --gpus all --rm nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi

如果有报错:

docker: Error response from daemon: could not select device driver ““ with capabilities: [[gpu]]

参考:docker gpu报错Error response from daemon: could not select device driver ““ with capabilities: [[gpu]]

安装nvidia-container-runtime,并进行docker的重启:

sudo systemctl restart docker

1.4 其他依赖

sudo apt install tmux tmuxp net-tools

二、安装

拉取指定版本镜像:

docker pull caochao/mtare-open-source:latest

下载工程docker:(推荐将工程放置在主目录下)

 git clone https://github.com/caochao39/mtare_docker.git
  • 在单机上运行多个robot:
    • 网络设置:
      使用ifconfig查找网络名称,后续需要使用
      如果没有网络,使用ip link列出所有网络,并选择想要使用的,使用以下指令进行设置
sudo ip link set <interface-name> up
  • 在文件mtare_docker/docker-compose-network.yml中:
    driver: macvlan进行注释;
    driver: bridge取消注释。

  • 在多机上运行多个robot:
    建议手动为每台计算机分配一个静态ip
    使用以太网电缆将每台计算机连接到同一个本地网络,不要使用无线连接;
    确认每台之间可以互相ping;
    查找每台计算机的网络名称;
    在文件mtare_docker/docker-compose-network.yml中,将driver: macvlan取消注释,将driver: bridge进行注释。

三、启动

在终端通过xhost + 允许docker连接x server,显示GUI,通过 xhost - 取消

如果不成功,可以尝试安装:sudo apt-get install lightdm
并使用 sudo dpkg-reconfigure lightdm 切换显示

启动:

./run_mtare.sh tunnel 30 2 0 wlp0s20f3

指令含义:

Usage: run_mtare.sh <comms_range> <robot_num> <robot_id> <network_interface>
: The environment to explore, which should be one of the following: tunnel, garage, campus, indoor, forest
<comms_range>: Communication range in meters, two robots further than this range cannot communicate with each other
<robot_num>: Total number of robots
<robot_id>: Robot id, ranging from 0 to robot_num - 1
<network_interface>: Name of the network interface to use, e.g. eth0

单机启动效果
多机启动需要开多个终端同时启动,且注意id需要在0到num-1的范围内。

./run_mtare.sh tunnel 30 5 0 eno1
./run_mtare.sh tunnel 30 5 1 eno1
...
./run_mtare.sh tunnel 30 5 4 eno1

在这里插入图片描述

其中:

  • 圆圈颜色表示通信状态,大小表示通信范围
    • 红色表示范围远,无法通信
    • 黄色:当一个机器人确定与另一个机器人会面,传递或请求信息,有利于整体探索效率时,它将暂停当前的探索进度,并追赶其他机器人。指示通信范围的圆圈变为黄色。
      (Representation Granularity Enables Time-Efficient Autonomous Exploration in Large)
    • 绿色:当两个机器人在彼此的通信范围内时,它们可以相互交换有关勘探进展的信息。
  • 所有参与探索的机器人的位置都用小球体表示(红色)
  • rviz的显示设置同:https://github.com/caochao39/tare_planner

四、停止

使用脚本:mtare_docker/stop.sh
停止所有机器人:./stop.sh
停止某个:./stop.sh <robot_id>

五、内容包含

  • M-TARE源码:https://github.com/caochao39/mtare_planner
  • 虚拟环境:https://github.com/HongbiaoZ/autonomous_exploration_development_environment
  • ROS1 bridge:
    • 源码:https://github.com/ros2/ros1_bridge
    • 作者所用改进版:https://drive.google.com/file/d/1ZI4urXESzzBNyuV0ToSgndKDIShpYWko/view
  • ROS2 https://drive.google.com/file/d/1n3NG6eiZeafJGXRxOW_fkhylb-SsHSor/view
  • 16
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值