Compare commits

...

68 Commits

Author SHA1 Message Date
Oleg Kalachev
dc5ffc250b Increase timeouts for aruco_pose test 2022-02-19 04:16:49 +03:00
Oleg Kalachev
7460d6541d Run catkin_test_results in image build 2022-02-19 04:16:11 +03:00
Oleg Kalachev
0f37f19b40 Basic tests for Blocks 2022-02-18 22:52:59 +03:00
Oleg Kalachev
e9c3c6ff72 simple_offboard: match tests and clover.launch parameters 2022-02-18 22:52:29 +03:00
Oleg Kalachev
7909756046 Fix mavros rangefinder subscriber config 2022-02-18 21:24:14 +03:00
Oleg Kalachev
1e8a4841af clover_descrition: remove usage of undeclared argument 2022-02-18 15:40:35 +03:00
Oleg Kalachev
6ec574e193 selfcheck.py: change low space threshold from 100 MB to 1 GB 2022-02-17 15:14:19 +03:00
Oleg Kalachev
8381aecd50 simple_offboard: param for changing mavros name if using multiple (#432) 2022-02-12 12:23:09 +03:00
Oleg Kalachev
f5eb475660 selfcheck.py: check free disk space 2022-02-11 15:03:37 +03:00
Oleg Kalachev
928f4f135e docs: fix for markdownlint 2022-02-11 11:06:58 +03:00
Oleg Kalachev
8d15de0849 docs: article with testing list 2022-02-11 11:00:48 +03:00
Oleg Kalachev
826f631b97 Fix version in package.xml files 2022-02-10 13:49:14 +03:00
Oleg Kalachev
52b5d7b04e CI: disable Melodic build 2022-02-10 13:33:32 +03:00
Oleg Kalachev
455d52007e Update version in package.xml files 2022-02-10 13:31:12 +03:00
Oleg Kalachev
e9e6cabbb9 builder: use cv-camera@0.5.1 with init fix 2022-02-10 13:30:42 +03:00
Oleg Kalachev
8fcd6e9b9e builder: validate version of some ros packages 2022-02-10 13:30:14 +03:00
Oleg Kalachev
24d3a1df8d docs: minor fix of links rendering 2022-02-09 16:49:15 +03:00
Oleg Kalachev
9784e7bfa1 docs: change python to python3 in autolaunch article 2022-02-09 16:41:19 +03:00
Oleg Kalachev
fbad85d87f docs: add main_camera_optical to frames article 2022-02-07 09:44:53 +03:00
Oleg Kalachev
c1ca40187e www: add date and offset param to topics viewer 2022-02-03 05:05:08 +03:00
Oleg Kalachev
c1179869cd www: remove annoying hover title in topics viewer 2022-02-03 04:37:22 +03:00
Oleg Kalachev
2096be5080 docs: rename px4_parameters to parameters.md 2022-02-01 11:40:20 +03:00
Oleg Kalachev
0c879f2aad docs: rename px4_parameters.md article to parameters.md 2022-02-01 11:37:41 +03:00
Oleg Kalachev
f34e8b4774 docs: updates (en) 2022-02-01 11:19:40 +03:00
Oleg Kalachev
be76ea82d7 docs: some updates to optical flow article 2022-02-01 11:04:10 +03:00
Oleg Kalachev
6a8806c476 docs: some updates in setup section 2022-02-01 11:03:27 +03:00
Oleg Kalachev
00a76a306e docs: update PX4 docs links 2022-02-01 11:02:26 +03:00
Oleg Kalachev
f66b53f9cb docs: update PX4 docs links 2022-02-01 11:01:56 +03:00
Oleg Kalachev
28927246db docs: minor fix 2022-02-01 10:57:12 +03:00
Oleg Kalachev
ca5817c3d2 builder: fix Butterfly installation
Fix the `can't find Rust compiler` error using the older PyOpenSSL
to not update `cryptography` because newer `cryptography` requires Rust to install.
2022-02-01 10:53:28 +03:00
Oleg Kalachev
7717461631 genmap.py: use -o flag in example 2022-02-01 08:30:59 +03:00
Oleg Kalachev
3f352ebc06 docs: reduce size of some images 2022-02-01 08:29:29 +03:00
Oleg Kalachev
8c8fe5c40c docs: reduce qgc-params.png file size 2022-02-01 08:29:23 +03:00
Oleg Kalachev
d89e5eada7 selfcheck.py: add checking map=>body transform 2022-02-01 08:28:43 +03:00
Oleg Kalachev
2ee90e62fc Minor typo in mavros_config 2022-02-01 07:04:43 +03:00
Elena Seliverstova
848d9dcbe4 docs: contests article (#430)
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-02-01 06:04:35 +03:00
Oleg Kalachev
6d68d06787 simple_offboard: default reference frames
To simplify running with rosrun
2022-01-30 00:37:24 +03:00
Oleg Kalachev
d18ca32688 www: add console page to show logs 2022-01-28 08:08:41 +03:00
Oleg Kalachev
bf9f7d035f docs: edit programming intro text 2022-01-28 06:21:53 +03:00
Oleg Kalachev
1aec5063d6 docs: simplify and fix some snippets 2022-01-28 06:20:57 +03:00
Oleg Kalachev
e7eae1c02d ci: cancel previous docs builds to avoid publishing old site 2022-01-25 19:12:47 +03:00
Oleg Kalachev
e3958d7fef selfcheck.py: increase long boot duration value to 20 2022-01-21 23:22:47 +03:00
Oleg Kalachev
fb47858010 selfcheck.py: add checking map->base_link tf transform 2022-01-21 23:22:33 +03:00
Oleg Kalachev
a525714e3a mavros: disable startup_px4_usb_quirk 2022-01-20 19:56:44 +03:00
Oleg Kalachev
29fdbf23af docs: update copterhack-2022 teams list 2022-01-11 16:39:31 +03:00
Oleg Kalachev
6eacb8966a docs: fix broken links 2022-01-10 05:39:53 +03:00
Oleg Kalachev
d8afb711f0 docs: fix links copterhack-2022 articles 2022-01-10 04:56:06 +03:00
Oleg Kalachev
cba12e115e builder: remove unneeded catkin_blacklist_packages 2021-12-16 13:57:13 +03:00
Oleg Kalachev
bb6a6c81f3 selfcheck.py: don’t show 'different index' warnings 2021-12-16 13:41:14 +03:00
Elena Seliverstova
d27bbf31bd docs: video contest page (#427)
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2021-12-16 00:21:48 +03:00
Oleg Kalachev
8668295cfe docs: fix 2021-12-14 19:24:59 +03:00
Oleg Kalachev
535b366bab docs: update copterhack article 2021-12-14 18:52:32 +03:00
Oleg Kalachev
9f6aa7dabd docs: add get-param and set-param snippets 2021-12-11 09:54:02 +03:00
Oleg Kalachev
f4d00a47af docs: fix 2021-12-10 16:19:07 +03:00
Oleg Kalachev
0f438235c2 docs: minor fix 2021-12-10 09:43:09 +03:00
Oleg Kalachev
e4ad687e28 docs: fix to native simulator setup article 2021-12-10 09:07:27 +03:00
Oleg Kalachev
5d58ffd1db docs: rework native simulator installation article 2021-12-10 07:53:55 +03:00
Oleg Kalachev
b2ed1fccc6 simple_offboard: remove warnings 2021-12-10 05:00:08 +03:00
Oleg Kalachev
aa136e7f15 docs: minor fix 2021-12-10 02:28:28 +03:00
Oleg Kalachev
9743bcbaaf Disable publish_sim_time in mavros as it breaks the simulation 2021-12-10 02:28:18 +03:00
Oleg Kalachev
75aed624db docs: remove unneeded 'coding' from program template 2021-11-30 16:40:35 +03:00
Oleg Kalachev
36a4962bc0 www: add link to topics list page in topic viewer 2021-11-25 23:41:24 +03:00
Oleg Kalachev
2cd3be1139 optical_flow: ability to change default flow gyro values 2021-11-25 23:36:20 +03:00
Oleg Kalachev
6909ba5819 www: change background when connection in closed in topics view 2021-11-25 23:27:09 +03:00
Oleg Kalachev
f1783bdd0b selfcheck.py: ignore some records of error log in report 2021-11-25 22:54:45 +03:00
Oleg Kalachev
528be179e6 selfcheck.py: parse warnings from error log correctly 2021-11-25 22:49:31 +03:00
Oleg Kalachev
fe588e7af9 blocks: raise exception when cannot connect to pigpiod 2021-11-22 20:16:10 +03:00
Oleg Kalachev
15551db840 docs: add redirect from /gpio 2021-11-22 20:10:39 +03:00
91 changed files with 902 additions and 266 deletions

View File

@@ -7,13 +7,13 @@ on:
branches: [ master ] branches: [ master ]
jobs: jobs:
melodic: # melodic:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v2 # - uses: actions/checkout@v2
- name: Native Melodic build # - name: Native Melodic build
run: | # run: |
docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:melodic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh # docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:melodic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh
noetic: noetic:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@@ -10,6 +10,10 @@ jobs:
docs: docs:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js - name: Use Node.js
uses: actions/setup-node@v1 uses: actions/setup-node@v1

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<package format="2"> <package format="2">
<name>aruco_pose</name> <name>aruco_pose</name>
<version>0.21.1</version> <version>0.23.0</version>
<description>Positioning with ArUco markers</description> <description>Positioning with ArUco markers</description>
<maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer> <maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer>

View File

@@ -30,7 +30,7 @@ Options:
-o <filename> Output map file name in the 'map' subdirectory of aruco_pose package -o <filename> Output map file name in the 'map' subdirectory of aruco_pose package
Example: Example:
rosrun aruco_pose genmap.py 0.33 2 4 1 1 0 > $(catkin_find aruco_pose map)/test_map.txt rosrun aruco_pose genmap.py 0.33 2 4 1 1 0 -o test_map.txt
""" """
from __future__ import print_function from __future__ import print_function

View File

@@ -9,10 +9,10 @@ def node():
return rospy.init_node('aruco_pose_opencv_crash', anonymous=True) return rospy.init_node('aruco_pose_opencv_crash', anonymous=True)
def test_opencv_crashes_img01(node): def test_opencv_crashes_img01(node):
rospy.wait_for_message('aruco_detect_01/visualization', VisMarkerArray, timeout=5) rospy.wait_for_message('aruco_detect_01/visualization', VisMarkerArray, timeout=20)
def test_opencv_crashes_img02(node): def test_opencv_crashes_img02(node):
rospy.wait_for_message('aruco_detect_02/visualization', VisMarkerArray, timeout=5) rospy.wait_for_message('aruco_detect_02/visualization', VisMarkerArray, timeout=20)
def test_opencv_crashes_img03(node): def test_opencv_crashes_img03(node):
rospy.wait_for_message('aruco_detect_03/visualization', VisMarkerArray, timeout=5) rospy.wait_for_message('aruco_detect_03/visualization', VisMarkerArray, timeout=20)

View File

@@ -90,7 +90,7 @@ echo_stamp "Installing OpenCV 4.2-compatible ROS packages"
apt install -y --no-install-recommends \ apt install -y --no-install-recommends \
ros-${ROS_DISTRO}-compressed-image-transport=1.14.0-0buster \ ros-${ROS_DISTRO}-compressed-image-transport=1.14.0-0buster \
ros-${ROS_DISTRO}-cv-bridge=1.15.0-0buster \ ros-${ROS_DISTRO}-cv-bridge=1.15.0-0buster \
ros-${ROS_DISTRO}-cv-camera=0.5.0-0buster \ ros-${ROS_DISTRO}-cv-camera=0.5.1-0buster \
ros-${ROS_DISTRO}-image-publisher=1.15.3-0buster \ ros-${ROS_DISTRO}-image-publisher=1.15.3-0buster \
ros-${ROS_DISTRO}-web-video-server=0.2.1-0buster ros-${ROS_DISTRO}-web-video-server=0.2.1-0buster
apt-mark hold \ apt-mark hold \
@@ -112,7 +112,7 @@ my_travis_retry pip3 install wheel
my_travis_retry pip3 install -r /home/pi/catkin_ws/src/clover/clover/requirements.txt my_travis_retry pip3 install -r /home/pi/catkin_ws/src/clover/clover/requirements.txt
source /opt/ros/${ROS_DISTRO}/setup.bash source /opt/ros/${ROS_DISTRO}/setup.bash
# Don't build simulation plugins for actual drone # Don't build simulation plugins for actual drone
catkin_make -j2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_BLACKLIST_PACKAGES=clover_gazebo_plugins catkin_make -j2 -DCMAKE_BUILD_TYPE=RelWithDebInfo
source devel/setup.bash source devel/setup.bash
echo_stamp "Install clever package (for backwards compatibility)" echo_stamp "Install clever package (for backwards compatibility)"
@@ -146,7 +146,7 @@ echo_stamp "Install GeographicLib datasets (needed for mavros)" \
echo_stamp "Running tests" echo_stamp "Running tests"
cd /home/pi/catkin_ws cd /home/pi/catkin_ws
# FIXME: Investigate failing tests # FIXME: Investigate failing tests
catkin_make run_tests #&& catkin_test_results catkin_make run_tests && catkin_test_results
echo_stamp "Change permissions for catkin_ws" echo_stamp "Change permissions for catkin_ws"
chown -Rf pi:pi /home/pi/catkin_ws chown -Rf pi:pi /home/pi/catkin_ws

View File

@@ -138,6 +138,7 @@ echo_stamp "Install and enable Butterfly (web terminal)"
echo_stamp "Workaround for tornado >= 6.0 breaking butterfly" echo_stamp "Workaround for tornado >= 6.0 breaking butterfly"
export CRYPTOGRAPHY_DONT_BUILD_RUST=1 export CRYPTOGRAPHY_DONT_BUILD_RUST=1
my_travis_retry pip3 install cryptography==3.4.6 # https://stackoverflow.com/a/68472128/6850197 my_travis_retry pip3 install cryptography==3.4.6 # https://stackoverflow.com/a/68472128/6850197
my_travis_retry pip3 install pyOpenSSL==20.0.1
my_travis_retry pip3 install tornado==5.1.1 my_travis_retry pip3 install tornado==5.1.1
my_travis_retry pip3 install butterfly my_travis_retry pip3 install butterfly
my_travis_retry pip3 install butterfly[systemd] my_travis_retry pip3 install butterfly[systemd]

View File

@@ -58,5 +58,9 @@ rosversion rosshow
rosversion nodelet rosversion nodelet
rosversion image_view rosversion image_view
# validate some versions
[[ $(rosversion cv_camera) == "0.5.1" ]] # patched version with init fix
[[ $(rosversion ws281x) == "0.0.12" ]]
# validate examples are present # validate examples are present
[[ $(ls /home/pi/examples/*) ]] [[ $(ls /home/pi/examples/*) ]]

View File

@@ -47,9 +47,6 @@
<!-- simplified offboard control --> <!-- simplified offboard control -->
<node name="simple_offboard" pkg="clover" type="simple_offboard" output="screen" clear_params="true"> <node name="simple_offboard" pkg="clover" type="simple_offboard" output="screen" clear_params="true">
<param name="reference_frames/body" value="map"/>
<param name="reference_frames/base_link" value="map"/>
<param name="reference_frames/navigate_target" value="map"/>
<param name="reference_frames/main_camera_optical" value="map"/> <param name="reference_frames/main_camera_optical" value="map"/>
</node> </node>

View File

@@ -39,7 +39,7 @@
<rosparam command="load" file="$(find clover)/launch/mavros_config.yaml"/> <rosparam command="load" file="$(find clover)/launch/mavros_config.yaml"/>
<!-- remap rangefinder --> <!-- remap rangefinder -->
<remap from="mavros/distance_sensor/rangefinder_sub" to="rangefinder/range"/> <remap from="mavros/distance_sensor/rangefinder_sub" to="$(arg distance_sensor_remap)" if="$(eval bool(distance_sensor_remap))"/>
<rosparam param="plugin_whitelist"> <rosparam param="plugin_whitelist">
- altitude - altitude

View File

@@ -1,11 +1,11 @@
# Config file for mavros # Config file for mavros
# Based on https://raw.githubusercontent.com/mavlink/mavros/master/mavros/launch/px4_config.yaml # Based on https://raw.githubusercontent.com/mavlink/mavros/master/mavros/launch/px4_config.yaml
startup_px4_usb_quirk: true startup_px4_usb_quirk: false
conn: conn:
heartbeat_rate: 1.0 # send hertbeat rate in Hertz heartbeat_rate: 1.0 # send heartbeat rate in Hertz
timeout: 10.0 # hertbeat timeout in seconds timeout: 10.0 # heartbeat timeout in seconds
timesync_rate: 10.0 # TIMESYNC rate in Hertz (feature disabled if 0.0) timesync_rate: 10.0 # TIMESYNC rate in Hertz (feature disabled if 0.0)
system_time_rate: 1.0 # send system time to FCU rate in Hertz (disabled if 0.0) system_time_rate: 1.0 # send system time to FCU rate in Hertz (disabled if 0.0)
@@ -13,6 +13,7 @@ time:
time_ref_source: "fcu" # time_reference source time_ref_source: "fcu" # time_reference source
timesync_mode: MAVLINK timesync_mode: MAVLINK
timesync_avg_alpha: 0.6 # timesync averaging factor timesync_avg_alpha: 0.6 # timesync averaging factor
publish_sim_time: false # don't publish /clock
global_position: global_position:
frame_id: "map" # origin frame frame_id: "map" # origin frame
@@ -77,6 +78,9 @@ distance_sensor:
field_of_view: 0.5 field_of_view: 0.5
rangefinder_sub: rangefinder_sub:
subscriber: true subscriber: true
id: 1
orientation: PITCH_270
covariance: 1 # cm
# fake_gps # fake_gps
fake_gps: fake_gps:

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<package format="3"> <package format="3">
<name>clover</name> <name>clover</name>
<version>0.21.1</version> <version>0.23.0</version>
<description>The Clover package</description> <description>The Clover package</description>
<maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer> <maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer>

View File

@@ -53,6 +53,7 @@ private:
std::unique_ptr<tf2_ros::Buffer> tf_buffer_; std::unique_ptr<tf2_ros::Buffer> tf_buffer_;
std::unique_ptr<tf2_ros::TransformListener> tf_listener_; std::unique_ptr<tf2_ros::TransformListener> tf_listener_;
bool calc_flow_gyro_; bool calc_flow_gyro_;
float flow_gyro_default_;
void onInit() void onInit()
{ {
@@ -69,6 +70,7 @@ private:
roi_px_ = nh_priv.param("roi", 128); roi_px_ = nh_priv.param("roi", 128);
roi_rad_ = nh_priv.param("roi_rad", 0.0); roi_rad_ = nh_priv.param("roi_rad", 0.0);
calc_flow_gyro_ = nh_priv.param("calc_flow_gyro", false); calc_flow_gyro_ = nh_priv.param("calc_flow_gyro", false);
flow_gyro_default_ = nh_priv.param("flow_gyro_default", NAN);
img_pub_ = it_priv.advertise("debug", 1); img_pub_ = it_priv.advertise("debug", 1);
flow_pub_ = nh.advertise<mavros_msgs::OpticalFlowRad>("mavros/px4flow/raw/send", 1); flow_pub_ = nh.advertise<mavros_msgs::OpticalFlowRad>("mavros/px4flow/raw/send", 1);
@@ -194,9 +196,9 @@ private:
uint32_t integration_time_us = integration_time.toSec() * 1.0e6; uint32_t integration_time_us = integration_time.toSec() * 1.0e6;
// Calculate flow gyro // Calculate flow gyro
flow_.integrated_xgyro = NAN; flow_.integrated_xgyro = flow_gyro_default_;
flow_.integrated_ygyro = NAN; flow_.integrated_ygyro = flow_gyro_default_;
flow_.integrated_zgyro = NAN; flow_.integrated_zgyro = flow_gyro_default_;
if (calc_flow_gyro_) { if (calc_flow_gyro_) {
try { try {

View File

@@ -485,6 +485,12 @@ def check_local_position():
failure('roll is %.2f deg; place copter horizontally or redo level horizon calib', failure('roll is %.2f deg; place copter horizontally or redo level horizon calib',
math.degrees(roll)) math.degrees(roll))
if not tf_buffer.can_transform('base_link', pose.header.frame_id, rospy.get_rostime(), rospy.Duration(0.5)):
failure('can\'t transform from %s to base_link (timeout 0.5 s): is TF enabled?', pose.header.frame_id)
if not tf_buffer.can_transform('body', pose.header.frame_id, rospy.get_rostime(), rospy.Duration(0.5)):
failure('can\'t transform from %s to body (timeout 0.5 s)', pose.header.frame_id)
except rospy.ROSException: except rospy.ROSException:
failure('no local position') failure('no local position')
@@ -614,7 +620,7 @@ def check_boot_duration():
output = subprocess.check_output('systemd-analyze').decode() output = subprocess.check_output('systemd-analyze').decode()
r = re.compile(r'([\d\.]+)s\s*$', flags=re.MULTILINE) r = re.compile(r'([\d\.]+)s\s*$', flags=re.MULTILINE)
duration = float(r.search(output).groups()[0]) duration = float(r.search(output).groups()[0])
if duration > 15: if duration > 20:
failure('long Raspbian boot duration: %ss (systemd-analyze for analyzing)', duration) failure('long Raspbian boot duration: %ss (systemd-analyze for analyzing)', duration)
@@ -648,13 +654,22 @@ def check_clover_service():
elif 'failed' in output: elif 'failed' in output:
failure('service failed to run, check your launch-files') failure('service failed to run, check your launch-files')
r = re.compile(r'^(.*)\[(FATAL|ERROR)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$') BLACKLIST = 'Unexpected command 520', 'Time jump detected', 'different index:'
r = re.compile(r'^(.*)\[(FATAL|ERROR| WARN)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$')
error_count = OrderedDict() error_count = OrderedDict()
try: try:
for line in open('/tmp/clover.err', 'r'): for line in open('/tmp/clover.err', 'r'):
skip = False
for substr in BLACKLIST:
if substr in line:
skip = True
if skip:
continue
node_error = r.search(line) node_error = r.search(line)
if node_error: if node_error:
msg = node_error.groups()[1] + ': ' + node_error.groups()[2] msg = node_error.groups()[1].strip() + ': ' + node_error.groups()[2]
if msg in error_count: if msg in error_count:
error_count[msg] += 1 error_count[msg] += 1
else: else:
@@ -725,6 +740,14 @@ def check_network():
@check('RPi health') @check('RPi health')
def check_rpi_health(): def check_rpi_health():
try:
import shutil
total, used, free = shutil.disk_usage('/')
if free < 1024 * 1024 * 1024:
failure('disk space is less than 1 GB; consider removing logs (~/.ros/log/)')
except Exception as e:
info('could not check the disk free space: %s', str(e))
# `vcgencmd get_throttled` output codes taken from # `vcgencmd get_throttled` output codes taken from
# https://github.com/raspberrypi/documentation/blob/JamesH65-patch-vcgencmd-vcdbg-docs/raspbian/applications/vcgencmd.md#get_throttled # https://github.com/raspberrypi/documentation/blob/JamesH65-patch-vcgencmd-vcdbg-docs/raspbian/applications/vcgencmd.md#get_throttled
# TODO: support more base platforms? # TODO: support more base platforms?

View File

@@ -61,6 +61,7 @@ std::shared_ptr<tf2_ros::TransformBroadcaster> transform_broadcaster;
std::shared_ptr<tf2_ros::StaticTransformBroadcaster> static_transform_broadcaster; std::shared_ptr<tf2_ros::StaticTransformBroadcaster> static_transform_broadcaster;
// Parameters // Parameters
string mavros;
string local_frame; string local_frame;
string fcu_frame; string fcu_frame;
ros::Duration transform_timeout; ros::Duration transform_timeout;
@@ -181,6 +182,7 @@ inline bool waitTransform(const string& target, const string& source,
ros::spinOnce(); ros::spinOnce();
r.sleep(); r.sleep();
} }
return false;
} }
#define TIMEOUT(msg, timeout) (msg.header.stamp.isZero() || (ros::Time::now() - msg.header.stamp > timeout)) #define TIMEOUT(msg, timeout) (msg.header.stamp.isZero() || (ros::Time::now() - msg.header.stamp > timeout))
@@ -847,6 +849,7 @@ bool land(std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
busy = false; busy = false;
return true; return true;
} }
return false;
} }
int main(int argc, char **argv) int main(int argc, char **argv)
@@ -859,8 +862,9 @@ int main(int argc, char **argv)
static_transform_broadcaster = std::make_shared<tf2_ros::StaticTransformBroadcaster>(); static_transform_broadcaster = std::make_shared<tf2_ros::StaticTransformBroadcaster>();
// Params // Params
nh.param<string>("mavros/local_position/tf/frame_id", local_frame, "map"); nh_priv.param("mavros", mavros, string("mavros")); // for case of using multiple connections
nh.param<string>("mavros/local_position/tf/child_frame_id", fcu_frame, "base_link"); nh.param<string>(mavros + "/local_position/tf/frame_id", local_frame, "map");
nh.param<string>(mavros + "/local_position/tf/child_frame_id", fcu_frame, "base_link");
nh_priv.param("target_frame", target.child_frame_id, string("navigate_target")); nh_priv.param("target_frame", target.child_frame_id, string("navigate_target"));
nh_priv.param("setpoint", setpoint.child_frame_id, string("setpoint")); nh_priv.param("setpoint", setpoint.child_frame_id, string("setpoint"));
nh_priv.param("auto_release", auto_release, true); nh_priv.param("auto_release", auto_release, true);
@@ -871,6 +875,13 @@ int main(int argc, char **argv)
nh_priv.param<string>("body_frame", body.child_frame_id, "body"); nh_priv.param<string>("body_frame", body.child_frame_id, "body");
nh_priv.getParam("reference_frames", reference_frames); nh_priv.getParam("reference_frames", reference_frames);
// Default reference frames
std::map<string, string> default_reference_frames;
default_reference_frames[body.child_frame_id] = local_frame;
default_reference_frames[fcu_frame] = local_frame;
if (!target.child_frame_id.empty()) default_reference_frames[target.child_frame_id] = local_frame;
reference_frames.insert(default_reference_frames.begin(), default_reference_frames.end()); // merge defaults
state_timeout = ros::Duration(nh_priv.param("state_timeout", 3.0)); state_timeout = ros::Duration(nh_priv.param("state_timeout", 3.0));
local_position_timeout = ros::Duration(nh_priv.param("local_position_timeout", 2.0)); local_position_timeout = ros::Duration(nh_priv.param("local_position_timeout", 2.0));
velocity_timeout = ros::Duration(nh_priv.param("velocity_timeout", 2.0)); velocity_timeout = ros::Duration(nh_priv.param("velocity_timeout", 2.0));
@@ -885,25 +896,25 @@ int main(int argc, char **argv)
arming_timeout = ros::Duration(nh_priv.param("arming_timeout", 4.0)); arming_timeout = ros::Duration(nh_priv.param("arming_timeout", 4.0));
// Service clients // Service clients
arming = nh.serviceClient<mavros_msgs::CommandBool>("mavros/cmd/arming"); arming = nh.serviceClient<mavros_msgs::CommandBool>(mavros + "/cmd/arming");
set_mode = nh.serviceClient<mavros_msgs::SetMode>("mavros/set_mode"); set_mode = nh.serviceClient<mavros_msgs::SetMode>(mavros + "/set_mode");
// Telemetry subscribers // Telemetry subscribers
auto state_sub = nh.subscribe("mavros/state", 1, &handleState); auto state_sub = nh.subscribe(mavros + "/state", 1, &handleState);
auto velocity_sub = nh.subscribe("mavros/local_position/velocity_body", 1, &handleMessage<TwistStamped, velocity>); auto velocity_sub = nh.subscribe(mavros + "/local_position/velocity_body", 1, &handleMessage<TwistStamped, velocity>);
auto global_position_sub = nh.subscribe("mavros/global_position/global", 1, &handleMessage<NavSatFix, global_position>); auto global_position_sub = nh.subscribe(mavros + "/global_position/global", 1, &handleMessage<NavSatFix, global_position>);
auto battery_sub = nh.subscribe("mavros/battery", 1, &handleMessage<BatteryState, battery>); auto battery_sub = nh.subscribe(mavros + "/battery", 1, &handleMessage<BatteryState, battery>);
auto statustext_sub = nh.subscribe("mavros/statustext/recv", 1, &handleMessage<mavros_msgs::StatusText, statustext>); auto statustext_sub = nh.subscribe(mavros + "/statustext/recv", 1, &handleMessage<mavros_msgs::StatusText, statustext>);
auto manual_control_sub = nh.subscribe("mavros/manual_control/control", 1, &handleMessage<mavros_msgs::ManualControl, manual_control>); auto manual_control_sub = nh.subscribe(mavros + "/manual_control/control", 1, &handleMessage<mavros_msgs::ManualControl, manual_control>);
auto local_position_sub = nh.subscribe("mavros/local_position/pose", 1, &handleLocalPosition); auto local_position_sub = nh.subscribe(mavros + "/local_position/pose", 1, &handleLocalPosition);
// Setpoint publishers // Setpoint publishers
position_pub = nh.advertise<PoseStamped>("mavros/setpoint_position/local", 1); position_pub = nh.advertise<PoseStamped>(mavros + "/setpoint_position/local", 1);
position_raw_pub = nh.advertise<PositionTarget>("mavros/setpoint_raw/local", 1); position_raw_pub = nh.advertise<PositionTarget>(mavros + "/setpoint_raw/local", 1);
attitude_pub = nh.advertise<PoseStamped>("mavros/setpoint_attitude/attitude", 1); attitude_pub = nh.advertise<PoseStamped>(mavros + "/setpoint_attitude/attitude", 1);
attitude_raw_pub = nh.advertise<AttitudeTarget>("mavros/setpoint_raw/attitude", 1); attitude_raw_pub = nh.advertise<AttitudeTarget>(mavros + "/setpoint_raw/attitude", 1);
rates_pub = nh.advertise<TwistStamped>("mavros/setpoint_attitude/cmd_vel", 1); rates_pub = nh.advertise<TwistStamped>(mavros + "/setpoint_attitude/cmd_vel", 1);
thrust_pub = nh.advertise<Thrust>("mavros/setpoint_attitude/thrust", 1); thrust_pub = nh.advertise<Thrust>(mavros + "/setpoint_attitude/thrust", 1);
// Service servers // Service servers
auto gt_serv = nh.advertiseService("get_telemetry", &getTelemetry); auto gt_serv = nh.advertiseService("get_telemetry", &getTelemetry);

View File

@@ -33,3 +33,29 @@ def test_web_video_server(node):
# Python 3 # Python 3
import urllib.request as urllib import urllib.request as urllib
urllib.urlopen("http://localhost:8080").read() urllib.urlopen("http://localhost:8080").read()
def test_blocks(node):
rospy.wait_for_service('clover_blocks/run', timeout=5)
rospy.wait_for_service('clover_blocks/stop', timeout=5)
rospy.wait_for_service('clover_blocks/load', timeout=5)
rospy.wait_for_service('clover_blocks/store', timeout=5)
from std_msgs.msg import String
from clover_blocks.srv import Run
def wait_print():
try:
wait_print.result = rospy.wait_for_message('clover_blocks/print', String, timeout=5).data
except Exception as e:
wait_print.result = str(e)
import threading
t = threading.Thread(target=wait_print)
t.start()
rospy.sleep(0.1)
run = rospy.ServiceProxy('clover_blocks/run', Run)
assert run(code='print("test")').success == True
t.join()
assert wait_print.result == 'test'

View File

@@ -23,10 +23,7 @@
<node pkg="tf2_ros" type="static_transform_publisher" name="map_flipped_frame" args="0 0 0 3.1415926 3.1415926 0 map map_flipped" required="true"/> <node pkg="tf2_ros" type="static_transform_publisher" name="map_flipped_frame" args="0 0 0 3.1415926 3.1415926 0 map map_flipped" required="true"/>
<node name="simple_offboard" pkg="clover" type="simple_offboard" required="true" output="screen"> <node name="simple_offboard" pkg="clover" type="simple_offboard" required="true" output="screen"/>
<param name="reference_frames/body" value="map"/>
<param name="reference_frames/base_link" value="map"/>
</node>
<node name="tf2_web_republisher" pkg="tf2_web_republisher" type="tf2_web_republisher" required="true"/> <node name="tf2_web_republisher" pkg="tf2_web_republisher" type="tf2_web_republisher" required="true"/>
@@ -38,6 +35,8 @@
<rosparam param="notify">startup: { r: 255, g: 255, b: 255 }</rosparam> <rosparam param="notify">startup: { r: 255, g: 255, b: 255 }</rosparam>
</node> </node>
<node name="clover_blocks" pkg="clover_blocks" type="clover_blocks" output="screen" required="true"/>
<param name="test_module" value="$(find clover)/test/basic.py"/> <param name="test_module" value="$(find clover)/test/basic.py"/>
<test test-name="basic_test" pkg="ros_pytest" type="ros_pytest_runner"/> <test test-name="basic_test" pkg="ros_pytest" type="ros_pytest_runner"/>
</launch> </launch>

23
clover/www/console.html Normal file
View File

@@ -0,0 +1,23 @@
<h1>
/var/log/clover.log
<a style="font-size: 0.5em; vertical-align: super; font-weight: normal" href="clover.log" download>download</a>
</h1>
<pre></pre>
<script type="module">
var pre = document.querySelector('pre');
fetch('clover.log?' + Math.random()).then(function(response) { // random to forbid caching
if (response.status == 404) {
pre.innerHTML = '/var/log/clover.log does not exist';
return;
} else if (response.status !== 200) {
pre.innerHTML('Error ' + response.status);
return;
}
response.text().then(function(content) {
pre.innerHTML = content;
});
});
</script>

View File

@@ -9,7 +9,7 @@
<li><a href="" id="butterfly">Open web terminal</a> (<code>Butterfly</code>)</li> <li><a href="" id="butterfly">Open web terminal</a> (<code>Butterfly</code>)</li>
<li>View <a href="viz.html">View 3D visualization</a>, <a href="aruco_map.html">3D visualization for markers map</a> (<code>ros3djs</code>)</li> <li>View <a href="viz.html">View 3D visualization</a>, <a href="aruco_map.html">3D visualization for markers map</a> (<code>ros3djs</code>)</li>
<li><a href="../clover_blocks/">Blocks programming</a> (<code>Blockly</code>)</li> <li><a href="../clover_blocks/">Blocks programming</a> (<code>Blockly</code>)</li>
<li><a href="clover.log">Clover console</a> (<code>/var/log/clover.log</code>)</li> <li><a href="console.html">Clover console</a> (<code>/var/log/clover.log</code>)</li>
</ul> </ul>
<div class="version"></div> <div class="version"></div>

View File

@@ -1,13 +1,16 @@
const url = 'ws://' + location.hostname + ':9090'; const url = 'ws://' + location.hostname + ':9090';
const ros = new ROSLIB.Ros({ url: url }); const ros = new ROSLIB.Ros({ url: url });
const params = Object.fromEntries(new URLSearchParams(window.location.search).entries());
ros.on('connection', function () { ros.on('connection', function () {
document.body.classList.add('connected'); document.body.classList.add('connected');
document.body.classList.remove('closed');
init(); init();
}); });
ros.on('close', function () { ros.on('close', function () {
document.body.classList.remove('connected'); document.body.classList.remove('connected');
document.body.classList.add('closed');
setTimeout(function() { setTimeout(function() {
// reconnect // reconnect
ros.connect(url); ros.connect(url);
@@ -37,18 +40,28 @@ function viewTopicsList() {
let rosdistro; let rosdistro;
function viewTopic(topic) { function viewTopic(topic) {
title.innerHTML = topic; let index = '<a href=topics.html>Topics</a>';
title.innerHTML = `${index}: ${topic}`;
topicMessage.style.display = 'block'; topicMessage.style.display = 'block';
ros.getTopicType(topic, function(typeStr) { ros.getTopicType(topic, function(typeStr) {
const [pack, type] = typeStr.split('/'); const [pack, type] = typeStr.split('/');
let href = `https://docs.ros.org/en/${rosdistro}/api/${pack}/html/msg/${type}.html`; let href = `https://docs.ros.org/en/${rosdistro}/api/${pack}/html/msg/${type}.html`;
title.innerHTML = `${topic} <a id="topic-type" href=${href} target="_blank">${typeStr}</a>`; title.innerHTML = `${index}: ${topic} <a id="topic-type" href=${href} target="_blank">${typeStr}</a>`;
}); });
new ROSLIB.Topic({ ros: ros, name: topic }).subscribe(function(msg) { new ROSLIB.Topic({ ros: ros, name: topic }).subscribe(function(msg) {
document.title = topic; document.title = topic;
if (mouseDown) return; if (mouseDown) return;
if (msg.header.stamp) {
if (params.date || params.offset) {
let date = new Date(msg.header.stamp.secs * 1e3 + msg.header.stamp.nsecs * 1e-6);
if (params.date) msg.header.date = date.toISOString();
if (params.offset) msg.header.offset = (new Date() - date) * 1e-3;
}
}
topicMessage.innerHTML = yamlStringify(msg); // JSON.stringify(msg, null, 4); topicMessage.innerHTML = yamlStringify(msg); // JSON.stringify(msg, null, 4);
}); });
} }
@@ -59,8 +72,6 @@ topicMessage.addEventListener('mousedown', function() { mouseDown = true; });
topicMessage.addEventListener('mouseup', function() { mouseDown = false; }); topicMessage.addEventListener('mouseup', function() { mouseDown = false; });
function init() { function init() {
const params = Object.fromEntries(new URLSearchParams(window.location.search).entries());
if (!params.topic) { if (!params.topic) {
viewTopicsList(); viewTopicsList();
} else { } else {

View File

@@ -17,11 +17,12 @@
} }
#topic-type { font-family: monospace; font-size: 0.5em; vertical-align: super; font-weight: normal; } #topic-type { font-family: monospace; font-size: 0.5em; vertical-align: super; font-weight: normal; }
.topic { font-family: monospace; } .topic { font-family: monospace; }
body.closed { background-color: rgb(207, 207, 207); }
</style> </style>
</head> </head>
<body> <body>
<h1>&nbsp;</h1> <h1>&nbsp;</h1>
<ul id="topics"></ul> <ul id="topics"></ul>
<code id="topic-message" title="Hold mouse button to pause">No messages received</code> <code id="topic-message">No messages received</code>
</body> </body>
</html> </html>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<package format="2"> <package format="2">
<name>clover_blocks</name> <name>clover_blocks</name>
<version>0.21.1</version> <version>0.23.0</version>
<description>Blockly programming support for Clover</description> <description>Blockly programming support for Clover</description>
<maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer> <maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer>
<license>MIT</license> <license>MIT</license>

View File

@@ -464,7 +464,7 @@ Blockly.Python.led_count = function(block) {
function pigpio() { function pigpio() {
Blockly.Python.definitions_['import_pigpio'] = 'import pigpio'; Blockly.Python.definitions_['import_pigpio'] = 'import pigpio';
Blockly.Python.definitions_['init_pigpio'] = 'pi = pigpio.pi()'; Blockly.Python.definitions_['init_pigpio'] = 'pi = pigpio.pi()\nif not pi.connected: raise Exception(\'Cannot connect to pigpiod\')';
} }
const GPIO_READ = `\ndef gpio_read(pin): const GPIO_READ = `\ndef gpio_read(pin):

View File

@@ -1,6 +1,6 @@
<package format="2"> <package format="2">
<name>clover_description</name> <name>clover_description</name>
<version>0.21.1</version> <version>0.23.0</version>
<description>The clover_description package provides URDF models of the Clover series of quadcopters.</description> <description>The clover_description package provides URDF models of the Clover series of quadcopters.</description>
<maintainer email="sfalexrog@gmail.com">Alexey Rogachevskiy</maintainer> <maintainer email="sfalexrog@gmail.com">Alexey Rogachevskiy</maintainer>

View File

@@ -35,7 +35,7 @@
<xacro:property name="sqrt2" value="1.4142135623730951" /> <xacro:property name="sqrt2" value="1.4142135623730951" />
<xacro:property name="rotor_drag_coefficient" value="1.75e-04" /> <xacro:property name="rotor_drag_coefficient" value="1.75e-04" />
<xacro:property name="rolling_moment_coefficient" value="0.000001" /> <xacro:property name="rolling_moment_coefficient" value="0.000001" />
<xacro:property name="color" value="$(arg visual_material)" /> <xacro:property name="color" value="DarkGrey" />
<!-- Property Blocks --> <!-- Property Blocks -->
<!-- Clover body inertia --> <!-- Clover body inertia -->

View File

@@ -1,6 +1,6 @@
<package format="2"> <package format="2">
<name>clover_simulation</name> <name>clover_simulation</name>
<version>0.21.1</version> <version>0.23.0</version>
<description>The clover_simulation package provides worlds and launch files for Gazebo.</description> <description>The clover_simulation package provides worlds and launch files for Gazebo.</description>
<maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer> <maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 KiB

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 972 KiB

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 381 KiB

View File

@@ -70,7 +70,7 @@
* [Remote control app](rc.md) * [Remote control app](rc.md)
* [Wi-Fi Configuration](network.md) * [Wi-Fi Configuration](network.md)
* [UART settings](uart.md) * [UART settings](uart.md)
* [PX4 Parameters](px4_parameters.md) * [PX4 Parameters](parameters.md)
* [PX4 Logs and Topics](flight_logs.md) * [PX4 Logs and Topics](flight_logs.md)
* [PX4 Firmware](firmware.md) * [PX4 Firmware](firmware.md)
* [MAVLink](mavlink.md) * [MAVLink](mavlink.md)
@@ -100,6 +100,8 @@
* [CopterHack-2019](copterhack2019.md) * [CopterHack-2019](copterhack2019.md)
* [CopterHack-2018](copterhack2018.md) * [CopterHack-2018](copterhack2018.md)
* [CopterHack-2017](copterhack2017.md) * [CopterHack-2017](copterhack2017.md)
* [Video contest](video_contest.md)
* [Educational contests](educational_contests.md)
* [Clover-based projects](projects.md) * [Clover-based projects](projects.md)
* [Autonomous Multirotor Landing System (AMLS)](amls.md) * [Autonomous Multirotor Landing System (AMLS)](amls.md)
* [Drone show](clever-show.md) * [Drone show](clever-show.md)

View File

@@ -75,9 +75,9 @@ else:
shape = 'undefined' shape = 'undefined'
color = 'undefined' color = 'undefined'
if shape = 'brown': if shape == 'brown':
culture = "greshiha" culture = "greshiha"
if shape = 'yellow_orange': if shape == 'yellow_orange':
culture = "pshenitsa" culture = "pshenitsa"
image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_colback_color) image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_colback_color)

View File

@@ -1,7 +1,5 @@
# ArUco markers # ArUco markers
> **Note** The following applies to [image versions](image.md) **0.16** and up. Older documentation is still available for [for version **0.15.1**](https://github.com/CopterExpress/clover/blob/v0.15.1/docs/en/aruco.md).
[ArUco markers](https://docs.opencv.org/3.2.0/d5/dae/tutorial_aruco_detection.html) are commonly used for vision-based position estimation. [ArUco markers](https://docs.opencv.org/3.2.0/d5/dae/tutorial_aruco_detection.html) are commonly used for vision-based position estimation.
Examples of ArUco markers: Examples of ArUco markers:

View File

@@ -93,7 +93,7 @@ The marker map adheres to the [ROS coordinate system convention](http://www.ros.
## VPE setup ## VPE setup
In order to enable vision position estimation you should use the following [PX4 parameters](px4_parameters.md). In order to enable vision position estimation you should use the following [PX4 parameters](parameters.md).
If you're using **LPE** (`SYS_MC_EST_GROUP` parameter is set to `local_position_estimator,attitude_estimator_q`): If you're using **LPE** (`SYS_MC_EST_GROUP` parameter is set to `local_position_estimator,attitude_estimator_q`):

View File

@@ -6,7 +6,7 @@ Software autorun
systemd systemd
--- ---
Main documentation: [https://wiki.archlinux.org/index.php/Systemd_(Russian)](https://wiki.archlinux.org/index.php/Systemd_(Russian)). Main documentation: https://wiki.archlinux.org/title/Systemd.
All automatically started Clover software is launched as a `clover.service` systemd service. All automatically started Clover software is launched as a `clover.service` systemd service.
@@ -50,12 +50,12 @@ You can add your own node to the list of automatically launched ones. To do this
The started file must have *permission* to run: The started file must have *permission* to run:
```(bash) ```bash
chmod +x my_program.py chmod +x my_program.py
``` ```
When scripting languages are used, [shebang] should be placed at the beginning of the file (https://ru.wikipedia.org/wiki/Shebang_(Unix)), for example: When scripting languages are used, a <a href="https://en.wikipedia.org/wiki/Shebang_(Unix)">shebang</a> should be placed at the beginning of the file, for example:
```(bash) ```bash
#!/usr/bin/env python #!/usr/bin/env python3
``` ```

View File

@@ -14,7 +14,7 @@ In order to perform the sensor calibration, select the *Vehicle Setup* tab and c
4. Put the drone in one of the orientations marked by the red outline and wait for the appropriate outline to turn yellow. 4. Put the drone in one of the orientations marked by the red outline and wait for the appropriate outline to turn yellow.
5. Spin the drone as required until the outline turns green. Do this for all orientations. 5. Spin the drone as required until the outline turns green. Do this for all orientations.
Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/compass.html. Read more in the PX4 docs: https://docs.px4.io/master/en/config/compass.html.
## Gyroscope ## Gyroscope
@@ -27,7 +27,7 @@ Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/compass.html.
> **Warning** The drone should stay completely still during the calibration. > **Warning** The drone should stay completely still during the calibration.
Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/gyroscope.html. Read more in the PX4 docs: https://docs.px4.io/master/en/config/gyroscope.html.
## Accelerometer ## Accelerometer
@@ -38,7 +38,7 @@ Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/gyroscope.html.
3. Put the drone in one of the orientations marked by the red outline and wait for the appropriate outline to turn yellow. 3. Put the drone in one of the orientations marked by the red outline and wait for the appropriate outline to turn yellow.
4. Hold the drone in this orientation until the outline turns green. Do this for all orientations. 4. Hold the drone in this orientation until the outline turns green. Do this for all orientations.
Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/accelerometer.html. Read more in the PX4 docs: https://docs.px4.io/master/en/config/accelerometer.html.
## Level horizon ## Level horizon
@@ -50,6 +50,6 @@ Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/accelerometer.ht
4. Press *OK*. 4. Press *OK*.
5. Wait for the calibration to finish. 5. Wait for the calibration to finish.
Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/level_horizon_calibration.html. Read more in the PX4 docs: https://docs.px4.io/master/en/config/level_horizon_calibration.html.
**Next**: [RC setup](radio.md). **Next**: [RC setup](radio.md).

View File

@@ -1,6 +1,6 @@
# COEX Pix # COEX Pix
The **COEX Pix** flight controller is a modified [Pixracer](https://docs.px4.io/v1.9.0/en/flight_controller/pixracer.html) FCU. It is a part of the **Clover 4** quadrotor kit. The **COEX Pix** flight controller is a modified [Pixracer](https://docs.px4.io/master/en/flight_controller/pixracer.html) FCU. It is a part of the **Clover 4** quadrotor kit.
> **Hint** The source files of the COEX Pix flight controller are [published](https://github.com/CopterExpress/hardware/tree/master/COEX%20Pix) under the CC BY-NC-SA license. > **Hint** The source files of the COEX Pix flight controller are [published](https://github.com/CopterExpress/hardware/tree/master/COEX%20Pix) under the CC BY-NC-SA license.

View File

@@ -16,7 +16,7 @@ USB connection is the preferred way to connect to the flight controller.
The `connected` field should have the `True` value.s The `connected` field should have the `True` value.s
> **Hint** You need to set the `CBRK_USB_CHK` [parameter](px4_parameters.md) to 197848 for the USB connection to work. > **Hint** You need to set the `CBRK_USB_CHK` [parameter](parameters.md) to 197848 for the USB connection to work.
## UART connection ## UART connection

View File

@@ -11,33 +11,35 @@ The proposed projects have to be open-source and be compatible with the Clover q
## Projects of the contest's participants {#participants} ## Projects of the contest's participants {#participants}
|Place|Team|Project|Points| |Place|Team|Project|Points|
|-|-|-|-| |:-:|-|-|-|
||🇰🇬 Alatoo University Team|[Облачная платформа для симулятора Клевера](https://github.com/pteacher/clover/blob/clover_simulator/docs/ru/clover-development-studio.md)|| ||🇰🇬 Alatoo University Team|[Облачная платформа для симулятора Клевера](https://github.com/pteacher/clover/blob/clover_simulator/docs/ru/clover-development-studio.md)||
||🇧🇾 FTL|[Advanced Clover 2](https://github.com/FTL-team/clover/blob/FTL-advancedClover2/docs/ru/advancedclover2.md)|| ||🇧🇾 FTL|[Advanced Clover 2](https://github.com/FTL-team/clover/blob/FTL-advancedClover2/docs/ru/advanced_clover_simulator.md)||
||🇺🇸 EnviroFleet|[EnviroFleet](https://github.com/gueyman/clover/blob/envirofleet/docs/en/enviro_fleet.md)||
||🇻🇳 Dragon&Tanker|[Dragon&Tanker](https://github.com/uml4/clover/blob/drone_observe_autonomous_car/docs/en/dragon_and_tanker_team.md)||
||🇷🇺 Stereo|[Neural obstacle avoidance](https://github.com/den250400/clover/blob/neural-obstacle-avoidance/docs/en/neural-obstacle-avoidance.md)|| ||🇷🇺 Stereo|[Neural obstacle avoidance](https://github.com/den250400/clover/blob/neural-obstacle-avoidance/docs/en/neural-obstacle-avoidance.md)||
||🇷🇺 Space clowns|[Copter For Space](https://github.com/slavikyd/clover/blob/patch-3/docs/ru/c4s.md)|| ||🇷🇺 Space clowns|[Copter For Space](https://github.com/slavikyd/clover/blob/patch-3/docs/ru/c4s.md)||
||🇷🇺 R.S.|[Drone Hawk](https://github.com/slavaroot/clover/blob/droneHawkSecurity/docs/ru/drone-hawk-security.md)|| ||🇷🇺 R.S.|[Drone Hawk](https://github.com/slavaroot/clover/blob/droneHawkSecurity/docs/ru/drone-hawk-security.md)||
||🇲🇾 Moopt|[IoT Water Monitoring & Optimization](https://github.com/kafechew/clover/blob/master/docs/en/moopt-uav.md)|| ||🇲🇾 Moopt|[IoT Water Monitoring & Optimization](https://github.com/kafechew/clover/blob/master/docs/en/moopt-uav.md)||
||🇧🇷 Atena - Grupo SEMEAR|[Swarm in Blocks](https://github.com/Grupo-SEMEAR-USP/clover/blob/Swarm_in_Blocks/docs/en/Swarm_in_Blocks.md)|| ||🇧🇷 Atena - Grupo SEMEAR|[Swarm in Blocks](https://github.com/Grupo-SEMEAR-USP/clover/blob/Swarm_in_Blocks/docs/en/swarm_in_blocks.md)||
||🇷🇺 Clevertron|[Clevertron](https://github.com/Daniel-drone/clover/blob/Clevertron-1/docs/ru/clevertron.md)|| ||🇷🇺 Clevertron|[Clevertron](https://github.com/Daniel-drone/clover/blob/Clevertron-1/docs/ru/clevertron.md)||
||🇷🇺 Clover Rescue Team|[Rescue Clover](https://github.com/DevMBS/clover/blob/CloverRescueTeam/docs/ru/clover-rescue-team.md)|| ||🇷🇺 Clover Rescue Team|[Rescue Clover](https://github.com/DevMBS/clover/blob/CloverRescueTeam/docs/ru/clover-rescue-team.md)||
||🇵🇱 Edgenoon|[Neural and vision-based landing method](https://github.com/edgenoon-ai/clover/blob/neural_vision_based_landing_method/docs/en/neural_vision_based_landing_method.md)|| ||🇵🇱 Edgenoon|[Neural and vision-based landing method](https://github.com/edgenoon-ai/clover/blob/neural_vision_based_landing_method/docs/en/neural_vision_based_landing_method.md)||
||🇷🇺 CopterCat|[CopterCat](https://github.com/matveylapin/clover/blob/CopterCat/docs/ru/сopter_сat.md)|| ||🇷🇺 CopterCat|[CopterCat](https://github.com/matveylapin/clover/blob/CopterCat/docs/ru/сopter_сat.md)||
||🇷🇺 Дрой Ронов|[Clover Swarm](https://github.com/stinger000/clever/blob/clover_swarm_request/docs/ru/clover-swarm.md)|| ||🇷🇺 Дрой Ронов|[Clover Swarm](https://github.com/stinger000/clever/blob/clover_swarm_request/docs/ru/clover-swarm.md)||
||🇩🇪 Inondro|[Inondro Pix](https://github.com/Inondro/clover/blob/inondro-pix/docs/en/inondro_copterhack22_pix.md)|| ||🇩🇪 Inondro|[Inondro Pix](https://github.com/Inondro/clover/blob/inondro-pix/docs/en/inondro_copterhack22_pix.md)||
||🇷🇺 V-NAV|[Visual Navigation](https://github.com/v-nav/clover/blob/v-nav_article/docs/ru/v-nav.md)||
||🇷🇺 Бизнес-гуси|[Drone Rover Climbing System](https://github.com/HexaHEX/clover/blob/CopterHack2022_Business_Geese-1/docs/ru/business_geese.md)||
||🇷🇺 fuall|[Доставка дронами](https://github.com/Silly4s/clover/blob/master/docs/ru/dostavka.md)||
||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)|| ||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)||
||🇷🇺 Джедаи 1581|[Ретранслятор на базе Клевера](https://github.com/JJNIK/clover/blob/patch-1/docs/ru/1581.md)||
||🇷🇺 SPECTRE|[SPECTRE](https://github.com/alakhmenev/clover/blob/spectre_team/docs/ru/spectre_team.md)|| ||🇷🇺 SPECTRE|[SPECTRE](https://github.com/alakhmenev/clover/blob/spectre_team/docs/ru/spectre_team.md)||
||🇷🇺 Lucky flight|[Swarm of Improved Clover](https://github.com/bessiaka/clover/blob/Lucky-flight/docs/ru/lucky_flight.md)||
||🇷🇺 SolidEye|[Разработка лидара без движущихся частей](https://github.com/feanorgg/clover/blob/solideye/docs/ru/solid_eye.md)|| ||🇷🇺 SolidEye|[Разработка лидара без движущихся частей](https://github.com/feanorgg/clover/blob/solideye/docs/ru/solid_eye.md)||
||🇰🇬 AI_U_CLOVER|[AIU_CLOVER](https://github.com/zhibekm/clover/blob/zhibekm-patch-1/docs/en/aiu-article.md)|| ||🇰🇬 AI_U_CLOVER|[AIU_CLOVER](https://github.com/zhibekm/clover/blob/zhibekm-patch-1/docs/en/aiu-article.md)||
||🇷🇺 Scout_Drone|[Создание поисково-спасательного беспилотного летательного аппарата](https://github.com/MustafaNatur/clover/blob/Scout_Drone.md/docs/ru/scout_drone.md)||
||🇷🇺 С305|[Система мониторинга воздуха](https://github.com/Ruslan2288/clover/blob/master/docs/ru/air_monitor.md)|&nbsp;| ||🇷🇺 С305|[Система мониторинга воздуха](https://github.com/Ruslan2288/clover/blob/master/docs/ru/air_monitor.md)|&nbsp;|
|✕|🇻🇳 Dragon&Tanker|[Dragon&Tanker](https://github.com/uml4/clover/blob/drone_observe_autonomous_car/docs/en/dragon_and_tanker_team.md)||
|✕|🇷🇺 V-NAV|[Visual Navigation](https://github.com/v-nav/clover/blob/v-nav_article/docs/ru/v-nav.md)||
|✕|🇷🇺 Джедаи 1581|[Ретранслятор на базе Клевера](https://github.com/JJNIK/clover/blob/patch-1/docs/ru/1581.md)||
|✕|🇷🇺 Lucky flight|[Swarm of Improved Clover](https://github.com/bessiaka/clover/blob/Lucky-flight/docs/ru/lucky_flight.md)||
|✕|🇺🇸 EnviroFleet|[EnviroFleet](https://github.com/gueyman/clover/blob/envirofleet/docs/en/enviro_fleet.md)||
|✕|🇷🇺 Бизнес-гуси|[Drone Rover Climbing System](https://github.com/HexaHEX/clover/blob/CopterHack2022_Business_Geese-1/docs/ru/business_geese.md)||
|✕|🇷🇺 fuall|[Доставка дронами](https://github.com/Silly4s/clover/blob/master/docs/ru/dostavka.md)||
|✕|🇷🇺 Scout_Drone|[Создание поисково-спасательного беспилотного летательного аппарата](https://github.com/MustafaNatur/clover/blob/Scout_Drone.md/docs/ru/scout_drone.md)|&nbsp;|
teams which haven't qualified for the Final.
## Company case competition ## Company case competition

View File

@@ -0,0 +1,118 @@
# Educational contests
## 1. Contest for the best educational lecture {#lecture}
The Copter Express company organizes a contest for the best educational lecture with COEX Clover 4 quadcopter kit application.
The main goal of the contest is aerial robotics popularization and community development.
### Lecture requirements
* The topic of the lecture is of free choice. Programmable quadcopter kit COEX Clover 4 and/or The Clover simulation environment should be used as the main tool in the lecture.
> **Note** *The version of COEX Clover is not earlier than [version 4](https://clover.coex.tech/en/assemble_4.html). The virtual machine image is not earlier than [version 1.0](https://github.com/CopterExpress/clover_vm/releases/tag/v1.0).
* The video is uploaded on YouTube or another public platform and is public accessible.
* The language of the lecture is any. The video contains subtitles in English in case the language is made neither of English nor Russian.
* The duration of the lecture is limited from 15 min. to 3 hours.
### Requirements for the participants
* The participant must be the author of the lesson.
* Third parties can provide technical support for recording a lecture.
* The status of the participant is unlimited (student, representative of a general education institution, representative of the industry, amateur).
Applications deadline: September 1, 2022.
### How to apply?
The application to the contest is performed via the [Google Form](https://docs.google.com/forms/d/e/1FAIpQLScE2kN5dO2OYNSM8hOYzOa5Qvh2uDdd9Fjx8OnL1W93bfEBgw/viewform) where the link to the video lecture should be attached.
Participants who are the authors of the lecture are allowed to participate in the competition.
### Prizes
Based on the results of the submitted application, the jury selects the winners of the competition. The quality of the video, it is content, and audience engagement are assessed.
* 1st place: $500.
* 2nd place: $400.
* 3rd place: $300.
* 4th place: $200.
* 5th place: $100.
## 2. Contest for the best school lesson {#lesson}
The Copter Express company organizes a contest for the best school lesson with COEX Clover 4 quadcopter kit application.
The main goal of the contest is aerial robotics popularization and community development.
### Lesson requirements
* Programmable quadcopter kit COEX Clover 4 should be used as the main tool for the lesson.
> **Note** *The version of COEX Clover is not earlier than [version 4](https://clover.coex.tech/en/assemble_4.html).
* Integration of the quadcopter into any of the general education disciplines (physics, mathematics, computer science, etc.).
* Practical use of the main tool in the lesson.
* Grade - no restrictions (primary, high school).
* Lesson duration is 30-45 minutes.
* Lesson format - offline.
* The video of the lesson was filmed in the classroom of a general education institution.
### Requirements for the participants
* The participant must be the author of the lesson.
* The participant must be a teacher of a general education institution
### How to apply?
The application to the contest is performed via the [Google Form](https://docs.google.com/forms/d/e/1FAIpQLSdelVy6yQ1iN6u88KeiEIKGj7gGaM0xccSt2tiYKB46ICmjkQ/viewform).
Applications deadline: September 1, 2022.
### Prizes
Based on the results of the submitted application, the jury selects the winners of the competition. The video and material quality are assessed.
* 1st place: $500.
* 2nd place: $400.
* 3rd place: $300.
* 4th place: $200.
* 5th place: $100.
## 3. Contest for the best online course {#course}
The Copter Express company organizes a contest for the best online course with COEX Clover 4 quadcopter kit application.
The main goal of the contest is aerial robotics popularization and community development.
The course is evaluated according to a separate, publicly available lesson submitted for the contest.
### Course requirements
* The course is related to the direction of Aerial robotics.
* Programmable quadcopter kit COEX Clover 4 and/or The Clover simulation environment should be used as the main tool in the course;
> **Note** *The version of COEX Clover is not earlier than [version 4](https://clover.coex.tech/en/assemble_4.html). The virtual machine image is not earlier than [version 1.0](https://github.com/CopterExpress/clover_vm/releases/tag/v1.0).
* The course is located on a public platform (e.g., Coursera).
* The course can be either paid or free of charge. One public lesson from the course is submitted for the competition;
* The lesson submitted for the contest should be publicly accessible.
* The language of the lesson is any. The video contains subtitles in English in case the language is made neither of English nor Russian (if there is a video in the lesson).
* The duration of the course and lesson is not limited.
### Requirements for the participants
* The participant must be the author of the course.
* Third parties can provide technical support for preparing a course.
* The status of the participant is unlimited (student, representative of a general education institution, representative of the industry, amateur).
### How to apply?
The application to the contest is performed via the [Google Form](https://docs.google.com/forms/d/e/1FAIpQLSdf2Q68X4hPnFE9f3EP95AxPNnzHKqIsFHtTRT6EBKiH93wzg/viewform) where the link to the video course should be attached.
Applications deadline: September 1, 2022.
### Prizes
Based on the results of the submitted application, the members of the Commission select the winners of the competition. The quality of the material, the format of the presentation of the material, the total volume and content of the course are assessed.
* 1st place: $1000.
* 2nd place: $800.
* 3rd place: $600.
* 4th place: $400.
* 5th place: $200.

View File

@@ -4,10 +4,10 @@ Main article is available at https://docs.px4.io/master/en/config/safety.html.
The *Safety* panel allows you to configure actions that should be performed when a failsafe is triggered. You should at the very least configure the RC Loss failsafe, which is triggered when the RC transmitter link is lost: The *Safety* panel allows you to configure actions that should be performed when a failsafe is triggered. You should at the very least configure the RC Loss failsafe, which is triggered when the RC transmitter link is lost:
1. Open the *Safety* panel. 1. In QGroundControl software, go to the *Vehicle Setup* panel and choose the *Safety* menu.
2. Select one of the following actions in the *RC Loss Failsafe Trigger* option: 2. Select one of the following actions in the *RC Loss Failsafe Trigger* option:
* *Land mode* transition to automatic land mode; * *Land mode* transition to automatic land mode;
* *Terminate* set all outputs to their failsafe values. * *Terminate* set all outputs to their failsafe values.
3. Set the timeout value before RC Loss triggers in the *RC Loss Timeout* field. We recommend setting it to 0.5 s. 3. Set the timeout value before RC Loss triggers in the *RC Loss Timeout* field. We recommend setting it to 2 s.
<img src="../assets/qgc-failsafe.png" alt="QGroundControl failsafe" class="zoom"> <img src="../assets/qgc-failsafe.png" alt="QGroundControl failsafe" class="zoom">

View File

@@ -1,6 +1,6 @@
# Flight # Flight
> **Info** See also official PX4 flying guide: https://docs.px4.io/v1.9.0/en/flying/. > **Info** See also official PX4 flying guide: https://docs.px4.io/master/en/flying/.
This section explains the basics of manual controlling the quadcopter in different modes using radio remote control (for autonomous flying see "[Programming](programming.md)") section. This section explains the basics of manual controlling the quadcopter in different modes using radio remote control (for autonomous flying see "[Programming](programming.md)") section.

View File

@@ -9,7 +9,8 @@ Main frames in the `clover` package:
* `base_link` is rigidly bound to the drone. It is shown by the simplified drone model on the image above; * `base_link` is rigidly bound to the drone. It is shown by the simplified drone model on the image above;
* `body` is bound to the drone, but its Z axis points up regardless of the drone's pitch and roll. It is shown by the red, blue and green lines in the illustration; * `body` is bound to the drone, but its Z axis points up regardless of the drone's pitch and roll. It is shown by the red, blue and green lines in the illustration;
* <a name="navigate_target"></a>`navigate_target` is bound to the current navigation target (as set by the [navigate](simple_offboard.md#navigate) service); * <a name="navigate_target"></a>`navigate_target` is bound to the current navigation target (as set by the [navigate](simple_offboard.md#navigate) service);
* `setpoint` is current position setpoint. * `setpoint` is current position setpoint;
* `main_camera_optical` is the coordinate system, [linked to the main camera](camera_setup.md#frame);
Additional frames become available when [ArUco positioning system](aruco.md) is active: Additional frames become available when [ArUco positioning system](aruco.md) is active:

View File

@@ -38,7 +38,7 @@ rostopic echo /rangefinder/range
> **Hint** We recommend using our [custom PX4 firmware for Clover](firmware.md#modified-firmware-for-clover) for best laser rangefinder support. > **Hint** We recommend using our [custom PX4 firmware for Clover](firmware.md#modified-firmware-for-clover) for best laser rangefinder support.
PX4 should be properly [configured](px4_parameters.md) to use the rangefinder data. PX4 should be properly [configured](parameters.md) to use the rangefinder data.
Set the following parameters when EKF2 is used (`SYS_MC_EST_GROUP` = `ekf2`): Set the following parameters when EKF2 is used (`SYS_MC_EST_GROUP` = `ekf2`):

View File

@@ -29,7 +29,7 @@ Examples of MAVLink messages:
* `GLOBAL_POSITION_INT` global position of the quadcopter (latitude/longitude/altitude); * `GLOBAL_POSITION_INT` global position of the quadcopter (latitude/longitude/altitude);
* `COMMAND_LONG` a command to the quadcopter (take off, land, toggle modes, etc). * `COMMAND_LONG` a command to the quadcopter (take off, land, toggle modes, etc).
A complete list of MAVLink messages is available in [MAVLink documentation] (http://mavlink.org/messages/common). A complete list of MAVLink messages is available in [MAVLink documentation](https://mavlink.io/en/messages/common.html).
### System, system component ### System, system component

View File

@@ -4,10 +4,11 @@ PX4 **mode** determines how the vehicle should react to commands and RC signals.
In order to configure flight modes: In order to configure flight modes:
1. Open the *Vehicle Setup* tab in QGroundControl. 1. Open the *Vehicle Setup* panel in QGroundControl.
2. Select the *Flight Modes* menu. 2. Select the *Flight Modes* menu.
3. Choose SwC (Channel 6) as mode selection switch. 3. Set the *Mode Channel* to the SwC switch (*Channel 6*).
4. Set desired flight modes. 4. Optionally, set the *Emergency Kill Switch Channel* to SwA switch (*Channel 5*).
5. Set desired flight modes.
The following flight modes are recommended: The following flight modes are recommended:
@@ -15,8 +16,8 @@ In order to configure flight modes:
* Flight Mode 4: *Altitude*. * Flight Mode 4: *Altitude*.
* Flight Mode 6: *Position*. * Flight Mode 6: *Position*.
5. Check mode switching by changing the switch position. 6. Check mode switching by changing the switch position.
6. Choose SwA (Channel 5) as emergency motor stop (*Kill switch*). 7. Choose SwA (Channel 5) as emergency motor stop (*Kill switch*).
<img src="../assets/qgc-modes.png" class="zoom" alt="QGroundControl modes"> <img src="../assets/qgc-modes.png" class="zoom" alt="QGroundControl modes">

View File

@@ -1,12 +1,10 @@
# Use of Optical Flow # Use of Optical Flow
Running the technology "Optical Flow" offers the possibility of POSCTL flight mode, and autonomous flight operating on a camera pointed downwards that detects changes of ground texture. Running the "Optical Flow" function offers the possibility of POSCTL flight mode, and autonomous flight operating on a camera pointed downwards that detects changes of ground texture.
## Enabling ## Enabling
> **Hint** It is recommended to use [special PX4 firmware for Clover](firmware.md). > **Hint** For Optical Flow to work it's required that the laser rangefinder is [connected and configured](laser.md).
The use of a rangefinder is essential. [Connect and setup laser-ranging sensor VL53L1X](laser.md), according to the manual.
Enable Optical Flow in the file `~/catkin_ws/src/clover/clover/launch/clover.launch`: Enable Optical Flow in the file `~/catkin_ws/src/clover/clover/launch/clover.launch`:
@@ -14,7 +12,7 @@ Enable Optical Flow in the file `~/catkin_ws/src/clover/clover/launch/clover.lau
<arg name="optical_flow" default="true"/> <arg name="optical_flow" default="true"/>
``` ```
Optical Flow publishes data in `mavros/px4flow/raw/send` topic. In the topic `optical_flow/debug` is also published a visualization, that can be viewed with [web_video_server](web_video_server.md). Optical Flow publishes data in `/mavros/px4flow/raw/send` topic. In the topic `/optical_flow/debug` is also published a visualization, that can be viewed with [web_video_server](web_video_server.md).
> **Info** Correct connection and [setup](camera.md) of the camera module is needed for proper functioning. > **Info** Correct connection and [setup](camera.md) of the camera module is needed for proper functioning.

View File

@@ -6,15 +6,16 @@ Open the *Vehicle Setup* tab and select the *Power* menu.
> **Note** Power sensor calibration should be done with the battery pack connected to the drone. > **Note** Power sensor calibration should be done with the battery pack connected to the drone.
If there is no voltage indicator or manual calibration is not possible, set the average value of the voltage divider for the Clover 4 kit (*Voltage divider* = 11). 1. In QGroundControl software, go the *Vehicle Setup* panel and choose the *Power* menu.
2. Set the *Number of cells* parameter according to the number of cells in your battery (*3* for the Clover 4 drone).
1. Set the *Number of cells* parameter according to the number of cells in your battery (*3* for the Clover 4 drone). 3. Calculate the voltage divider:
2. Calculate the voltage divider:
* Measure voltage across the battery (you may use a battery voltage tester for that). * Measure voltage across the battery (you may use a battery voltage tester for that).
* Press the *Calculate* button next to the *Voltage divider* label. * Press the *Calculate* button next to the *Voltage divider* label.
* Put the battery voltage into the prompt and click *Calculate*. * Put the battery voltage into the prompt and click *Calculate*.
* Press *Close* to save the calculated value. * Press *Close* to save the calculated value.
If there is no voltage indicator or manual calibration is not possible, set the average value of the voltage divider for the Clover 4 kit (*Voltage divider* = 11).
<img src="../assets/qgc-voltage-divider.png" class="zoom"> <img src="../assets/qgc-voltage-divider.png" class="zoom">
Further reading: https://docs.qgroundcontrol.com/en/SetupView/Power.html. Further reading: https://docs.qgroundcontrol.com/en/SetupView/Power.html.
@@ -30,6 +31,6 @@ Further reading: https://docs.qgroundcontrol.com/en/SetupView/Power.html.
<img src="../assets/qgc-power.png" class="zoom"> <img src="../assets/qgc-power.png" class="zoom">
Further reading: https://docs.px4.io/v1.9.0/en/advanced_config/esc_calibration.html. Further reading: https://docs.px4.io/master/en/advanced_config/esc_calibration.html.
**Next**: [Failsafe configuration](failsafe.md) **Next**: [Failsafe configuration](failsafe.md)

View File

@@ -51,8 +51,6 @@ python3 flight.py
Below is a complete flight program that performs a takeoff, flies forward and lands: Below is a complete flight program that performs a takeoff, flies forward and lands:
```python ```python
#coding: utf8
import rospy import rospy
from clover import srv from clover import srv
from std_srvs.srv import Trigger from std_srvs.srv import Trigger

View File

@@ -9,7 +9,7 @@ Before connecting and calibrating the RC, make sure that:
## Connecting the RC transmitter ## Connecting the RC transmitter
1. Open the *Vehicle Setup* tab and select the *Radio* menu. 1. In QGroundControl software, go the *Vehicle Setup* panel and choose the *Radio* menu.
2. Power on the transmitter by sliding the **POWER** slider up. 2. Power on the transmitter by sliding the **POWER** slider up.
3. Make sure the transmitter-receiver link is working. 3. Make sure the transmitter-receiver link is working.

View File

@@ -1,7 +1,7 @@
Raspberry Pi Raspberry Pi
============ ============
**Raspberry Pi** is a single-board computer that fits in the palm, created on the basis of ARM mobile microprocessor. It features low energy consumption, and it can even run on solar panels. Raspberry Pi 3 is included in the kits for programmable quadcopters "Clover". **Raspberry Pi** is a single-board computer that fits in the palm, created on the basis of ARM mobile microprocessor. It features low energy consumption, and it can even run on solar panels. A Raspberry Pi is included in the kits for programmable quadcopters "Clover".
<img src="../assets/raspberry.png" class="center zoom" alt="Raspberry Pi 3" width="400"> <img src="../assets/raspberry.png" class="center zoom" alt="Raspberry Pi 3" width="400">

View File

@@ -49,7 +49,7 @@ Each topic has the a of messages it passes. ROS include a lot of standard messag
|Message type|Description| |Message type|Description|
|-|-| |-|-|
|[`std_msgs/Int64`](https://docs.ros.org/api/std_msgs/html/msg/Int64.html)|Integer number.| |[`std_msgs/Int64`](https://docs.ros.org/api/std_msgs/html/msg/Int64.html)|Integer number.|
|[`std_msgs/Float64`](https://docs.ros.org/api/std_msgs/html/msg/Float64.html)|Double-precision floating-point number| |[`std_msgs/Float64`](https://docs.ros.org/api/std_msgs/html/msg/Float64.html)|Double-precision floating-point number.|
|[`std_msgs/String`](https://docs.ros.org/api/std_msgs/html/msg/String.html)|String.| |[`std_msgs/String`](https://docs.ros.org/api/std_msgs/html/msg/String.html)|String.|
|[`geometry_msgs/PoseStamped`](https://docs.ros.org/api/geometry_msgs/html/msg/PoseStamped.html)|Position and orientation of an object in a given [coordinate system](frames.md) and a time stamp (widely used for passing the robot pose or some robot's part pose).| |[`geometry_msgs/PoseStamped`](https://docs.ros.org/api/geometry_msgs/html/msg/PoseStamped.html)|Position and orientation of an object in a given [coordinate system](frames.md) and a time stamp (widely used for passing the robot pose or some robot's part pose).|
|[`geometry_msgs/TwistStamped`](https://docs.ros.org/api/geometry_msgs/html/msg/TwistStamped.html)|Linear and angular velocity of an object in a given coordinate system and a time stamp.| |[`geometry_msgs/TwistStamped`](https://docs.ros.org/api/geometry_msgs/html/msg/TwistStamped.html)|Linear and angular velocity of an object in a given coordinate system and a time stamp.|

View File

@@ -43,7 +43,7 @@ Axis or Grid configured to frame `aruco_map` will visualize the location [on the
### jsk_rviz_plugins ### jsk_rviz_plugins
It is also recommended to install additional useful plugins for rviz [jsk_rviz_plugins](https://jsk-docs.readthedocs.io/en/latest/jsk_visualization/doc/jsk_rviz_plugins/index.html). This kit allows visualizing topics like `TwistStamped` (velocity) `CameraInfo`, `PolygonArray`, and many more. To install, use command: It is also recommended to install additional useful plugins for rviz [jsk_rviz_plugins](https://jsk-visualization.readthedocs.io/en/latest/jsk_rviz_plugins/index.html). This kit allows visualizing topics like `TwistStamped` (velocity) `CameraInfo`, `PolygonArray`, and many more. To install, use command:
```(bash) ```(bash)
sudo apt-get install ros-melodic-jsk-visualization sudo apt-get install ros-melodic-jsk-visualization

View File

@@ -295,7 +295,7 @@ The positive direction of `yaw_rate` rotation (when viewed from the top) is coun
Switch the drone to landing [mode](modes.md) (`AUTO.LAND` or similar). Switch the drone to landing [mode](modes.md) (`AUTO.LAND` or similar).
> **Note** Set the `COM_DISARM_LAND` [PX4 parameter](px4_parameters.md) to a value greater than 0 to enable automatic disarm after landing. > **Note** Set the `COM_DISARM_LAND` [PX4 parameter](parameters.md) to a value greater than 0 to enable automatic disarm after landing.
Landing the drone: Landing the drone:

View File

@@ -4,31 +4,56 @@ Setting up the simulation environment from scratch requires some effort, but res
> **Hint** See up-to-date commands set for installation Clover simulation software in the script, that builds the virtual machine image with the simulator: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh). > **Hint** See up-to-date commands set for installation Clover simulation software in the script, that builds the virtual machine image with the simulator: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh).
Prerequisites: Ubuntu 20.04 and [ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu). Prerequisites: **Ubuntu 20.04**.
## Install ROS
Install ROS Noetic using the [official installation manual](http://wiki.ros.org/noetic/Installation/Ubuntu) (Desktop or Full install).
Add sourcing ROS' `setup.bash` initialization script to your `.bashrc`:
```bash
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
```
Install required tools:
```bash
sudo apt install build-essential git python3-pip python3-rosdep
```
## Create a workspace for the simulation ## Create a workspace for the simulation
Throughout this guide we will be using the `catkin_ws` as the workspace name. Feel free to change it in your setup. We will be creating it in the home directory of the current user (`~`). Create a workspace for the simulation:
Create the workspace and clone Clover sources:
```bash ```bash
mkdir -p ~/catkin_ws/src mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
```
Clone Clover sources:
```bash
cd ~/catkin_ws/src cd ~/catkin_ws/src
git clone --depth 1 https://github.com/CopterExpress/clover git clone --depth 1 https://github.com/CopterExpress/clover
git clone --depth 1 https://github.com/CopterExpress/ros_led git clone --depth 1 https://github.com/CopterExpress/ros_led
git clone --depth 1 https://github.com/ethz-asl/mav_comm git clone --depth 1 https://github.com/ethz-asl/mav_comm
``` ```
Install all prerequisites using `rosdep`: Install all dependencies using `rosdep`:
```bash ```bash
cd ~/catkin_ws cd ~/catkin_ws
sudo rosdep init
rosdep update rosdep update
rosdep install --from-paths src --ignore-src -y rosdep install --from-paths src --ignore-src -y
``` ```
Install Python-dependencies: Install Python dependencies:
```bash ```bash
sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt
@@ -36,15 +61,19 @@ sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requiremen
## Get PX4 sources ## Get PX4 sources
PX4 will be built along with the other packages in our workspace. You may clone it directly into the workspace or put it somewhere and symlink to `~/catkin_ws/src`. We will need to put its `sitl_gazebo` submodule in `~/catkin_ws/src` as well. For simplicity's sake we will clone the firmware directly to the workspace: PX4 will be built along with the other packages in our workspace. You may clone it directly into the workspace or put it somewhere and symlink to `~/catkin_ws/src`. We will need to put its `sitl_gazebo` and `mavlink` submodules into `~/catkin_ws/src` as well.
Clone PX4 sources and make the required symlinks:
```bash ```bash
cd ~/catkin_ws/src
git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/PX4-Autopilot ln -s ~/PX4-Autopilot ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/sitl_gazebo ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/
``` ```
> **Hint** You may use more recent PX4 version, but there would be more risk of something would not be working.
## Install PX4 prerequisites ## Install PX4 prerequisites
PX4 comes with its own script for dependency installation. We may as well leverage it: PX4 comes with its own script for dependency installation. We may as well leverage it:
@@ -56,10 +85,12 @@ sudo ./ubuntu.sh
This will install everything required to build PX4 and its SITL environment. This will install everything required to build PX4 and its SITL environment.
You may want to skip installing the ARM toolchain if you're not planning on compiling PX4 for your flight controller. To do this, use the `--no-nuttx` flag: > **Hint** You may want to skip installing the ARM toolchain if you're not planning on compiling PX4 for your flight controller. To do this, use the `--no-nuttx` flag: `sudo ./ubuntu.sh --no-nuttx`.
``` Install more required Python packages:
sudo ./ubuntu.sh --no-nuttx
```bash
pip3 install --user toml
``` ```
## Add the Clover airframe ## Add the Clover airframe
@@ -67,7 +98,7 @@ sudo ./ubuntu.sh --no-nuttx
Add the Clover airframe to PX4 using the command: Add the Clover airframe to PX4 using the command:
```bash ```bash
ln -s "$(catkin_find clover_simulation airframes)"/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/ ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
``` ```
## Install geographiclib datasets ## Install geographiclib datasets
@@ -80,20 +111,44 @@ sudo /opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh
## Build the simulator ## Build the simulator
With all dependencies installed, you can build your workspace: Build your workspace:
```bash ```bash
cd ~/catkin_ws cd ~/catkin_ws
catkin_make catkin_make
``` ```
> **Note** Some of the files - particularly Gazebo plugins - require large amounts of RAM to be built. You may wish to reduce the number of parallel jobs; the number of parallel jobs should be equal to the amount of RAM in gigabytes divided by 2 - so a 16GB machine should use no more than 8 jobs. You can specify the number of jobs using the `-j` flag: `catkin_make -j8` > **Note** If building fails with RAM issues (`c++: fatal error: Killed signal terminated program cc1plus`), reduce the number of parallel jobs using `-j` key. For example, to use only two parallel jobs use `catkin_make -j2` command.
## Run the simulator ## Run the simulator
In order to be sure that everything was built correctly, try running the simulator for the first time: In order to be sure that everything was built correctly, try running the simulator for the first time:
```bash ```bash
source ~/catkin_ws/devel/setup.bash
roslaunch clover_simulation simulator.launch roslaunch clover_simulation simulator.launch
``` ```
You can test autonomous flight using example scripts in `~/catkin_ws/src/clover/clover/examples` directory.
## Additional steps
Optionally, install roscore systemd service to have roscore running in background:
```bash
sed -i "s/pi/$USER/g" ~/catkin_ws/src/clover/builder/assets/roscore.service
sudo cp ~/catkin_ws/src/clover/builder/assets/roscore.service /etc/systemd/system
sudo systemctl enable roscore
sudo systemctl start roscore
```
Install any web server to serve Clover's web tools (`~/.ros/www` directory), e. g. Monkey:
```bash
wget https://github.com/CopterExpress/clover_vm/raw/master/assets/packages/monkey_1.6.9-1_amd64.deb -O /tmp/monkey_1.6.9-1_amd64.deb
sudo apt-get install -y /tmp/monkey_1.6.9-1_amd64.deb
sed "s/pi/$USER/g" ~/catkin_ws/src/clover/builder/assets/monkey | sudo tee /etc/monkey/sites/default
sudo -E sh -c "sed -i 's/SymLink Off/SymLink On/' /etc/monkey/monkey.conf"
sudo cp ~/catkin_ws/src/clover/builder/assets/monkey.service /etc/systemd/system/monkey.service
sudo systemctl enable monkey
sudo systemctl start monkey
```

View File

@@ -75,7 +75,7 @@ The plugin will collect publishing rate statistics and slow the simulation down
### Set simulation speed ### Set simulation speed
Since v1.9 the PX4 SITL setup supports [setting the simulation speed](https://dev.px4.io/v1.9.0/en/simulation/#simulation_speed) by setting the `PX4_SIM_SPEED_FACTOR` environment variable. Its value is picked up by PX4 startup scripts, which in turn reconfigure it to expect a certain speedup/slowdown. Since v1.9 the PX4 SITL setup supports [setting the simulation speed](https://docs.px4.io/master/en/simulation/#run-simulation-faster-than-realtime) by setting the `PX4_SIM_SPEED_FACTOR` environment variable. Its value is picked up by PX4 startup scripts, which in turn reconfigure it to expect a certain speedup/slowdown.
You should set its value to the actual real time factor that you get with `throttling_camera`. The real time factor may be found in the Gazebo GUI window at the bottom: You should set its value to the actual real time factor that you get with `throttling_camera`. The real time factor may be found in the Gazebo GUI window at the bottom:

View File

@@ -5,7 +5,7 @@ PX4 Simulation
Main article: https://dev.px4.io/en/simulation/ Main article: https://dev.px4.io/en/simulation/
PX4 simulation is possible in Linux and macOS with the use of physical environment simulation systems [jMAVSim](https://pixhawk.org/dev/hil/jmavsim) and [the Gazebo](http://gazebosim.org). PX4 simulation is possible in Linux and macOS with the use of physical environment simulation systems [jMAVSim](https://docs.px4.io/master/en/simulation/jmavsim.html) and [the Gazebo](http://gazebosim.org).
jMAVSim is a lightweight environment intended only for testing multi-rotor aircraft systems; Gazebo is a versatile environment for all types of robots. jMAVSim is a lightweight environment intended only for testing multi-rotor aircraft systems; Gazebo is a versatile environment for all types of robots.

View File

@@ -8,13 +8,11 @@
<a name="block-takeoff"></a><!-- old name of anchor --> <a name="block-takeoff"></a><!-- old name of anchor -->
Fly towards a point and wait for copter's arrival: Function to fly to a point and wait for copter's arrival:
```python ```python
import math import math
#...
def navigate_wait(x=0, y=0, z=0, yaw=float('nan'), speed=0.5, frame_id='', auto_arm=False, tolerance=0.2): def navigate_wait(x=0, y=0, z=0, yaw=float('nan'), speed=0.5, frame_id='', auto_arm=False, tolerance=0.2):
navigate(x=x, y=y, z=z, yaw=yaw, speed=speed, frame_id=frame_id, auto_arm=auto_arm) navigate(x=x, y=y, z=z, yaw=yaw, speed=speed, frame_id=frame_id, auto_arm=auto_arm)
@@ -64,8 +62,6 @@ Wait for copter's arrival to the [navigate](simple_offboard.md#navigate) target:
```python ```python
import math import math
# ...
def wait_arrival(tolerance=0.2): def wait_arrival(tolerance=0.2):
while not rospy.is_shutdown(): while not rospy.is_shutdown():
telem = get_telemetry(frame_id='navigate_target') telem = get_telemetry(frame_id='navigate_target')
@@ -79,6 +75,8 @@ def wait_arrival(tolerance=0.2):
Calculate the distance between two points (**important**: the points are to be in the same [coordinate system](frames.md)): Calculate the distance between two points (**important**: the points are to be in the same [coordinate system](frames.md)):
```python ```python
import math
def get_distance(x1, y1, z1, x2, y2, z2): def get_distance(x1, y1, z1, x2, y2, z2):
return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2 + (z1 - z2) ** 2) return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2 + (z1 - z2) ** 2)
``` ```
@@ -88,6 +86,8 @@ def get_distance(x1, y1, z1, x2, y2, z2):
Approximation of distance (in meters) between two global coordinates (latitude/longitude): Approximation of distance (in meters) between two global coordinates (latitude/longitude):
```python ```python
import math
def get_distance_global(lat1, lon1, lat2, lon2): def get_distance_global(lat1, lon1, lat2, lon2):
return math.hypot(lat1 - lat2, lon1 - lon2) * 1.113195e5 return math.hypot(lat1 - lat2, lon1 - lon2) * 1.113195e5
``` ```
@@ -203,19 +203,16 @@ from geometry_msgs.msg import PoseStamped, TwistStamped
from sensor_msgs.msg import BatteryState from sensor_msgs.msg import BatteryState
from mavros_msgs.msg import RCIn from mavros_msgs.msg import RCIn
# ...
def pose_update(pose): def pose_update(pose):
# Processing new data of copter's position # Processing new data of copter's position
pass pass
# Other handler functions
# ...
rospy.Subscriber('/mavros/local_position/pose', PoseStamped, pose_update) rospy.Subscriber('/mavros/local_position/pose', PoseStamped, pose_update)
rospy.Subscriber('/mavros/local_position/velocity', TwistStamped, velocity_update) rospy.Subscriber('/mavros/local_position/velocity', TwistStamped, velocity_update)
rospy.Subscriber('/mavros/battery', BatteryState, battery_update) rospy.Subscriber('/mavros/battery', BatteryState, battery_update)
rospy.Subscriber('mavros/rc/in', RCIn, rc_callback) rospy.Subscriber('mavros/rc/in', RCIn, rc_callback)
rospy.spin()
``` ```
Information about MAVROS topics is available at [the link](mavros.md). Information about MAVROS topics is available at [the link](mavros.md).
@@ -229,18 +226,13 @@ Information about MAVROS topics is available at [the link](mavros.md).
Send an arbitrary [MAVLink message](mavlink.md) to the copter: Send an arbitrary [MAVLink message](mavlink.md) to the copter:
```python ```python
# ...
from mavros_msgs.msg import Mavlink from mavros_msgs.msg import Mavlink
from mavros import mavlink from mavros import mavlink
from pymavlink import mavutil from pymavlink import mavutil
# ...
mavlink_pub = rospy.Publisher('mavlink/to', Mavlink, queue_size=1) mavlink_pub = rospy.Publisher('mavlink/to', Mavlink, queue_size=1)
# Sending a HEARTBEAT message: # Sending a HEARTBEAT message:
msg = mavutil.mavlink.MAVLink_heartbeat_message(mavutil.mavlink.MAV_TYPE_GCS, 0, 0, 0, 0, 0) msg = mavutil.mavlink.MAVLink_heartbeat_message(mavutil.mavlink.MAV_TYPE_GCS, 0, 0, 0, 0, 0)
msg.pack(mavutil.mavlink.MAVLink('', 2, 1)) msg.pack(mavutil.mavlink.MAVLink('', 2, 1))
ros_msg = mavlink.convert_to_rosmsg(msg) ros_msg = mavlink.convert_to_rosmsg(msg)
@@ -281,8 +273,6 @@ Change the [flight mode](modes.md) to arbitrary one:
```python ```python
from mavros_msgs.srv import SetMode from mavros_msgs.srv import SetMode
# ...
set_mode = rospy.ServiceProxy('mavros/set_mode', SetMode) set_mode = rospy.ServiceProxy('mavros/set_mode', SetMode)
# ... # ...
@@ -297,8 +287,6 @@ Flip:
```python ```python
import math import math
# ...
PI_2 = math.pi / 2 PI_2 = math.pi / 2
def flip(): def flip():
@@ -337,8 +325,6 @@ from pymavlink import mavutil
from mavros_msgs.srv import CommandLong from mavros_msgs.srv import CommandLong
from mavros_msgs.msg import State from mavros_msgs.msg import State
# ...
send_command = rospy.ServiceProxy('/mavros/cmd/command', CommandLong) send_command = rospy.ServiceProxy('/mavros/cmd/command', CommandLong)
def calibrate_gyro(): def calibrate_gyro():
@@ -372,8 +358,6 @@ Enable and disable [ArUco markers recognition](aruco_marker.md) dynamically (for
import rospy import rospy
import dynamic_reconfigure.client import dynamic_reconfigure.client
# ...
client = dynamic_reconfigure.client.Client('aruco_detect') client = dynamic_reconfigure.client.Client('aruco_detect')
# Turn markers recognition off # Turn markers recognition off
@@ -392,10 +376,42 @@ Wait for global position to appear (finishing [GPS receiver](gps.md) initializat
```python ```python
import math import math
# ...
while not rospy.is_shutdown(): while not rospy.is_shutdown():
if math.isfinite(get_telemetry().lat): if math.isfinite(get_telemetry().lat):
break break
rospy.sleep(0.2) rospy.sleep(0.2)
``` ```
### # {#get-param}
Read flight controller's parameter:
```python
from mavros_msgs.srv import ParamGet
from mavros_msgs.msg import ParamValue
param_get = rospy.ServiceProxy('mavros/param/get', ParamGet)
# Read parameter of type INT
value = param_get(param_id='COM_FLTMODE1').value.integer
# Read parameter of type FLOAT
value = param_get(param_id='MPC_Z_P').value.float
```
### # {#set-param}
Set flight controller's parameter:
```python
from mavros_msgs.srv import ParamSet
from mavros_msgs.msg import ParamValue
param_set = rospy.ServiceProxy('mavros/param/set', ParamSet)
# Set parameter of type INT:
param_set(param_id='COM_FLTMODE1', value=ParamValue(integer=8))
# Set parameter of type FLOAT:
param_set(param_id='MPC_Z_P', value=ParamValue(real=1.5))
```

View File

@@ -89,7 +89,7 @@ while True:
### Filtering the data ### Filtering the data
To filter (smooth out) the data and delete [outliers](https://en.wikipedia.org/wiki/Outlier), [Kalman filter](https://en.wikipedia.org/wiki/Kalman_filter) or a simple [median filter](https://ru.wikipedia.org/wiki/Median_filter) can be used. An example of median filtering implementation: To filter (smooth out) the data and delete [outliers](https://en.wikipedia.org/wiki/Outlier), [Kalman filter](https://en.wikipedia.org/wiki/Kalman_filter) or a simple [median filter](https://en.wikipedia.org/wiki/Median_filter) can be used. An example of median filtering implementation:
```python ```python
import collections import collections

25
docs/en/video_contest.md Normal file
View File

@@ -0,0 +1,25 @@
# Contest for the best educational video on assembly and configuration
Requirements:
- the video contains the entire process of assembling and configuring the Clover 4.2 drone kit: from opening the box with components to flying the copter in Position mode using ArUco markers;
- the video is uploaded to YouTube and is public accessible;
- the video contains voice-over in English;
- the video lasts from 6 to 60 minutes.
Dates of the contest: February 12 December 13, 2021.
## Prizes
- 🥇 1st place: $500 (USD).
- 🥈 2nd place: $300 (USD).
- 🥉 3rd place: $200 (USD).
## Results
|Place|Participant|Link to the video|
|:-:|-|-|
|1|🇷🇺 Philipp Batalin|https://www.youtube.com/watch?v=f0rpdulOSEk|
|2|🇮🇹 Sara Pettinari|https://www.youtube.com/watch?v=PxxfyVH6RRA|
|3|🇲🇾 Kai Feng Chew|https://www.youtube.com/watch?v=skgSwFle6Ms|
|3|🇰🇿 Nikita Lobanov|https://www.youtube.com/watch?v=93b1epEM3SQ|

View File

@@ -17,7 +17,7 @@
* [Работа с FS-A8S](rc_flysky_a8s.md) * [Работа с FS-A8S](rc_flysky_a8s.md)
* [Полетные режимы](modes.md) * [Полетные режимы](modes.md)
* [Настройка питания](power.md) * [Настройка питания](power.md)
* [Настройка failsafe](failsafe.md) * [Настройка Failsafe](failsafe.md)
* [Ручной полет](flight.md) * [Ручной полет](flight.md)
* [Упражнения](flight_exercises.md) * [Упражнения](flight_exercises.md)
* [Работа с Raspberry Pi](raspberry.md) * [Работа с Raspberry Pi](raspberry.md)
@@ -75,7 +75,7 @@
* [Пилотирование со смартфона](rc.md) * [Пилотирование со смартфона](rc.md)
* [Настройка сети RPi](network.md) * [Настройка сети RPi](network.md)
* [Интерфейс UART](uart.md) * [Интерфейс UART](uart.md)
* [Параметры PX4](px4_parameters.md) * [Параметры PX4](parameters.md)
* [Работа с логами PX4](flight_logs.md) * [Работа с логами PX4](flight_logs.md)
* [Прошивка PX4](firmware.md) * [Прошивка PX4](firmware.md)
* [Протокол MAVLink](mavlink.md) * [Протокол MAVLink](mavlink.md)
@@ -101,6 +101,7 @@
* [Светодиодная лента (legacy)](leds_old.md) * [Светодиодная лента (legacy)](leds_old.md)
* [Вклад в Клевер](contributing.md) * [Вклад в Клевер](contributing.md)
* [Репозиторий пакетов COEX](packages.md) * [Репозиторий пакетов COEX](packages.md)
* [Тестирование Клевера](testing.md)
* [Переход на версию 0.20](migrate20.md) * [Переход на версию 0.20](migrate20.md)
* [Переход на версию 0.22](migrate22.md) * [Переход на версию 0.22](migrate22.md)
* [COEX DuoCam](duocam.md) * [COEX DuoCam](duocam.md)
@@ -114,6 +115,8 @@
* [Робокросс-2019](robocross2019.md) * [Робокросс-2019](robocross2019.md)
* [CopterHack-2018](copterhack2018.md) * [CopterHack-2018](copterhack2018.md)
* [CopterHack-2017](copterhack2017.md) * [CopterHack-2017](copterhack2017.md)
* [Конкурс видео](video_contest.md)
* [Образовательные конкурсы](educational_contests.md)
* [Проекты на базе Клевера](projects.md) * [Проекты на базе Клевера](projects.md)
* [Система автоматической посадки (AMLS)](amls.md) * [Система автоматической посадки (AMLS)](amls.md)
* [Разработка системы для управления БПЛА с помощью шлема виртуальной реальности](remote-control-with-oculusvr.md) * [Разработка системы для управления БПЛА с помощью шлема виртуальной реальности](remote-control-with-oculusvr.md)

View File

@@ -75,9 +75,9 @@ else:
shape = 'undefined' shape = 'undefined'
color = 'undefined' color = 'undefined'
if shape = 'brown': if shape == 'brown':
culture = "greshiha" culture = "greshiha"
if shape = 'yellow_orange': if shape == 'yellow_orange':
culture = "pshenitsa" culture = "pshenitsa"
image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_colback_color) image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_colback_color)

View File

@@ -93,7 +93,7 @@ rosrun aruco_pose genmap.py 0.33 2 4 1 1 0 -o test_map.txt
## Настройка VPE ## Настройка VPE
Для работы механизма Vision Position Estimation необходимы следующие [настройки PX4](px4_parameters.md). Для работы механизма Vision Position Estimation необходимы следующие [настройки PX4](parameters.md).
При использовании **LPE** (параметр `SYS_MC_EST_GROUP` = `local_position_estimator, attitude_estimator_q`): При использовании **LPE** (параметр `SYS_MC_EST_GROUP` = `local_position_estimator, attitude_estimator_q`):

View File

@@ -6,7 +6,7 @@
systemd systemd
--- ---
Основная документация: [https://wiki.archlinux.org/index.php/Systemd_(Русский)](https://wiki.archlinux.org/index.php/Systemd_(Русский)). Основная документация: https://wiki.archlinux.org/index.php/Systemd_(Русский).
Все автоматически стартуемое ПО Клевера запускается в виде systemd-сервиса `clover.service`. Все автоматически стартуемое ПО Клевера запускается в виде systemd-сервиса `clover.service`.
@@ -54,8 +54,8 @@ roslaunch
chmod +x my_program.py chmod +x my_program.py
``` ```
При использовании скриптовых языков вначале файла должен стоять [shebang](https://ru.wikipedia.org/wiki/Шебанг_(Unix)), например: При использовании скриптовых языков вначале файла должен стоять <a href="https://ru.wikipedia.org/wiki/Шебанг_(Unix)">shebang</a>, например:
```bash ```bash
#!/usr/bin/env python #!/usr/bin/env python3
``` ```

View File

@@ -14,7 +14,7 @@
4. Последовательно устанавливайте квадрокоптер в каждую из указанных ориентаций до появления желтой рамки. 4. Последовательно устанавливайте квадрокоптер в каждую из указанных ориентаций до появления желтой рамки.
5. Вращайте квадрокоптер по направлению стрелки до появления зеленой рамки. 5. Вращайте квадрокоптер по направлению стрелки до появления зеленой рамки.
Дополнительная информация: https://docs.px4.io/v1.9.0/en/config/compass.html. Дополнительная информация: https://docs.px4.io/master/en/config/compass.html.
## Гироскоп ## Гироскоп
@@ -27,7 +27,7 @@
> **Warning** Во время калибровки гироскопа квадрокоптер не должен менять своего положения, шататься и т. д. > **Warning** Во время калибровки гироскопа квадрокоптер не должен менять своего положения, шататься и т. д.
Дополнительная информация: https://docs.px4.io/v1.9.0/en/config/gyroscope.html. Дополнительная информация: https://docs.px4.io/master/en/config/gyroscope.html.
## Акселерометр ## Акселерометр
@@ -38,7 +38,7 @@
3. Последовательно устанавливайте квадрокоптер в каждую из указанных ориентаций до появления желтой рамки. 3. Последовательно устанавливайте квадрокоптер в каждую из указанных ориентаций до появления желтой рамки.
4. Держите квадрокоптер неподвижно до появления зеленой рамки. 4. Держите квадрокоптер неподвижно до появления зеленой рамки.
Дополнительная информация: https://docs.px4.io/v1.9.0/en/config/accelerometer.html. Дополнительная информация: https://docs.px4.io/master/en/config/accelerometer.html.
## Уровень горизонта ## Уровень горизонта
@@ -50,6 +50,6 @@
4. Нажмите *OK*. 4. Нажмите *OK*.
5. Дождитесь окончания калибровки. 5. Дождитесь окончания калибровки.
Дополнительная информация: https://docs.px4.io/v1.9.0/en/config/level_horizon_calibration.html. Дополнительная информация: https://docs.px4.io/master/en/config/level_horizon_calibration.html.
**Далее**: [Настройка пульта](radio.md). **Далее**: [Настройка пульта](radio.md).

View File

@@ -42,4 +42,4 @@ sudo systemctl start clever-blocks.service
python main.py python main.py
``` ```
После запуска Вы можете открыть веб-интерфейс для блочного программирования по адресу [192.168.11.1:5000](192.168.11.1:5000). После запуска Вы можете открыть веб-интерфейс для блочного программирования по адресу [192.168.11.1:5000](http://192.168.11.1:5000).

View File

@@ -16,7 +16,7 @@
Поле `connected` должно содержать значение `True`. Поле `connected` должно содержать значение `True`.
> **Hint** Для корректной работы подключения Raspberry Pi и Pixhawk по USB необходимо установить значение [параметра](px4_parameters.md) `CBRK_USB_CHK` на 197848. > **Hint** Для корректной работы подключения Raspberry Pi и Pixhawk по USB необходимо установить значение [параметра](parameters.md) `CBRK_USB_CHK` на 197848.
## Подключение по UART ## Подключение по UART

View File

@@ -11,33 +11,35 @@ CopterHack 2022 — это международный конкурс по ра
## Проекты участников конкурса {#participants} ## Проекты участников конкурса {#participants}
|Место|Команда|Проект|Балл| |Место|Команда|Проект|Балл|
|-|-|-|-| |:-:|-|-|-|
||🇰🇬 Alatoo University Team|[Облачная платформа для симулятора Клевера](https://github.com/pteacher/clover/blob/clover_simulator/docs/ru/clover-development-studio.md)|| ||🇰🇬 Alatoo University Team|[Облачная платформа для симулятора Клевера](https://github.com/pteacher/clover/blob/clover_simulator/docs/ru/clover-development-studio.md)||
||🇧🇾 FTL|[Advanced Clover 2](https://github.com/FTL-team/clover/blob/FTL-advancedClover2/docs/ru/advancedclover2.md)|| ||🇧🇾 FTL|[Advanced Clover 2](https://github.com/FTL-team/clover/blob/FTL-advancedClover2/docs/ru/advanced_clover_simulator.md)||
||🇺🇸 EnviroFleet|[EnviroFleet](https://github.com/gueyman/clover/blob/envirofleet/docs/en/enviro_fleet.md)||
||🇻🇳 Dragon&Tanker|[Dragon&Tanker](https://github.com/uml4/clover/blob/drone_observe_autonomous_car/docs/en/dragon_and_tanker_team.md)||
||🇷🇺 Stereo|[Neural obstacle avoidance](https://github.com/den250400/clover/blob/neural-obstacle-avoidance/docs/en/neural-obstacle-avoidance.md)|| ||🇷🇺 Stereo|[Neural obstacle avoidance](https://github.com/den250400/clover/blob/neural-obstacle-avoidance/docs/en/neural-obstacle-avoidance.md)||
||🇷🇺 Space clowns|[Copter For Space](https://github.com/slavikyd/clover/blob/patch-3/docs/ru/c4s.md)|| ||🇷🇺 Space clowns|[Copter For Space](https://github.com/slavikyd/clover/blob/patch-3/docs/ru/c4s.md)||
||🇷🇺 R.S.|[Drone Hawk](https://github.com/slavaroot/clover/blob/droneHawkSecurity/docs/ru/drone-hawk-security.md)|| ||🇷🇺 R.S.|[Drone Hawk](https://github.com/slavaroot/clover/blob/droneHawkSecurity/docs/ru/drone-hawk-security.md)||
||🇲🇾 Moopt|[IoT Water Monitoring & Optimization](https://github.com/kafechew/clover/blob/master/docs/en/moopt-uav.md)|| ||🇲🇾 Moopt|[IoT Water Monitoring & Optimization](https://github.com/kafechew/clover/blob/master/docs/en/moopt-uav.md)||
||🇧🇷 Atena - Grupo SEMEAR|[Swarm in Blocks](https://github.com/Grupo-SEMEAR-USP/clover/blob/Swarm_in_Blocks/docs/en/Swarm_in_Blocks.md)|| ||🇧🇷 Atena - Grupo SEMEAR|[Swarm in Blocks](https://github.com/Grupo-SEMEAR-USP/clover/blob/Swarm_in_Blocks/docs/en/swarm_in_blocks.md)||
||🇷🇺 Clevertron|[Clevertron](https://github.com/Daniel-drone/clover/blob/Clevertron-1/docs/ru/clevertron.md)|| ||🇷🇺 Clevertron|[Clevertron](https://github.com/Daniel-drone/clover/blob/Clevertron-1/docs/ru/clevertron.md)||
||🇷🇺 Clover Rescue Team|[Rescue Clover](https://github.com/DevMBS/clover/blob/CloverRescueTeam/docs/ru/clover-rescue-team.md)|| ||🇷🇺 Clover Rescue Team|[Rescue Clover](https://github.com/DevMBS/clover/blob/CloverRescueTeam/docs/ru/clover-rescue-team.md)||
||🇵🇱 Edgenoon|[Neural and vision-based landing method](https://github.com/edgenoon-ai/clover/blob/neural_vision_based_landing_method/docs/en/neural_vision_based_landing_method.md)|| ||🇵🇱 Edgenoon|[Neural and vision-based landing method](https://github.com/edgenoon-ai/clover/blob/neural_vision_based_landing_method/docs/en/neural_vision_based_landing_method.md)||
||🇷🇺 CopterCat|[CopterCat](https://github.com/matveylapin/clover/blob/CopterCat/docs/ru/сopter_сat.md)|| ||🇷🇺 CopterCat|[CopterCat](https://github.com/matveylapin/clover/blob/CopterCat/docs/ru/сopter_сat.md)||
||🇷🇺 Дрой Ронов|[Clover Swarm](https://github.com/stinger000/clever/blob/clover_swarm_request/docs/ru/clover-swarm.md)|| ||🇷🇺 Дрой Ронов|[Clover Swarm](https://github.com/stinger000/clever/blob/clover_swarm_request/docs/ru/clover-swarm.md)||
||🇩🇪 Inondro|[Inondro Pix](https://github.com/Inondro/clover/blob/inondro-pix/docs/en/inondro_copterhack22_pix.md)|| ||🇩🇪 Inondro|[Inondro Pix](https://github.com/Inondro/clover/blob/inondro-pix/docs/en/inondro_copterhack22_pix.md)||
||🇷🇺 V-NAV|[Visual Navigation](https://github.com/v-nav/clover/blob/v-nav_article/docs/ru/v-nav.md)||
||🇷🇺 Бизнес-гуси|[Drone Rover Climbing System](https://github.com/HexaHEX/clover/blob/CopterHack2022_Business_Geese-1/docs/ru/business_geese.md)||
||🇷🇺 fuall|[Доставка дронами](https://github.com/Silly4s/clover/blob/master/docs/ru/dostavka.md)||
||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)|| ||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)||
||🇷🇺 Джедаи 1581|[Ретранслятор на базе Клевера](https://github.com/JJNIK/clover/blob/patch-1/docs/ru/1581.md)||
||🇷🇺 SPECTRE|[SPECTRE](https://github.com/alakhmenev/clover/blob/spectre_team/docs/ru/spectre_team.md)|| ||🇷🇺 SPECTRE|[SPECTRE](https://github.com/alakhmenev/clover/blob/spectre_team/docs/ru/spectre_team.md)||
||🇷🇺 Lucky flight|[Swarm of Improved Clover](https://github.com/bessiaka/clover/blob/Lucky-flight/docs/ru/lucky_flight.md)||
||🇷🇺 SolidEye|[Разработка лидара без движущихся частей](https://github.com/feanorgg/clover/blob/solideye/docs/ru/solid_eye.md)|| ||🇷🇺 SolidEye|[Разработка лидара без движущихся частей](https://github.com/feanorgg/clover/blob/solideye/docs/ru/solid_eye.md)||
||🇰🇬 AI_U_CLOVER|[AIU_CLOVER](https://github.com/zhibekm/clover/blob/zhibekm-patch-1/docs/en/aiu-article.md)|| ||🇰🇬 AI_U_CLOVER|[AIU_CLOVER](https://github.com/zhibekm/clover/blob/zhibekm-patch-1/docs/en/aiu-article.md)||
||🇷🇺 Scout_Drone|[Создание поисково-спасательного беспилотного летательного аппарата](https://github.com/MustafaNatur/clover/blob/Scout_Drone.md/docs/ru/scout_drone.md)||
||🇷🇺 С305|[Система мониторинга воздуха](https://github.com/Ruslan2288/clover/blob/master/docs/ru/air_monitor.md)|&nbsp;| ||🇷🇺 С305|[Система мониторинга воздуха](https://github.com/Ruslan2288/clover/blob/master/docs/ru/air_monitor.md)|&nbsp;|
|✕|🇻🇳 Dragon&Tanker|[Dragon&Tanker](https://github.com/uml4/clover/blob/drone_observe_autonomous_car/docs/en/dragon_and_tanker_team.md)||
|✕|🇷🇺 V-NAV|[Visual Navigation](https://github.com/v-nav/clover/blob/v-nav_article/docs/ru/v-nav.md)||
|✕|🇷🇺 Джедаи 1581|[Ретранслятор на базе Клевера](https://github.com/JJNIK/clover/blob/patch-1/docs/ru/1581.md)||
|✕|🇷🇺 Lucky flight|[Swarm of Improved Clover](https://github.com/bessiaka/clover/blob/Lucky-flight/docs/ru/lucky_flight.md)||
|✕|🇺🇸 EnviroFleet|[EnviroFleet](https://github.com/gueyman/clover/blob/envirofleet/docs/en/enviro_fleet.md)||
|✕|🇷🇺 Бизнес-гуси|[Drone Rover Climbing System](https://github.com/HexaHEX/clover/blob/CopterHack2022_Business_Geese-1/docs/ru/business_geese.md)||
|✕|🇷🇺 fuall|[Доставка дронами](https://github.com/Silly4s/clover/blob/master/docs/ru/dostavka.md)||
|✕|🇷🇺 Scout_Drone|[Создание поисково-спасательного беспилотного летательного аппарата](https://github.com/MustafaNatur/clover/blob/Scout_Drone.md/docs/ru/scout_drone.md)|&nbsp;|
команды, не дошедшие до финала.
## Направление "кейс компании" ## Направление "кейс компании"

View File

@@ -0,0 +1,119 @@
# Образовательные конкурсы
## 1. Конкурс на лучшую образовательную лекцию {#lecture}
Компания «Коптер Экспресс» объявляет конкурс на лучшую образовательную лекцию с использованием конструктора программируемого квадрокоптера «COEX Клевер 4».
Основной целью конкурса является популяризация летающей робототехники и развитие сообщества данного направления.
### Требования к лекции
* Тематика лекции - открытая, на выбор участника (пример: сборка, настройка, программирование, лекция интегрированная в школьную программу и т.п.).
* Основной инструмент лекции - «Конструктор программируемого квадрокоптера «COEX Клевер 4» и/или «Симуляционная среда программируемого квадрокоптера Клевер».
> **Note** *Версия «COEX Клевер» не ранее [4 версии](https://clover.coex.tech/ru/assemble_4.html). «Симуляционная среда программируемого квадрокоптера Клевер» - не ранее [версии 1.0](https://github.com/CopterExpress/clover_vm/releases/tag/v1.0).
* Видео загружено на YouTube или иную общедоступную платформу, и находится в открытом доступе для любых пользователей;
* Язык лекции - на выбор участника. Если язык лекции не русский/английский - наличие субтитров к видео на английском языке.
* Продолжительность лекции - от 15 мин. до 3 часов.
* Лекция может являться частью курса или серии лекций, но должна раскрывать заданную участником тематику и быть завершенной.
### Требования к участникам
* Участник должен быть автором лекции.
* Техническую поддержку при записи лекции могут оказывать сторонние лица.
* Статус участника - без ограничений (школьник, студент, представитель общеобразовательного учреждения, представитель ДПО, представитель ВПО, представитель СПО, представитель отрасли, любитель).
### Подача заявки
Прием заявок осуществляется через [Google Форму](https://docs.google.com/forms/d/e/1FAIpQLScE2kN5dO2OYNSM8hOYzOa5Qvh2uDdd9Fjx8OnL1W93bfEBgw/viewform).
Дедлайн подачи заявок: 1 сентября 2022 года.
### Призы
По итогам представленной заявки жюри определяет победителей конкурса. При определении победителей учитываются качество видео, содержание и показатели вовлечения аудитории.
* 1 место: $500.
* 2 место: $400.
* 3 место: $300.
* 4 место: $200.
* 5 место: $100.
## 2. Конкурс на лучший школьный урок {#lesson}
Компания «Коптер Экспресс» объявляет конкурс на лучший школьный урок с использованием конструктора программируемого квадрокоптера «COEX Клевер 4».
Основной целью конкурса является популяризация летающей робототехники и развитие сообщества данного направления.
### Требования к уроку
* Основной инструмент урока - «Конструктор программируемого квадрокоптера «COEX Клевер 4».
> **Note** *Версия «COEX Клевер» не ранее [4 версии](https://clover.coex.tech/ru/assemble_4.html).
* Интеграция квадрокоптера в любую из общеобразовательных дисциплин (физика, математика, информатика, урок технологии и т.д.).
* Практическое использование основного инструмента на уроке.
* Класс - без ограничений (начальная, основная школа).
* Продолжительность урока - 30-45 минут.
* Формат урока - оффлайн.
* Видео урока снято в классе общеобразовательного учреждения.
### Требования к участникам
* Участник должен быть автором урока.
* Участник должен являться преподавателем общеобразовательного учреждения.
### Подача заявки
Прием заявок осуществляется через [Google Форму](https://docs.google.com/forms/d/e/1FAIpQLSdelVy6yQ1iN6u88KeiEIKGj7gGaM0xccSt2tiYKB46ICmjkQ/viewform).
Дедлайн подачи заявок: 1 сентября 2022 года.
### Призы
По итогам представленной заявки жюри определяет победителей конкурса. При определении победителей учитываются качество видео и материала.
* 1 место: $500.
* 2 место: $400.
* 3 место: $300.
* 4 место: $200.
* 5 место: $100.
## 3. Конкурс на лучший онлайн-курс {#course}
Компания «Коптер Экспресс» объявляет конкурс на лучший онлайн-курс с использованием конструктора программируемого квадрокоптера «COEX Клевер 4».
Основной целью конкурса является популяризация летающей робототехники и развитие сообщества данного направления.
Оценка курса производится по заявленному на конкурс отдельному, общедоступному уроку.
### Требования к курсу
* Направление курса - «Летающая робототехника».
* Основной инструмент курса - «Конструктор программируемого квадрокоптера «COEX Клевер 4» и/или «Симуляционная среда программируемого квадрокоптера Клевер».
> **Note** *Версия «COEX Клевер» не ранее [4 версии](https://clover.coex.tech/ru/assemble_4.html). «Симуляционная среда программируемого квадрокоптера Клевер» - не ранее [версии 1.0](https://github.com/CopterExpress/clover_vm/releases/tag/v1.0).
* Курс расположен на общедоступной платформе (Stepik, Coursera и т.п.).
* Доступ к курсу может быть как платный, так и бесплатный, на конкурс принимается один бесплатный и общедоступный урок заявленного курса.
* Заявленный на конкурс урок должен быть в открытом доступе.
* Язык курса - на выбор участника. Если язык урока не русский/английский - наличие субтитров к видео (в случае наличия видео) на английском языке.
* Продолжительность курса и заявленного урока - не ограничена.
* Участники вправе подать на конкурс курс разработанный ранее, и применявшийся в системе образования, с сохранением всех вышеперечисленных требований.
### Требования к участникам
* Участник должен быть автором курса.
* Техническую поддержку при подготовке курса могут оказывать сторонние лица.
* Статус участника - без ограничений (школьник, студент, представитель Общеобразовательного учреждения, представитель ДПО, представитель ВПО, представитель СПО, представитель отрасли, любитель).
### Подача заявки
Прием заявок осуществляется через [Google Форму](https://docs.google.com/forms/d/e/1FAIpQLSdf2Q68X4hPnFE9f3EP95AxPNnzHKqIsFHtTRT6EBKiH93wzg/viewform).
Дедлайн подачи заявок: 1 сентября 2022 года
### Призы
По итогам представленной заявки жюри определяет победителей конкурса. Оценка производится по заявленному на конкурс уроку, при определении победителей учитываются качество материала (формат подачи материала, общий объем и содержание курса).
* 1 место: $1000.
* 2 место: $800.
* 3 место: $600.
* 4 место: $400.
* 5 место: $200.

View File

@@ -1,13 +1,13 @@
# Настройка failsafe # Настройка Failsafe
Основная статья: https://docs.px4.io/master/en/config/safety.html. Основная статья: https://docs.px4.io/master/en/config/safety.html.
Во вкладке *Safety* настраиваются реакции квадрокоптера на различные нештатные ситуации. Рекомендуется включить как минимум реакцию на потерю связи с пультом управления: Во вкладке *Safety* настраиваются реакции квадрокоптера на различные нештатные ситуации. Рекомендуется включить как минимум реакцию на потерю связи с пультом управления:
1. Откройте вкладку *Safety*. 1. В программе QGroundControl перейдите в панель *Vehicle Setup* и выберите меню *Safety*.
2. В блоке *RC Loss Failsafe Trigger* выберите один из рекомендуемых вариантов реакции на потерю связи с пультом: 2. В блоке *RC Loss Failsafe Trigger* выберите один из рекомендуемых вариантов реакции на потерю связи с пультом:
* *Land mode* – переход в режим посадки; * *Land mode* – переход в режим посадки;
* *Terminate* аварийное отключение моторов. * *Terminate* аварийное отключение моторов.
3. В поле *RC Loss Timeout* выберите значение таймаута, по истечении которого связь с пультом считается потерянной. Рекомендуемое значение  0.5 s. 3. В поле *RC Loss Timeout* выберите значение таймаута, по истечении которого связь с пультом считается потерянной. Рекомендуемое значение  2 s.
<img src="../assets/qgc-failsafe.png" alt="QGroundControl failsafe" class="zoom"> <img src="../assets/qgc-failsafe.png" alt="QGroundControl failsafe" class="zoom">

View File

@@ -11,7 +11,8 @@
* `base_link` — координаты относительно квадрокоптера: схематичное изображение квадрокоптера на иллюстрации; * `base_link` — координаты относительно квадрокоптера: схематичное изображение квадрокоптера на иллюстрации;
* `body` — координаты относительно квадрокоптера без учета наклонов по тангажу и крену: красная, синяя и зеленая линии на иллюстрации; * `body` — координаты относительно квадрокоптера без учета наклонов по тангажу и крену: красная, синяя и зеленая линии на иллюстрации;
* <a name="navigate_target"></a>`navigate_target` координаты точки, в которую сейчас летит дрон (с использованием [navigate](simple_offboard.md#navigate)); * <a name="navigate_target"></a>`navigate_target` координаты точки, в которую сейчас летит дрон (с использованием [navigate](simple_offboard.md#navigate));
* `setpoint` текущий setpoint по позиции. * `setpoint` текущий setpoint по позиции;
* `main_camera_optical` система координат, [связанная с основной камерой](camera_setup.md#frame).
При использовании [системы позиционирования по ArUco-маркерам](aruco.md) появляются дополнительные фреймы: При использовании [системы позиционирования по ArUco-маркерам](aruco.md) появляются дополнительные фреймы:

View File

@@ -38,7 +38,7 @@ rostopic echo /rangefinder/range
> **Hint** Для корректной работы лазерного дальномера с полетным контроллером рекомендуется использование [специальной сборки PX4 для Клевера](firmware.md#прошивка-для-клевера). > **Hint** Для корректной работы лазерного дальномера с полетным контроллером рекомендуется использование [специальной сборки PX4 для Клевера](firmware.md#прошивка-для-клевера).
Для использования данных с дальномера в [PX4 должен быть сконфигурирован](px4_parameters.md). Для использования данных с дальномера в [PX4 должен быть сконфигурирован](parameters.md).
При использовании EKF2 (`SYS_MC_EST_GROUP` = `ekf2`): При использовании EKF2 (`SYS_MC_EST_GROUP` = `ekf2`):

View File

@@ -29,7 +29,7 @@ MAVLink-сообщение это отдельная "порция" данных
* `GLOBAL_POSITION_INT` глобальная позиция квадрокоптера (широта/долгота/высота); * `GLOBAL_POSITION_INT` глобальная позиция квадрокоптера (широта/долгота/высота);
* `COMMAND_LONG` команда для квадрокоптера (взлететь, сесть, переключить режим и т. д.). * `COMMAND_LONG` команда для квадрокоптера (взлететь, сесть, переключить режим и т. д.).
Полный список MAVLink-сообщений можно посмотреть в [документации MAVLink](http://mavlink.org/messages/common). Полный список MAVLink-сообщений можно посмотреть в [документации MAVLink](https://mavlink.io/en/messages/common.html).
### Система, компонент системы ### Система, компонент системы

View File

@@ -1,13 +1,14 @@
# Полетные режимы # Полетные режимы
**Режим** полетного контроллера PX4 определяет, как именно коптер (или другое ТС) должно себя вести: каким образом интерпретировать входящие команды и сигналы с пульта. Режим переключается одним из переключателей на пульте радиоуправления. **Режим** полетного контроллера PX4 определяет, как именно квадрокоптер (или другой аппарат) должен себя вести: каким образом интерпретировать входящие команды и сигналы с пульта. Режим переключается одним из переключателей на пульте радиоуправления.
Чтобы настроить полетные режимы: Чтобы настроить полетные режимы:
1. Зайдите во вкладку *Vehicle Setup*. 1. В программе QGroundControl перейдите в панель *Vehicle Setup*.
2. Выберите меню *Flight Modes*. 2. Выберите меню *Flight Modes*.
3. Установите переключатель режимов на переключатель SwC (Channel 6). 3. Установите переключатель режимов (*Mode Channel*) на переключатель SwC (*Channel 6*).
4. Выберите необходимые полетные режимы. 4. Опционально, установите экстренное отключение пропеллеров (*Emergency Kill Switch Channel*) на переключатель SwA (*Channel 5*).
5. Выберите необходимые полетные режимы.
Рекомендуемые полетные режимы: Рекомендуемые полетные режимы:
@@ -15,8 +16,8 @@
* Flight Mode 4: *Altitude*. * Flight Mode 4: *Altitude*.
* Flight Mode 6: *Position*. * Flight Mode 6: *Position*.
5. Проверьте корректность переключения режимов, переключая переключатель на пульте. 6. Проверьте корректность переключения режимов, переключая переключатель на пульте.
6. Назначьте аварийное отключение моторов (*Kill switch*) на переключатель SwA (Channel 5). 7. Назначьте аварийное отключение моторов (*Kill switch*) на переключатель SwA (Channel 5).
<img src="../assets/qgc-modes.png" class="zoom" alt="QGroundControl modes"> <img src="../assets/qgc-modes.png" class="zoom" alt="QGroundControl modes">

View File

@@ -4,9 +4,7 @@
## Включение ## Включение
> **Hint** Необходимо использование [специальной сборки PX4 для Клевера](firmware.md#прошивка-для-клевера). > **Hint** Для работы Optical Flow необходим [подключенный и настроенный лазерный дальномер](laser.md).
Необходимо использование дальномера. [Подключите и настройте дальномер VL53L1X](laser.md), используя инструкцию.
Включите Optical Flow в файле `~/catkin_ws/src/clover/clover/launch/clover.launch`: Включите Optical Flow в файле `~/catkin_ws/src/clover/clover/launch/clover.launch`:
@@ -14,7 +12,7 @@
<arg name="optical_flow" default="true"/> <arg name="optical_flow" default="true"/>
``` ```
Optical Flow публикует данные в топик `mavros/px4flow/raw/send`. Кроме того, в топик `optical_flow/debug` публикуется визуализация, которую можно просмотреть с помощью [web_video_server](web_video_server.md). Optical Flow публикует данные в топик `/mavros/px4flow/raw/send`. Кроме того, в топик `/optical_flow/debug` публикуется визуализация, которую можно просмотреть с помощью [web_video_server](web_video_server.md).
> **Info** Для правильной работы модуль камеры должен быть корректно подключен и [сконфигурирован](camera.md). > **Info** Для правильной работы модуль камеры должен быть корректно подключен и [сконфигурирован](camera.md).

View File

@@ -1,6 +1,6 @@
# Настройка PID регуляторов # Настройка PID регуляторов
Основная статья: https://docs.px4.io/v1.9.0/en/config_mc/pid_tuning_guide_multicopter.html. Основная статья: https://docs.px4.io/master/en/config_mc/pid_tuning_guide_multicopter.html.
В этой статье описаны методы и основные технологии настройки каскадного ПИД-регулятора. Приведенные советы и методики подходят для любых видов рам (Квадрокоптеров, Гексакоптеров, Октокоптеров и т.д.). В этой статье описаны методы и основные технологии настройки каскадного ПИД-регулятора. Приведенные советы и методики подходят для любых видов рам (Квадрокоптеров, Гексакоптеров, Октокоптеров и т.д.).

View File

@@ -6,15 +6,16 @@
> **Note** Калибровка делителя напряжения должна выполняться с подключенным АКБ. > **Note** Калибровка делителя напряжения должна выполняться с подключенным АКБ.
В случае отсутствия индикатора напряжения или невозможности ручной калибровки, установите усредненное значение делителя напряжения для комплекта Клевер 4 (*Voltage divider* = 11). 1. В программе QGroundControl перейдите в панель *Vehicle Setup* и выберите меню *Power*.
2. Установите параметр *Number of cells* в соответствии с количеством банок в АКБ (*3S* для Клевера 4).
1. Установите параметр *Number of cells* в соответствии с количеством банок в АКБ (*3S* для Клевера 4). 3. Откалибруйте делитель напряжения:
2. Откалибруйте делитель напряжения:
* Подключите индикатор напряжения к балансировочному разъему АКБ. * Подключите индикатор напряжения к балансировочному разъему АКБ.
* Нажмите кнопку *Calculate* напротив надписи *Voltage Divider*. * Нажмите кнопку *Calculate* напротив надписи *Voltage Divider*.
* Введите в открывшемся поле суммарное значение напряжения с индикатора напряжения. * Введите в открывшемся поле суммарное значение напряжения с индикатора напряжения.
* Нажмите *Close*, чтобы сохранить рассчитанное значение. * Нажмите *Close*, чтобы сохранить рассчитанное значение.
В случае отсутствия индикатора напряжения или невозможности ручной калибровки, установите усредненное значение делителя напряжения для комплекта Клевер 4 (*Voltage divider* = 11).
<img src="../assets/qgc-voltage-divider.png" class="zoom"> <img src="../assets/qgc-voltage-divider.png" class="zoom">
Дополнительная информация: https://docs.qgroundcontrol.com/en/SetupView/Power.html. Дополнительная информация: https://docs.qgroundcontrol.com/en/SetupView/Power.html.
@@ -30,6 +31,6 @@
<img src="../assets/qgc-power.png" class="zoom"> <img src="../assets/qgc-power.png" class="zoom">
Дополнительная информация: https://docs.px4.io/v1.9.0/en/advanced_config/esc_calibration.html. Дополнительная информация: https://docs.px4.io/master/en/advanced_config/esc_calibration.html.
**Далее**: [настройка Failsafe](failsafe.md). **Далее**: [настройка Failsafe](failsafe.md).

View File

@@ -2,7 +2,7 @@
<img src="../assets/programming.png" width=250 align=right> <img src="../assets/programming.png" width=250 align=right>
Платформа Клевера позволяет использовать [Raspberry Pi](raspberry.md) для того, чтобы запрограммировать автономный полет дрона. Чаще всего программа для автономного полета пишется на языке Python. Программа может [получать телеметрию](simple_offboard.md#get_telemetry) (заряд батареи, ориентацию, расположение и т. д.) и отправлять команды: [полететь в точку](simple_offboard.md#navigate), [установить ориентацию](simple_offboard.md#set_attitude), [угловую скорость](simple_offboard.md#set_rates) и т. д. Платформа Клевера позволяет использовать [Raspberry Pi](raspberry.md) для того, чтобы запрограммировать автономный полет дрона. Чаще всего программа для автономного полета пишется на языке Python. Программа может [получать телеметрию](simple_offboard.md#get_telemetry) (заряд батареи, ориентацию, положение, скорости) и отправлять команды, например: [полететь в точку](simple_offboard.md#navigate), [установить ориентацию](simple_offboard.md#set_attitude), [установить угловую скорость](simple_offboard.md#set_rates).
Платформа основывается на [фреймворке ROS](ros.md), который обеспечивает связь между пользовательской программой и сервисами Клевера, которые запущены в фоне в виде systemd-демона `clover`. Для связи с полетным контроллером используется пакет [MAVROS](mavros.md). Платформа основывается на [фреймворке ROS](ros.md), который обеспечивает связь между пользовательской программой и сервисами Клевера, которые запущены в фоне в виде systemd-демона `clover`. Для связи с полетным контроллером используется пакет [MAVROS](mavros.md).
@@ -10,7 +10,7 @@
## Система позиционирования {#positioning} ## Система позиционирования {#positioning}
Для того, чтобы дрон мог зависать на месте или летать между точками, необходимо использование системы позиционирования. Такая система должна вычислять и сообщать дрону, где он находится. Клевер предполагает использование нескольких систем позиционирования: [optical flow](optical_flow.md) (используется [камера](camera.md) и [лазерный дальномер](laser.md)), [визуальные маркеры](aruco.md) (используется камера и маркеры, наклеенные на пол или потолок), GPS и других. Для того, чтобы дрон мог зависать на месте или летать между точками, необходимо использование системы позиционирования. Такая система вычисляет и сообщает дрону, где он находится. Клевер предполагает использование нескольких систем позиционирования: [optical flow](optical_flow.md) (используется [камера](camera.md) и [лазерный дальномер](laser.md)), [визуальные маркеры](aruco.md) (используется камера и маркеры, наклеенные на пол или потолок), GPS и других.
### Optical flow ### Optical flow
@@ -32,7 +32,7 @@
## Автономный полет {#flight} ## Автономный полет {#flight}
> **Info** Для изучения языка программирования Python вы можете обратиться к [самоучителю](https://pythonworld.ru/samouchitel-python). > **Info** Для изучения языка программирования Python можно обратиться к [самоучителю](https://pythonworld.ru/samouchitel-python).
После настройки системы позиционирования становится возможным написание скриптов для автономных полетов. Для выполнения скриптов [подключитесь в Raspberry Pi по SSH](ssh.md). После настройки системы позиционирования становится возможным написание скриптов для автономных полетов. Для выполнения скриптов [подключитесь в Raspberry Pi по SSH](ssh.md).
@@ -51,8 +51,6 @@ python3 flight.py
Пример программы для полета (взлет, пролет вперед, посадка): Пример программы для полета (взлет, пролет вперед, посадка):
```python ```python
# coding: utf8
import rospy import rospy
from clover import srv from clover import srv
from std_srvs.srv import Trigger from std_srvs.srv import Trigger

View File

@@ -9,7 +9,7 @@
## Подключение пульта ## Подключение пульта
1. Зайдите во вкладку *Vehicle Setup* и выберите меню *Radio*. 1. В программе QGroundControl перейдите в панель *Vehicle Setup* и выберите меню *Radio*.
2. Включите пульт, переводя переключатель *POWER* в верхнее положение. 2. Включите пульт, переводя переключатель *POWER* в верхнее положение.
3. Убедитесь, что связь с приемником установлена. 3. Убедитесь, что связь с приемником установлена.

View File

@@ -43,7 +43,7 @@ Axis или Grid настроенный на фрейм `aruco_map` будут
### jsk_rviz_plugins ### jsk_rviz_plugins
Рекомендуется также установка набора дополнительных полезных плагинов для rviz [jsk_rviz_plugins](https://jsk-docs.readthedocs.io/en/latest/jsk_visualization/doc/jsk_rviz_plugins/index.html). Это набор позволяет визуализировать топики типа `TwistStamped` (скорость), `CameraInfo`, `PolygonArray` и многое другое. Для установки используйте команду: Рекомендуется также установка набора дополнительных полезных плагинов для rviz [jsk_rviz_plugins](https://jsk-visualization.readthedocs.io/en/latest/jsk_rviz_plugins/index.html). Это набор позволяет визуализировать топики типа `TwistStamped` (скорость), `CameraInfo`, `PolygonArray` и многое другое. Для установки используйте команду:
```bash ```bash
sudo apt-get install ros-melodic-jsk-visualization sudo apt-get install ros-melodic-jsk-visualization

View File

@@ -295,7 +295,7 @@ set_velocity(vx=1, vy=0.0, vz=0, frame_id='body')
Перевести коптер в [режим](modes.md) посадки (`AUTO.LAND` или аналогичный). Перевести коптер в [режим](modes.md) посадки (`AUTO.LAND` или аналогичный).
> **Note** Для автоматического отключения винтов после посадки [параметр PX4](px4_parameters.md) `COM_DISARM_LAND` должен быть установлен в значение > 0. > **Note** Для автоматического отключения винтов после посадки [параметр PX4](parameters.md) `COM_DISARM_LAND` должен быть установлен в значение > 0.
Посадка коптера: Посадка коптера:

View File

@@ -4,16 +4,40 @@
> **Hint** Смотрите актуальный набор команд установки необходимого ПО для запуска симулятора Клевера в скрипте сборки виртуальной машины с симулятором: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh). > **Hint** Смотрите актуальный набор команд установки необходимого ПО для запуска симулятора Клевера в скрипте сборки виртуальной машины с симулятором: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh).
Требования для сборки: Ubuntu 20.04 и [ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu). Требования для сборки: **Ubuntu 20.04**.
## Установка ROS
Установите ROS Noetic используя [официальную документацию по установке](http://wiki.ros.org/noetic/Installation/Ubuntu) (Desktop или Full установка).
Добавьте выполнение инициализирующего скрипта ROS `setup.bash` в ваш файл `.bashrc`:
```bash
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
```
Установите необходимые инструменты, которые понадобятся для дальнейшей установки:
```bash
sudo apt install build-essential git python3-pip python3-rosdep
```
## Создание рабочего пространства для симулятора ## Создание рабочего пространства для симулятора
В этой статье мы будем использовать `catkin_ws` как имя рабочего пространства (вы можете поменять её). Мы создадим её в домашнем каталоге текущего пользователя (`~`). Создайте рабочее пространство:
Создайте рабочее пространство и загрузите исходный код Клевера:
```bash ```bash
mkdir -p ~/catkin_ws/src mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
```
Склонируйте исходный код пакетов Clover:
```bash
cd ~/catkin_ws/src cd ~/catkin_ws/src
git clone --depth 1 https://github.com/CopterExpress/clover git clone --depth 1 https://github.com/CopterExpress/clover
git clone --depth 1 https://github.com/CopterExpress/ros_led git clone --depth 1 https://github.com/CopterExpress/ros_led
@@ -24,6 +48,7 @@ git clone --depth 1 https://github.com/ethz-asl/mav_comm
```bash ```bash
cd ~/catkin_ws cd ~/catkin_ws
sudo rosdep init
rosdep update rosdep update
rosdep install --from-paths src --ignore-src -y rosdep install --from-paths src --ignore-src -y
``` ```
@@ -36,15 +61,19 @@ sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requiremen
## Загрузка исходного кода PX4 ## Загрузка исходного кода PX4
Сборка PX4 будет осуществлена вместе с другими пакетами в нашем рабочем пространстве. Вы можете загрузить его прямо в рабочее пространство или поместить куда-нибудь и создать симлинк к `~/catkin_ws/src`. Нам также нужно будет поместить его подмодуль `sitl_gazebo` в `~/catkin_ws/src`. Для упрощения мы загрузим прошивку прямо в рабочее пространство: Сборка PX4 будет осуществлена вместе с другими пакетами в нашем рабочем пространстве. Вы можете загрузить его прямо в рабочее пространство или поместить куда-нибудь и создать симлинк к `~/catkin_ws/src`. Нам также нужно будет поместить его подмодули `sitl_gazebo` и `mavlink` в `~/catkin_ws/src`.
Склонируйте исходный код PX4 и создайте необходимые симлинки:
```bash ```bash
cd ~/catkin_ws/src
git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/PX4-Autopilot ln -s ~/PX4-Autopilot ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/sitl_gazebo ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/
``` ```
> **Hint** Вы можете использовать более позднюю версию PX4 с большим риском, что что-то не заработает.
## Установка зависимостей PX4 ## Установка зависимостей PX4
PX4 имеет свой собственный скрипт для установки зависимостей. Воспользуемся им: PX4 имеет свой собственный скрипт для установки зависимостей. Воспользуемся им:
@@ -56,10 +85,12 @@ sudo ./ubuntu.sh
Он установит все, что нужно для сборки PX4 и SITL. Он установит все, что нужно для сборки PX4 и SITL.
Также вы можете пропустить установку ARM тулчейна, если вы не планируете компилировать PX4 для вашего полетного контроллера. Для этого воспользуйтесь флагом `--no-nuttx`: > **Hint** Также вы можете пропустить установку ARM тулчейна, если вы не планируете компилировать PX4 для вашего полетного контроллера. Для этого воспользуйтесь флагом `--no-nuttx`: `sudo ./ubuntu.sh --no-nuttx`.
``` Установите дополнительные необходимые Python-пакеты:
sudo ./ubuntu.sh --no-nuttx
```bash
pip3 install --user toml
``` ```
## Добавление рамы Клевера ## Добавление рамы Клевера
@@ -67,7 +98,7 @@ sudo ./ubuntu.sh --no-nuttx
Добавьте в PX4 раму Клевера с помощью следующей команды: Добавьте в PX4 раму Клевера с помощью следующей команды:
```bash ```bash
ln -s "$(catkin_find clover_simulation airframes)"/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/ ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
``` ```
## Установка датасетов geographiclib ## Установка датасетов geographiclib
@@ -87,13 +118,37 @@ cd ~/catkin_ws
catkin_make catkin_make
``` ```
> **Note** Некоторые файлы, особенно плагины Gazebo, требуют большого объема оперативной памяти для сборки. Вы можете уменьшить количество параллельных процессов; количество параллельных процессов должно быть равно объёму RAM в гигабайтах, поделенному на 2. Например, для машины с 16Гб следует указывать не более 8 процессов. Вы можете указать количество процессов, используя флаг `-j` : ```catkin_make -j8``` > **Note** Если процесс сборки завершится с ошибкой, связанной с недостатком памяти (`c++: fatal error: Killed signal terminated program cc1plus`), уменьшите количество параллельно исполняемых процессов используя ключ `-j`. Например, чтобы использовать только два параллельных процесса используйте команду `catkin_make -j2`.
## Запуск симулятора ## Запуск симулятора
Чтобы удостовериться в том, что все было собрано корректно, попробуйте запустить симулятор: Чтобы удостовериться в том, что все было собрано корректно, попробуйте запустить симулятор:
```bash ```bash
source ~/catkin_ws/devel/setup.bash
roslaunch clover_simulation simulator.launch roslaunch clover_simulation simulator.launch
``` ```
Вы можете проверить автономный полет используя скрипты в директории `~/catkin_ws/src/clover/clover/examples`.
## Дополнительные шаги
Опционально вы можете установить systemd-сервис для roscore для того, чтобы roscore был постоянно запущен в фоне:
```bash
sed -i "s/pi/$USER/g" ~/catkin_ws/src/clover/builder/assets/roscore.service
sudo cp ~/catkin_ws/src/clover/builder/assets/roscore.service /etc/systemd/system
sudo systemctl enable roscore
sudo systemctl start roscore
```
Установите любой веб-сервер, чтобы раздавать веб-инструменты Клевера (директория `~/.ros/www`), например, Monkey:
```bash
wget https://github.com/CopterExpress/clover_vm/raw/master/assets/packages/monkey_1.6.9-1_amd64.deb -O /tmp/monkey_1.6.9-1_amd64.deb
sudo apt-get install -y /tmp/monkey_1.6.9-1_amd64.deb
sed "s/pi/$USER/g" ~/catkin_ws/src/clover/builder/assets/monkey | sudo tee /etc/monkey/sites/default
sudo -E sh -c "sed -i 's/SymLink Off/SymLink On/' /etc/monkey/monkey.conf"
sudo cp ~/catkin_ws/src/clover/builder/assets/monkey.service /etc/systemd/system/monkey.service
sudo systemctl enable monkey
sudo systemctl start monkey
```

View File

@@ -77,7 +77,7 @@ GPS датчик необходим полетов с использование
### Выставление скорости симуляции ### Выставление скорости симуляции
PX4, начиная с версии 1.9, поддерживает [принудительную установку скорости симуляции](https://dev.px4.io/v1.9.0/en/simulation/#simulation_speed) с помощью переменной окружения `PX4_SIM_SPEED_FACTOR`. Выставление этой переменной подготавливает все компоненты симулятора к соответствующему ускорению/замедлению. PX4, начиная с версии 1.9, поддерживает [принудительную установку скорости симуляции](https://docs.px4.io/master/en/simulation/#run-simulation-faster-than-realtime) с помощью переменной окружения `PX4_SIM_SPEED_FACTOR`. Выставление этой переменной подготавливает все компоненты симулятора к соответствующему ускорению/замедлению.
Значение этой переменной должно соответствовать величине Real Time Factor (скорости симуляции по отношению к реальному времени), получаемой при использовании `throttling_camera`. Величина Real Time Factor отображается в окне Gazebo на нижней панели: Значение этой переменной должно соответствовать величине Real Time Factor (скорости симуляции по отношению к реальному времени), получаемой при использовании `throttling_camera`. Величина Real Time Factor отображается в окне Gazebo на нижней панели:

View File

@@ -4,7 +4,7 @@
Основная статья: https://dev.px4.io/en/simulation/ Основная статья: https://dev.px4.io/en/simulation/
Симуляция PX4 возможна в ОС GNU/Linux и macOS с использованием систем симуляции физической среды [jMAVSim](https://pixhawk.org/dev/hil/jmavsim) и [Gazebo](http://gazebosim.org). Симуляция PX4 возможна в ОС GNU/Linux и macOS с использованием систем симуляции физической среды [jMAVSim](https://docs.px4.io/master/en/simulation/jmavsim.html) и [Gazebo](http://gazebosim.org).
jMAVSim является легковесной средой, предназначенной только для тестирование мультироторных летательных систем; Gazebo универсальная среда для любых типов роботов. jMAVSim является легковесной средой, предназначенной только для тестирование мультироторных летательных систем; Gazebo универсальная среда для любых типов роботов.

View File

@@ -14,7 +14,7 @@
* Пакеты [ROS](http://www.ros.org/), требуемые для запуска нод Клевера * Пакеты [ROS](http://www.ros.org/), требуемые для запуска нод Клевера
* Собранный для симулятора PX4 * Собранный для симулятора PX4
* Легковесный web-интерфейс для Gazebo [Gzweb](http://gazebosim.org/gzweb.html) * Легковесный web-интерфейс для Gazebo [Gzweb](http://gazebosim.org/gzweb.html)
* Web-терминал [Butterfly](http://paradoxxxzero.github.io/2014/02/28/butterfly.html) * Web-терминал [Butterfly](https://github.com/paradoxxxzero/butterfly)
## Предварительная настройка ## Предварительная настройка

View File

@@ -17,13 +17,11 @@
<a name="block-takeoff"></a><!-- old name of anchor --> <a name="block-takeoff"></a><!-- old name of anchor -->
Полет в точку и ожидание окончания полета: Функция для полета в точку и ожидание окончания полета:
```python ```python
import math import math
# ...
def navigate_wait(x=0, y=0, z=0, yaw=float('nan'), speed=0.5, frame_id='', auto_arm=False, tolerance=0.2): def navigate_wait(x=0, y=0, z=0, yaw=float('nan'), speed=0.5, frame_id='', auto_arm=False, tolerance=0.2):
navigate(x=x, y=y, z=z, yaw=yaw, speed=speed, frame_id=frame_id, auto_arm=auto_arm) navigate(x=x, y=y, z=z, yaw=yaw, speed=speed, frame_id=frame_id, auto_arm=auto_arm)
@@ -74,8 +72,6 @@ land_wait()
```python ```python
import math import math
# ...
def wait_arrival(tolerance=0.2): def wait_arrival(tolerance=0.2):
while not rospy.is_shutdown(): while not rospy.is_shutdown():
telem = get_telemetry(frame_id='navigate_target') telem = get_telemetry(frame_id='navigate_target')
@@ -91,8 +87,6 @@ def wait_arrival(tolerance=0.2):
```python ```python
import math import math
# ...
def get_distance(x1, y1, z1, x2, y2, z2): def get_distance(x1, y1, z1, x2, y2, z2):
return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2 + (z1 - z2) ** 2) return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2 + (z1 - z2) ** 2)
``` ```
@@ -104,8 +98,6 @@ def get_distance(x1, y1, z1, x2, y2, z2):
```python ```python
import math import math
# ...
def get_distance_global(lat1, lon1, lat2, lon2): def get_distance_global(lat1, lon1, lat2, lon2):
return math.hypot(lat1 - lat2, lon1 - lon2) * 1.113195e5 return math.hypot(lat1 - lat2, lon1 - lon2) * 1.113195e5
``` ```
@@ -221,19 +213,16 @@ from geometry_msgs.msg import PoseStamped, TwistStamped
from sensor_msgs.msg import BatteryState from sensor_msgs.msg import BatteryState
from mavros_msgs.msg import RCIn from mavros_msgs.msg import RCIn
# ...
def pose_update(pose): def pose_update(pose):
# Обработка новых данных о позиции коптера # Обработка новых данных о позиции коптера
pass pass
# Остальные функции-обработчики
# ...
rospy.Subscriber('/mavros/local_position/pose', PoseStamped, pose_update) rospy.Subscriber('/mavros/local_position/pose', PoseStamped, pose_update)
rospy.Subscriber('/mavros/local_position/velocity', TwistStamped, velocity_update) rospy.Subscriber('/mavros/local_position/velocity', TwistStamped, velocity_update)
rospy.Subscriber('/mavros/battery', BatteryState, battery_update) rospy.Subscriber('/mavros/battery', BatteryState, battery_update)
rospy.Subscriber('mavros/rc/in', RCIn, rc_callback) rospy.Subscriber('mavros/rc/in', RCIn, rc_callback)
rospy.spin()
``` ```
Информацию по топикам MAVROS см. по [ссылке](mavros.md). Информацию по топикам MAVROS см. по [ссылке](mavros.md).
@@ -247,14 +236,10 @@ rospy.Subscriber('mavros/rc/in', RCIn, rc_callback)
Пример отправки произвольного [MAVLink-сообщения](mavlink.md) коптеру: Пример отправки произвольного [MAVLink-сообщения](mavlink.md) коптеру:
```python ```python
# ...
from mavros_msgs.msg import Mavlink from mavros_msgs.msg import Mavlink
from mavros import mavlink from mavros import mavlink
from pymavlink import mavutil from pymavlink import mavutil
# ...
mavlink_pub = rospy.Publisher('mavlink/to', Mavlink, queue_size=1) mavlink_pub = rospy.Publisher('mavlink/to', Mavlink, queue_size=1)
# Отправка сообщения HEARTBEAT: # Отправка сообщения HEARTBEAT:
@@ -299,8 +284,6 @@ rospy.spin()
```python ```python
from mavros_msgs.srv import SetMode from mavros_msgs.srv import SetMode
# ...
set_mode = rospy.ServiceProxy('mavros/set_mode', SetMode) set_mode = rospy.ServiceProxy('mavros/set_mode', SetMode)
# ... # ...
@@ -315,8 +298,6 @@ set_mode(custom_mode='STABILIZED')
```python ```python
import math import math
# ...
PI_2 = math.pi / 2 PI_2 = math.pi / 2
def flip(): def flip():
@@ -355,8 +336,6 @@ from pymavlink import mavutil
from mavros_msgs.srv import CommandLong from mavros_msgs.srv import CommandLong
from mavros_msgs.msg import State from mavros_msgs.msg import State
# ...
send_command = rospy.ServiceProxy('/mavros/cmd/command', CommandLong) send_command = rospy.ServiceProxy('/mavros/cmd/command', CommandLong)
def calibrate_gyro(): def calibrate_gyro():
@@ -390,16 +369,14 @@ calibrate_gyro()
import rospy import rospy
import dynamic_reconfigure.client import dynamic_reconfigure.client
# ...
client = dynamic_reconfigure.client.Client('aruco_detect') client = dynamic_reconfigure.client.Client('aruco_detect')
# Turn markers recognition off # Включить распознавание маркеров
client.update_configuration({'enabled': False}) client.update_configuration({'enabled': False})
rospy.sleep(5) rospy.sleep(5)
# Turn markers recognition on # Выключить распознавание маркеров
client.update_configuration({'enabled': True}) client.update_configuration({'enabled': True})
``` ```
@@ -410,10 +387,42 @@ client.update_configuration({'enabled': True})
```python ```python
import math import math
# ...
while not rospy.is_shutdown(): while not rospy.is_shutdown():
if math.isfinite(get_telemetry().lat): if math.isfinite(get_telemetry().lat):
break break
rospy.sleep(0.2) rospy.sleep(0.2)
``` ```
### # {#get-param}
Считать параметр полетного контроллера:
```python
from mavros_msgs.srv import ParamGet
from mavros_msgs.msg import ParamValue
param_get = rospy.ServiceProxy('mavros/param/get', ParamGet)
# Считать параметр типа INT
value = param_get(param_id='COM_FLTMODE1').value.integer
# Считать параметр типа FLOAT
value = param_get(param_id='MPC_Z_P').value.float
```
### # {#set-param}
Изменить параметр полетного контроллера:
```python
from mavros_msgs.srv import ParamSet
from mavros_msgs.msg import ParamValue
param_set = rospy.ServiceProxy('mavros/param/set', ParamSet)
# Изменить параметр типа INT:
param_set(param_id='COM_FLTMODE1', value=ParamValue(integer=8))
# Изменить параметр типа FLOAT:
param_set(param_id='MPC_Z_P', value=ParamValue(real=1.5))
```

100
docs/ru/testing.md Normal file
View File

@@ -0,0 +1,100 @@
# Список тестирования
Актуальный список для ручного тестирования релизов Клевера.
Критичность: **критично**, средняя критичность, *не критично*.
## [Образ Клевера](image.md)
### Общие тесты
* **Раздача [Wi-Fi](wifi.md)**
* **Возможность подключения по [SSH](ssh.md) по IP и Hostname**
* **Успешное подключение COEX Pix по USB (по умолчанию)**
* Успешное подключение COEX Pix по UART (с настройкой)
* **Бридж для QGC корректное подключение по TCP**
* Бридж для QGC корректное подключение по UDP-b
* **Раздача главной страницы**
* **Раздача пользовательской документации (RU/EN), отсутствие битых изображений и т. д.**
* **Работа веб-терминала Butterfly**
* **Работа web_video_server**
* **Корректная работа драйвера камеры, корректные изображения и данные в топиках**
* **Корректная работа драйвера vl53l1x (i2c к Raspberry), в том числе топика `~data`**
* **Корректная работа optical flow и всех его топиков, полет по optical flow**
* **Полет по полю маркеров**
* **Корректная установка OpenCV возможность использования из Python и C++**
* **Отсутствие неожиданного жора памяти и CPU (можно контролировать с помощью `selfcheck.py` или `htop`)**
* Автоматическая перекалибровка камеры при изменении разрешения
### Тесты веб-части
* Работа веб-просмотрщика топиков
* Работа веб-консоли
* Работа веб 3D-визуализации ArUco (map, detect)
* Работа веб 3D-визуализации web_rviz
* Работа веб 3D-визуализации web_visualization_aruco_map
* Работает отображение карты ArUco `/aruco_map/image` и в snapshot, и в debug
* Визуализация расположения камеры в web rviz
* Правильное отображение осей в `/aruco_map/image`
### Тесты selfcheck.py
* **Корректная работа `rosrun clover selfcheck.py`, отсутствие варнингов, анализ вывода**
* **Выводит ориентацию камеры текстом**
* **Делает `commander check`**
* **Показывается, что используется наш форк прошивки и версию образа**
* **Показывает возникающие ошибки и опечатки, допущенные в .launch файлах**
* **Проверка на throttling**
### Тесты simple_offboard
* **Корректная работа simple_offboard взлет, полет в точку в любом фрейме, отсутствие проблем с `yaw` и `yaw_rate`**
* **В фрейме `body`**
* **В фрейме `aruco_map`**
* **В фрейме `map`**
* **В фрейме `navigate_target`**
* Корректное выполнения флипа
* **Возможность лететь к отдельным маркерам в карте, которые вне кадра и в кадре**
* **Корректное детектирование статуса kill switch при выполнение команды с флагом `auto_arm`**
* *Корректная работа outdoor по GPS-координатам*
* Работают программы из папки `~/examples`
### Тесты [ArUco](aruco.md)
* **Распознавание ArUco-маркеров, корректная работа всех топиков пакета `aruco_detect` и `aruco_map`**
* **VPE-полеты по маркерам на полу**
* *VPE-полеты по маркерам на потолке*
* Корректное распознавание ArUco-маркеров и ArUco-карты (проверка с помощью rviz или debug)
* *Работает в случае если используется слишком большой ID*
* Работают комментарии в файле карты, а также в карте используется от 4 до 8 параметров
* Полет по Optical Flow над 1 маркером
* `aruco_map` не падает в случае маленьких размеров карты и маркеров
### Тесты [pigpiod](gpio.md)
* Корректная работа pigpiod, возможность работы с сонаром, сервой и электромагнитом по мануалу
* Одновременная работа pigpiod и rpi_ws281x (правильная работа светодиодной ленты и сервы)
### Тесты [LED-ленты](leds.md)
* **Работает нода LED ленты на RPi 4**
* Дополнительная проверка на RPi 3, RPi 4 Rev. 1.4
* **Корректная работа всех notify эффектов заданных в `led.launch`**
* **Низкоуровневое управление отдельными диодами**
* **Высокоуровневое управление эффектами**
### [Блочное программирование](blocks.md)
* Корректная работа функционала блочного программирования
* Работа функций сохранение/загрузка/удаление
* Работа с pigpiod
* Работа всех примеров
### Дополнительно
* ROS ноды не падают в случае потери всех соединений (удобно проверять с экраном)
* Работает `rosshow`
* Работает `espeak`
* *Работает LIRC*
* *Работа iOS-пульта из коробки*
* *Работа Android-пульта из коробки*

25
docs/ru/video_contest.md Normal file
View File

@@ -0,0 +1,25 @@
# Конкурс на лучшее образовательное видео по сборке и настройке
Требования:
- видео содержит весь процесс сборки и настройки конструктора Клевер 4.2: от открытия коробки с компонентами до летающего Коптера в режиме Position по ArUco-маркерам;
- видео загружено на YouTube и находится в открытом доступе;
- видео содержит озвучивание и субтитры на русском языке;
- видео длится от 6 до 60 минут.
Даты проведения конкурса: 12 февраля 13 декабря 2021.
## Призы
- 🥇 1 место: $500.
- 🥈 2 место: $300.
- 🥉 3 место: $200.
## Результаты
|Место|Участник|Ссылка на видео|
|:-:|-|-|
|1|🇷🇺 Филипп Баталин|https://www.youtube.com/watch?v=f0rpdulOSEk|
|2|🇮🇹 Sara Pettinari|https://www.youtube.com/watch?v=PxxfyVH6RRA|
|3|🇲🇾 Kai Feng Chew|https://www.youtube.com/watch?v=skgSwFle6Ms|
|3|🇰🇿 Никита Лобанов|https://www.youtube.com/watch?v=93b1epEM3SQ|

View File

@@ -63,8 +63,11 @@
{ "from": "power/", "to": "en/power.html" }, { "from": "power/", "to": "en/power.html" },
{ "from": "connection/", "to": "en/connection.html" }, { "from": "connection/", "to": "en/connection.html" },
{ "from": "clover_vm/", "to": "en/simulation_vm.html" }, { "from": "clover_vm/", "to": "en/simulation_vm.html" },
{ "from": "gpio/", "to": "en/gpio.html" },
{ "from": "ru/microsd_images.html", "to": "image.html" }, { "from": "ru/microsd_images.html", "to": "image.html" },
{ "from": "en/microsd_images.html", "to": "image.html" } { "from": "en/microsd_images.html", "to": "image.html" },
{ "from": "ru/px4_parameters.html", "to": "parameters.html" },
{ "from": "en/px4_parameters.html", "to": "parameters.html" }
] ]
} }

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<package format="2"> <package format="2">
<name>roswww_static</name> <name>roswww_static</name>
<version>0.21.1</version> <version>0.23.0</version>
<description>Static web pages for ROS packages</description> <description>Static web pages for ROS packages</description>
<maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer> <maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer>
<license>MIT</license> <license>MIT</license>