< >
Home » Crazyflie入门教程 » Crazyflie入门教程-真机-无人机结合光流和测距甲板做建图

Crazyflie入门教程-真机-无人机结合光流和测距甲板做建图

介绍:

  • 介绍如何在真机环境下,无人机结合光流和测距甲板做建图

  • 介绍如何在真机环境下,无人机结合光流和测距甲板做沿墙建图

相关设备:

在真机环境下,无人机结合光流和测距甲板做建图

  • 修改飞行高度,crazyflie_ros2_multiranger/crazyflie_ros2_multiranger_bringup/launch
    /wall_follower_mapper_real.launch.py
parameters=[{'hover_height': 0.3},
  • 修改Crazyflie的URI
gedit ~/crazyflie_mapping_demo/ros2_ws/src/crazyflie_ros2_multiranger/crazyflie_ros2_multiranger_bringup/config/crazyflie_real_crazyswarm2.yaml


uri: radio://0/80/2M/E7E7E7E7E7
  • 打开一个终端,启动crazyflie
source ~/crazyflie_mapping_demo/ros2_ws/install/setup.bash
ros2 launch crazyflie_ros2_multiranger_bringup simple_mapper_real.launch.py
  • 打开另一个终端,启动teleop键盘控制
source /opt/ros/humble/setup.bash
ros2 run teleop_twist_keyboard teleop_twist_keyboard

请输入图片描述

在真机环境下,无人机结合光流和测距甲板做沿墙建图

  • 修改无人机与墙面的距离,crazyflie_ros2_multiranger/crazyflie_ros2_multiranger_wall_following/crazyflie_ros2_multiranger_wall_following
    /wall_following/wall_following.py,参数:reference_distance_from_wall
def __init__(self, reference_distance_from_wall=0.3,
  • 修改无人机前进速度和转向速度,crazyflie_ros2_multiranger/crazyflie_ros2_multiranger_bringup/launch
    /wall_follower_mapper_real.launch.py,参数max_turn_rate 和 max_forward_speed
{'max_turn_rate': 0.3},
{'max_forward_speed': 0.1},
  • 运行,沿墙建图
ros2 launch crazyflie_ros2_multiranger_bringup wall_follower_mapper_real.launch.py
  • Crazyflie停止飞行,降落
ros2 service call /crazyflie_real/stop_wall_following std_srvs/srv/Trigger

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

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


标签: none