目 录CONTENT

文章目录

RMF

GrantLi
2022-12-08 / 0 评论 / 0 点赞 / 434 阅读 / 4138 字 / 正在检测是否收录...

安装RMF

RMF官方教程

安装ROS2

安装RMF(源码)

Installation
  1. 安装依赖
sudo apt update && sudo apt install \
  git cmake python3-vcstool curl \
  qt5-default \
  -y
python3 -m pip install flask-socketio
sudo apt-get install python3-colcon*
  1. 下载源码
mkdir -p ~/rmf_ws/src
cd ~/rmf_ws
wget https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos
vcs import src < rmf.repos

cd ~/rmf_ws
rosdep install --from-paths src --ignore-src --rosdistro <ro2distro> -y
  1. 编译源码
cd ~/rmf_ws
source /opt/ros/<ro2distro>/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
DEMOS
  1. 安装demo功能包
# Demos example with gazebo simulator, use ros-humble-rmf-demos-ign for ignition
sudo apt-get install ros-humble-rmf-demos-gz
  1. 运行airport terminal
ros2 run rmf_building_map_tools model_downloader rmf_demos_maps -s airport_terminal

ros2 launch rmf_demos_gz airport_terminal.launch.xml
# or with ignition
ros2 launch rmf_demos_ign airport_terminal.launch.xml
  1. 设置任务
# Loop Task
ros2 run rmf_demos_tasks dispatch_loop -s s07 -f n12 -n 3 --use_sim_time

# Delivery Task
ros2 run rmf_demos_tasks dispatch_delivery -p mopcart_pickup -pd mopcart_dispenser -d spill -di mopcart_collector --use_sim_time

# Clean Task
ros2 run rmf_demos_tasks dispatch_clean -cs zone_3 --use_sim_time
  1. 打开后台管理
    后台管理系统
    复制粘贴下面内容到Task List Box:
[{"task_type":"Delivery", "start_time":0, "description": {"option": "mop"}},
 {"task_type":"Loop", "start_time":0, "description": {"num_loops":10, "start_name":"junction_north_west", "finish_name":"n14"}},
 {"task_type":"Loop", "start_time":0, "description": {"num_loops":10, "start_name":"tinyRobot_n09", "finish_name":"s07"}},
 {"task_type":"Clean", "start_time":0, "priority":0, "description":{"cleaning_zone":"zone_2"}}
]

然后点击提交任务列表。

docker 运行RMF

  1. 拉取rmf_demos镜像
docker pull ghcr.io/open-rmf/rmf/rmf_demos:latest
docker tag ghcr.io/open-rmf/rmf/rmf_demos:latest rmf:latest
  1. 运行rmf_demos镜像

docker run -it --network host rmf:latest bash -c "export ROS_DOMAIN_ID=9; ros2 launch rmf_demos_gz office.launch.xml headless:=1"
  1. 使用rmf_demos
    使用链接
0

评论区