LoginSignup
0
0

More than 1 year has passed since last update.

AnafiをROSで動かしたい 1

Last updated at Posted at 2022-04-21

AnafiをROSで動かすために環境構築

parrot社のドローン anafiをROSで動かせるようにしたくて奮闘中です.まだまだ開発段階ですが,少しずつまとめていきたいと思っています.わからないことが多いので,間違っていたり足りないところがあれば指摘してください.

参考にしているもの

GitHubでanafiのパッケージをROSとbridgeしているものがありました.
https://github.com/andriyukr/olympe_bridge
こちらを元に開発していきたいと思っています.

Parrot Ground SDKのダウンロード

https://developer.parrot.com/
このサイトにあるparrot droneのsdkを以下のコマンドでインストールしていきます.

mkdir -p ~/code/parrot-groundsdk
cd ~/code/parrot-groundsdk
sudo snap install git-repo
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
repo init -u https://github.com/Parrot-Developers/groundsdk-manifest.git
repo sync
./products/olympe/linux/env/postinst
./build.sh -p olympe-linux -A all final -j

この時にいくつかエラーが出ると思われます.実際に自分が確認したエラーや参考にしたサイトに載っているエラーへの対処を以下にまとめていきます.

Issue:

pkg_resources.DistributionNotFound: The 'osrf-pycommon>0.1.1' distribution was not found and is required by catkin-tools

Solution: python3-catkin-toolsのインストール

sudo apt install python3-catkin-lint python3-pip
pip3 install osrf-pycommon

Issue:

File "/home/andriy/code/parrot-groundsdk/.repo/repo/main.py", line 79
file=sys.stderr)
  ^
SyntaxError: invalid syntax

または以下のエラーも

/snap/git-repo/18/usr/bin/python: can’t open file `/home/das-note-11/.repo/repo/main.py`: 
[errno13] Permission denied

Solution: Use Google Repo binary

mkdir -p ~/.bin
PATH="${HOME}/.bin:${PATH}"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+rx ~/.bin/repo

Issue:

/usr/bin/env: ‘python’: No such file or directory

Solution: Set python3 as default

echo 'alias python=python3' >> ~/.bash_aliases
source ~/.bash_aliases

Create a symbolic link to python3

sudo ln -s /usr/bin/python3 /usr/bin/python

インストール完了したかの確認コマンド

以下を入力してインストール完了したか確認してください.

source ~/code/parrot-groundsdk/./products/olympe/linux/env/shell
python -c 'import olympe; print("Installation OK")'

Issue:

ModuleNotFoundError: No module named 'olympe.messages'

Solution: Downgraded aenum

pip install --upgrade aenum==2.2.5

Issue:

ModuleNotFoundError: No module named 'ulog'

Solution:

AttributeError: 'module' object has no attribute 'abc'

最後に

長くなるので,ここではparrot sdkのインストールについてまとめました.
次回からはROSのanafi_bridgeをインストールしていきます.

参考

https://github.com/andriyukr/olympe_bridge
https://developer.parrot.com/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0