< >
Home » LOCO定位系统入门教程 » LOCO定位系统入门教程-安装crazyswarm

LOCO定位系统入门教程-安装crazyswarm

说明:

  • 介绍如何安装crazyswarm

准备环境:(以下其中一个)

  • Ubuntu20.04,Python3.7,ROS Noetic

  • Ubuntu18.04,Python2.7,ROS Melodic

步骤:

  • 设置环境$CSW_PYTHON变量
export CSW_PYTHON=python3
  • 安装依赖项
sudo apt install -y swig lib${CSW_PYTHON}-dev ${CSW_PYTHON}-pip

${CSW_PYTHON} -m pip install pytest numpy PyYAML scipy
  • 安装一个或多个可视化工具进行模拟
${CSW_PYTHON} -m pip install vispy

${CSW_PYTHON} -m pip install matplotlib
  • 想从模拟器录制高质量视频,请安装 ffmpeg
sudo apt install -y ffmpeg

${CSW_PYTHON} -m pip install ffmpeg-python
  • 下载crazyswarm包
git clone https://github.com/USC-ACTLab/crazyswarm.git
  • 运行构建脚本
cd crazyswarm

./build.sh
  • 运行测试
cd ros_ws/src/crazyswarm/scripts

source ../../../devel/setup.bash

$CSW_PYTHON -m pytest
  • 结果如下
======================================== test session starts =========================================
platform linux -- Python 3.8.10, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/ubuntu/crazyswarm/ros_ws/src/crazyswarm/scripts
configfile: pytest.ini
collected 31 items                                                                                   

test_collisionAvoidance.py ............                                                        [ 38%]
test_highLevel.py .........                                                                    [ 67%]
test_lowLevel.py ......                                                                        [ 87%]
test_ros.py .                                                                                  [ 90%]
test_simOnly.py .                                                                              [ 93%]
test_videoOutput.py .                                                                          [ 96%]
test_yamlString.py .                                                                           [100%]

========================================== warnings summary ==========================================
../../../../../../../usr/lib/python3/dist-packages/past/builtins/misc.py:45
  /usr/lib/python3/dist-packages/past/builtins/misc.py:45: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    from imp import reload

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================== 31 passed, 1 warning in 6.19s ====================================

请输入图片描述

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

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


标签: loco定位系统入门教程