mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-31 23:19:32 +00:00
Compare commits
13 Commits
v0.19-alph
...
buster-py3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba6feec32e | ||
|
|
e3e92d0b57 | ||
|
|
ff632ef1ba | ||
|
|
a1577eeea0 | ||
|
|
53caa9771c | ||
|
|
c720c9d02d | ||
|
|
9ff7e4a64d | ||
|
|
b5ff8388b2 | ||
|
|
46816ee959 | ||
|
|
7d475d9d4d | ||
|
|
a1745018f9 | ||
|
|
be2afe5d3e | ||
|
|
bfedba50f3 |
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright (C) 2018 Copter Express Technologies
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import unittest
|
||||
import json
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
Description=Butterfly Terminal Server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/butterfly.server.py --host="0.0.0.0" --unsecure
|
||||
ExecStart=/bin/bash -c ". /root/butterfly_env/bin/activate; butterfly.server.py --host="0.0.0.0" --unsecure"
|
||||
User=pi
|
||||
|
||||
22
builder/assets/python3.yaml
Normal file
22
builder/assets/python3.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
python3-crypto:
|
||||
debian:
|
||||
buster: [python3-crypto]
|
||||
python3-imaging:
|
||||
debian:
|
||||
buster: [python3-pil]
|
||||
python3-wxtools:
|
||||
debian:
|
||||
pip:
|
||||
packages: [wxPython]
|
||||
python3-future:
|
||||
debian:
|
||||
buster: [python3-future]
|
||||
python3-twisted:
|
||||
debian:
|
||||
buster: [python3-twisted]
|
||||
python3-serial:
|
||||
debian:
|
||||
buster: [python3-serial]
|
||||
python3-requests:
|
||||
debian:
|
||||
buster: [python3-requests]
|
||||
@@ -111,6 +111,7 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-network.
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/clever.service' '/lib/systemd/system/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/roscore.service' '/lib/systemd/system/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/melodic-rosdep-clever.yaml' '/etc/ros/rosdep/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/python3.yaml' '/etc/ros/rosdep/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/ros_python_paths' '/etc/sudoers.d/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/pigpiod.service' '/lib/systemd/system/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/launch.nanorc' '/usr/share/nano/'
|
||||
|
||||
@@ -68,7 +68,8 @@ my_travis_retry() {
|
||||
# TODO: 'kinetic-rosdep-clever.yaml' should add only if we use our repo?
|
||||
echo_stamp "Init rosdep"
|
||||
my_travis_retry rosdep init
|
||||
echo "yaml file:///etc/ros/rosdep/melodic-rosdep-clever.yaml" >> /etc/ros/rosdep/sources.list.d/20-default.list
|
||||
echo "yaml file:///etc/ros/rosdep/melodic-rosdep-clever.yaml" > /etc/ros/rosdep/sources.list.d/30-clever.list
|
||||
echo "yaml file:///etc/ros/rosdep/python3.yaml" > /etc/ros/rosdep/sources.list.d/40-python3.list
|
||||
my_travis_retry rosdep update
|
||||
|
||||
echo_stamp "Populate rosdep for ROS user"
|
||||
@@ -93,12 +94,13 @@ cd /home/pi/catkin_ws/src/clever
|
||||
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
|
||||
|
||||
echo_stamp "Installing CLEVER" \
|
||||
&& export ROS_PYTHON_VERSION=3 \
|
||||
&& cd /home/pi/catkin_ws/src/clever \
|
||||
&& git status \
|
||||
&& cd /home/pi/catkin_ws \
|
||||
&& resolve_rosdep $(pwd) \
|
||||
&& my_travis_retry pip install wheel \
|
||||
&& my_travis_retry pip install -r /home/pi/catkin_ws/src/clever/clever/requirements.txt \
|
||||
&& my_travis_retry pip3 install wheel \
|
||||
&& my_travis_retry pip3 install -r /home/pi/catkin_ws/src/clever/clever/requirements.txt \
|
||||
&& source /opt/ros/melodic/setup.bash \
|
||||
&& catkin_make -j2 -DCMAKE_BUILD_TYPE=Release \
|
||||
&& systemctl enable roscore \
|
||||
@@ -128,8 +130,7 @@ echo_stamp "Install GeographicLib datasets (needed for mavros)" \
|
||||
&& wget -qO- https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh | bash
|
||||
|
||||
# FIXME: Buster comes with tornado==5.1.1 but we need tornado==4.2.1 for rosbridge_suite
|
||||
# (note that Python 3 will still have a more recent version)
|
||||
pip install tornado==4.2.1
|
||||
pip3 install tornado==4.2.1
|
||||
|
||||
echo_stamp "Running tests"
|
||||
cd /home/pi/catkin_ws
|
||||
|
||||
@@ -66,7 +66,8 @@ apt-get update \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
|
||||
|
||||
echo "deb http://packages.ros.org/ros/ubuntu buster main" > /etc/apt/sources.list.d/ros-latest.list
|
||||
echo "deb http://deb.coex.tech/rpi-ros-melodic buster main" > /etc/apt/sources.list.d/rpi-ros-melodic.list
|
||||
echo "deb http://deb.coex.tech/opencv3 buster main" > /etc/apt/sources.list.d/opencv3.list
|
||||
echo "deb http://deb.coex.tech/melodic-py3 buster main" > /etc/apt/sources.list.d/rpi-ros-melodic.list
|
||||
# FIXME: We still don't have these packages built for Buster
|
||||
# FIXME: Check these packages after their installation
|
||||
echo "deb http://deb.coex.tech/clever stretch main" > /etc/apt/sources.list.d/clever.list
|
||||
@@ -96,20 +97,21 @@ libjpeg8 \
|
||||
tcpdump \
|
||||
ltrace \
|
||||
libpoco-dev \
|
||||
python-rosdep \
|
||||
python-rosinstall-generator \
|
||||
python-wstool \
|
||||
python-rosinstall \
|
||||
python3-rosdep \
|
||||
python3-rosinstall-generator \
|
||||
python3-wstool \
|
||||
python3-rosinstall \
|
||||
build-essential \
|
||||
libffi-dev \
|
||||
monkey \
|
||||
pigpio python-pigpio python3-pigpio \
|
||||
i2c-tools \
|
||||
espeak espeak-data python-espeak \
|
||||
espeak espeak-data python-espeak python3-espeak \
|
||||
ntpdate \
|
||||
python-dev \
|
||||
python3-dev \
|
||||
python-systemd \
|
||||
python3-venv \
|
||||
python3-systemd \
|
||||
mjpg-streamer \
|
||||
&& echo_stamp "Everything was installed!" "SUCCESS" \
|
||||
|| (echo_stamp "Some packages wasn't installed!" "ERROR"; exit 1)
|
||||
@@ -121,10 +123,9 @@ sed -i "s/updates_available//" /usr/share/byobu/status/status
|
||||
echo_stamp "Installing pip"
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
python3 get-pip.py
|
||||
python get-pip.py
|
||||
# Don't even bother installing pip for python2.7
|
||||
# python get-pip.py
|
||||
rm get-pip.py
|
||||
#my_travis_retry pip install --upgrade pip
|
||||
#my_travis_retry pip3 install --upgrade pip
|
||||
|
||||
echo_stamp "Make sure both pip and pip3 are installed"
|
||||
pip --version
|
||||
@@ -132,10 +133,14 @@ pip3 --version
|
||||
|
||||
echo_stamp "Install and enable Butterfly (web terminal)"
|
||||
echo_stamp "Workaround for tornado >= 6.0 breaking butterfly"
|
||||
my_travis_retry pip3 install tornado==5.1.1
|
||||
my_travis_retry pip3 install butterfly
|
||||
my_travis_retry pip3 install butterfly[systemd]
|
||||
cd /root
|
||||
python3 -m venv butterfly_env
|
||||
source butterfly_env/bin/activate
|
||||
my_travis_retry pip install tornado==5.1.1
|
||||
my_travis_retry pip install butterfly
|
||||
my_travis_retry pip install butterfly[systemd]
|
||||
systemctl enable butterfly.socket
|
||||
deactivate
|
||||
|
||||
echo_stamp "Install ws281x library"
|
||||
my_travis_retry pip install --prefer-binary rpi_ws281x
|
||||
|
||||
@@ -18,6 +18,7 @@ echo "Run image tests"
|
||||
|
||||
export ROS_DISTRO='melodic'
|
||||
export ROS_IP='127.0.0.1'
|
||||
export ROS_PYTHON_VERSION=3
|
||||
source /opt/ros/melodic/setup.bash
|
||||
source /home/pi/catkin_ws/devel/setup.bash
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# validate all required modules installed
|
||||
|
||||
@@ -27,4 +27,4 @@ import rpi_ws281x
|
||||
import pigpio
|
||||
from espeak import espeak
|
||||
|
||||
print cv2.getBuildInformation()
|
||||
print(cv2.getBuildInformation())
|
||||
|
||||
@@ -20,14 +20,16 @@ nmap --version
|
||||
lsof -v
|
||||
git --version
|
||||
vim --version
|
||||
pip --version
|
||||
pip2 --version
|
||||
pip3 --version
|
||||
tcpdump --version
|
||||
monkey --version
|
||||
pigpiod -v
|
||||
i2cdetect -V
|
||||
# butterfly uses its own venv, so we honor that
|
||||
. /root/butterfly_env/bin/activate
|
||||
butterfly -h
|
||||
# deactivate venv as needed
|
||||
deactivate
|
||||
espeak --version
|
||||
mjpg_streamer --version
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<depend>rosbridge_server</depend>
|
||||
<depend>web_video_server</depend>
|
||||
<depend>tf2_web_republisher</depend>
|
||||
<depend>python-lxml</depend>
|
||||
<depend>python3-lxml</depend>
|
||||
<exec_depend>python-pymavlink</exec_depend>
|
||||
<!-- Use test_depend for packages you need only for testing: -->
|
||||
<!-- <test_depend>gtest</test_depend> -->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
flask==1.1.1
|
||||
docopt==0.6.2
|
||||
geopy==1.11.0
|
||||
smbus2==0.2.1
|
||||
VL53L1X==0.0.2
|
||||
geopy==1.20.0
|
||||
smbus2==0.3.0
|
||||
VL53L1X==0.0.4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# coding=utf-8
|
||||
|
||||
# Copyright (C) 2018 Copter Express Technologies
|
||||
@@ -597,7 +597,7 @@ def check_rangefinder():
|
||||
@check('Boot duration')
|
||||
def check_boot_duration():
|
||||
output = subprocess.check_output('systemd-analyze')
|
||||
r = re.compile(r'([\d\.]+)s$')
|
||||
r = re.compile(r'([\d\.]+)s\s*$', flags=re.MULTILINE)
|
||||
duration = float(r.search(output).groups()[0])
|
||||
if duration > 15:
|
||||
failure('long Raspbian boot duration: %ss (systemd-analyze for analyzing)', duration)
|
||||
|
||||
@@ -177,6 +177,8 @@ inline bool waitTransform(const string& target, const string& source,
|
||||
ros::spinOnce();
|
||||
r.sleep();
|
||||
}
|
||||
// At this point our node has been shut down
|
||||
return false;
|
||||
}
|
||||
|
||||
#define TIMEOUT(msg, timeout) (ros::Time::now() - msg.header.stamp > timeout)
|
||||
@@ -749,6 +751,8 @@ bool land(std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
|
||||
busy = false;
|
||||
return true;
|
||||
}
|
||||
// We should not end up here, but if we did, our node has been shut down
|
||||
return false;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import rospy
|
||||
import pytest
|
||||
from mavros_msgs.msg import State
|
||||
|
||||
BIN
docs/assets/autopilot_orientation.png
Normal file
BIN
docs/assets/autopilot_orientation.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
@@ -1,6 +1,6 @@
|
||||
# Copter Hack 2019
|
||||
|
||||
Хакатон [Copter Hack 2018](https://copterexpress.timepad.ru/event/768108/) проходит 11–13 октября в Технополисе "Москва".
|
||||
Хакатон [Copter Hack 2019](https://copterexpress.timepad.ru/event/768108/) проходит 11–13 октября в Технополисе "Москва".
|
||||
|
||||
Официальный сайт: https://ru.coex.tech/copterhack.
|
||||
|
||||
@@ -10,6 +10,26 @@ Timepad: https://copterexpress.timepad.ru/event/1017592/.
|
||||
|
||||
## Информация для участников
|
||||
|
||||
### Особенности настройки полетного контроллера COEX PIX
|
||||
|
||||
При использовании полетного контроллера *COEX Pix* перед калибровкой датчиков вам стоит обратить внимание, что в графе *Autopilot orientation* вы должны выбрать параметр `ROTATION_ROLL_180_YAW_90`. Данную настройку требуется проводить при калибровке каждого из датчиков.
|
||||
|
||||
<img src="../assets/autopilot_orientation.png" class="center" width=600>
|
||||
|
||||
Этот параметр устанавливается для того, чтобы на программном уровне настроить ориентацию вашего *IMU* датчика находящегося на полетном контроллере.
|
||||
|
||||
### Полет с использованием Optical Flow
|
||||
|
||||
При полете только с использованием Optical Flow необходимо в QGroundControl в параметре `LPE_FUSION` включить галочку `pub agl as lpos down`.
|
||||
|
||||
Необходимо также убедиться, что лазерный дальномер корректно установлен и работает (см. [конфигурирование дальномера](laser.md)).
|
||||
|
||||
### Ориентация камеры
|
||||
|
||||
На многих дронах камера ориентирована шлейфом вперёд. Это следует отразить в файле `main_camera.launch` в пакете `clever`.
|
||||
|
||||
Подробнее см. статью [Ориентация камеры](camera_frame.md).
|
||||
|
||||
## Лекции
|
||||
|
||||
Лекция 1: введение – https://www.youtube.com/watch?v=cjtmZNuq7z0.
|
||||
@@ -17,3 +37,7 @@ Timepad: https://copterexpress.timepad.ru/event/1017592/.
|
||||
Лекция 2: настройка полетного контроллера – https://www.youtube.com/watch?v=PJNDYFPZQms.
|
||||
|
||||
Лекция 3: архитектура полетного контроллера PX4 – https://www.youtube.com/watch?v=_jl7FImq3jk.
|
||||
|
||||
Лекция 4: автономные полеты: https://www.youtube.com/watch?v=ThXiNG1IzvI.
|
||||
|
||||
См. также другие видео на канале COEX на YouTube: https://www.youtube.com/channel/UCeCu93sLBkcgbIkIC7Jaauw/featured.
|
||||
|
||||
Reference in New Issue
Block a user