< >
Home » ROS2与Open-RMF仿真教程 » ROS2与Open-RMF仿真教程-安装free_fleet

ROS2与Open-RMF仿真教程-安装free_fleet

ROS2与Open-RMF仿真教程-安装free_fleet

说明:
 

  • 介绍如何安装free_fleet/免费车队管理代码
  • 环境:ubuntu22.04 + humble + rmf22.09 + free_fleet(main分支)
  • free_fleet教程参考

步骤:

cs -s install_free_fleet
  • 执行脚本后,确认即可安装
  • 源码安装在目录ros2_free_fleet_ws/src

测试:

  • 启动client
source ~/ros2_free_fleet_ws/install/setup.bash
ros2 launch ff_examples_ros2 fake_client.launch.xml
  • 启动server
source ~/ros2_free_fleet_ws/install/setup.bash
ros2 launch ff_examples_ros2 fake_server.launch.xml

# Verify that the server registers the fake clients
# [INFO] [1636706176.184055177] [fake_server_node]: registered a new robot: [fake_ros2_robot]
 
  • 查看fleet_states 话题
source ~/ros2_free_fleet_ws/install/setup.bash
ros2 topic echo /fleet_states
  • 目的地请求,允许对机器人发出单一目的地命令
source ~/ros2_free_fleet_ws/install/setup.bash
ros2 run ff_examples_ros2 send_destination_request.py -f fake_fleet -r fake_ros2_robot -x 1.725 -y -0.39 --yaw 0.0 -i unique_task_id_1
  • 效果如下:
fleet_name: fake_fleet
robot_name: fake_ros2_robot
x: 1.725
y: -0.39
yaw: 0.0
level_name: B1
task_id: unique_task_id_1
topic_name: robot_destination_requests
all done!
  • 路径请求,请求机器人执行一串目标命令
source ~/ros2_free_fleet_ws/install/setup.bash
ros2 run ff_examples_ros2 send_path_request.py -f fake_fleet -r fake_ros2_robot -i unique_task_id_2 -p '[{"x": 1.725, "y": -0.39, "yaw": 0.0, "level_name": "B1"}, {"x": 1.737, "y": 0.951, "yaw": 1.57, "level_name": "B1"}, {"x": -0.616, "y": 1.852, "yaw": 3.14, "level_name": "B1"}, {"x": -0.626, "y": -1.972, "yaw": 4.71, "level_name": "B1"}]'
  • 模式请求,目前只支持暂停和恢复的
ros2 run ff_examples_ros2 send_mode_request.py -f fake_fleet -r fake_ros2_robot -m pause -i unique_task_id_3
ros2 run ff_examples_ros2 send_mode_request.py -f fake_fleet -r fake_ros2_robot -m resume -i unique_task_id_4
  • 请注意,任务 ID 需要是唯一的,如果使用以前使用过的任务 ID 发送请求,则免费队列客户端将忽略该请求

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: ros2与open-rmf仿真教程