Compare commits

..

1 Commits

Author SHA1 Message Date
Oleg Kalachev
2930eb9c22 Read parameters from web (unfinished) 2021-10-06 21:18:02 +03:00
114 changed files with 616 additions and 1705 deletions

View File

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

View File

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

View File

@@ -15,4 +15,4 @@ jobs:
run: |
wget --no-verbose https://github.com/okalachev/editorconfig-checker/releases/download/1.2.1-disable-spaces-amount/ec-linux-amd64
chmod +x ec-linux-amd64
./ec-linux-amd64 -spaces-after-tabs -e "roslib.js|ros3d.js|eventemitter2.js|json-to-pretty-yaml.js|draw.cpp|BinUtils.swift|\.idea|apps/android/app|blockly/|clover_blocks/programs/|highlight/|python.js|Assets.xcassets|test_parser_pass.txt|test_node_failure.txt|aruco_pose/vendor|\.stl|\.dxf|\.dae|\.material"
./ec-linux-amd64 -spaces-after-tabs -e "roslib.js|ros3d.js|eventemitter2.js|json-to-pretty-yaml.js|draw.cpp|BinUtils.swift|\.idea|apps/android/app|blockly/|clover_blocks/programs/|highlight/|python.js|Assets.xcassets|test_parser_pass.txt|test_node_failure.txt|aruco_pose/vendor|\.stl|\.dxf|\.dae"

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>aruco_pose</name>
<version>0.23.0</version>
<version>0.21.1</version>
<description>Positioning with ArUco markers</description>
<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
Example:
rosrun aruco_pose genmap.py 0.33 2 4 1 1 0 -o test_map.txt
rosrun aruco_pose genmap.py 0.33 2 4 1 1 0 > $(catkin_find aruco_pose map)/test_map.txt
"""
from __future__ import print_function

View File

@@ -13,7 +13,7 @@
# copies or substantial portions of the Software.
#
set -ex # exit on error, echo commands
set -e # Exit immidiately on non-zero result
REPO=$1
REF=$2
@@ -90,7 +90,7 @@ echo_stamp "Installing OpenCV 4.2-compatible ROS packages"
apt install -y --no-install-recommends \
ros-${ROS_DISTRO}-compressed-image-transport=1.14.0-0buster \
ros-${ROS_DISTRO}-cv-bridge=1.15.0-0buster \
ros-${ROS_DISTRO}-cv-camera=0.5.1-0buster \
ros-${ROS_DISTRO}-cv-camera=0.5.0-0buster \
ros-${ROS_DISTRO}-image-publisher=1.15.3-0buster \
ros-${ROS_DISTRO}-web-video-server=0.2.1-0buster
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
source /opt/ros/${ROS_DISTRO}/setup.bash
# Don't build simulation plugins for actual drone
catkin_make -j2 -DCMAKE_BUILD_TYPE=RelWithDebInfo
catkin_make -j2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_BLACKLIST_PACKAGES=clover_gazebo_plugins
source devel/setup.bash
echo_stamp "Install clever package (for backwards compatibility)"

View File

@@ -137,8 +137,6 @@ pip3 --version
echo_stamp "Install and enable Butterfly (web terminal)"
echo_stamp "Workaround for tornado >= 6.0 breaking butterfly"
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 pyOpenSSL==20.0.1
my_travis_retry pip3 install tornado==5.1.1
my_travis_retry pip3 install butterfly
my_travis_retry pip3 install butterfly[systemd]

View File

@@ -58,9 +58,5 @@ rosversion rosshow
rosversion nodelet
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
[[ $(ls /home/pi/examples/*) ]]

View File

@@ -8,11 +8,8 @@
<!-- For additional help go to https://clover.coex.tech/aruco -->
<arg name="force_init" default="false"/>
<arg name="disable" default="false"/> <!-- only force init -->
<!-- aruco_detect: detect aruco markers, estimate poses -->
<node name="aruco_detect" pkg="nodelet" if="$(eval aruco_detect and not disable)" type="nodelet" args="load aruco_pose/aruco_detect main_camera_nodelet_manager" output="screen" clear_params="true" respawn="true">
<node name="aruco_detect" pkg="nodelet" if="$(arg aruco_detect)" type="nodelet" args="load aruco_pose/aruco_detect main_camera_nodelet_manager" output="screen" clear_params="true" respawn="true">
<remap from="image_raw" to="main_camera/image_raw"/>
<remap from="camera_info" to="main_camera/camera_info"/>
<remap from="map_markers" to="aruco_map/markers"/>
@@ -29,7 +26,7 @@
</node>
<!-- aruco_map: estimate aruco map pose -->
<node name="aruco_map" pkg="nodelet" type="nodelet" if="$(eval aruco_map and not disable)" args="load aruco_pose/aruco_map main_camera_nodelet_manager" output="screen" clear_params="true" respawn="true">
<node name="aruco_map" pkg="nodelet" type="nodelet" if="$(arg aruco_map)" args="load aruco_pose/aruco_map main_camera_nodelet_manager" output="screen" clear_params="true" respawn="true">
<remap from="image_raw" to="main_camera/image_raw"/>
<remap from="camera_info" to="main_camera/camera_info"/>
<remap from="markers" to="aruco_detect/markers"/>
@@ -44,11 +41,11 @@
</node>
<!-- vpe publisher from aruco markers -->
<node name="vpe_publisher" pkg="clover" type="vpe_publisher" if="$(eval aruco_vpe or force_init)" output="screen" clear_params="true">
<remap from="~pose_cov" to="aruco_map/pose" if="$(arg aruco_vpe)"/>
<node name="vpe_publisher" pkg="clover" type="vpe_publisher" if="$(arg aruco_vpe)" output="screen" clear_params="true">
<remap from="~pose_cov" to="aruco_map/pose"/>
<remap from="~vpe" to="mavros/vision_pose/pose"/>
<param name="frame_id" value="aruco_map_detected" if="$(arg aruco_vpe)"/>
<param name="force_init" value="$(arg force_init)"/>
<param name="frame_id" value="aruco_map_detected"/>
<param name="publish_zero" value="true"/>
<param name="offset_frame_id" value="aruco_map"/>
</node>
</launch>

View File

@@ -12,7 +12,6 @@
<arg name="led" default="true"/>
<arg name="blocks" default="false"/>
<arg name="rc" default="false"/>
<arg name="force_init" value="true"/> <!-- force estimator to init by publishing zero pose -->
<arg name="simulator" default="false"/> <!-- flag that we are operating on a simulated drone -->
@@ -34,10 +33,7 @@
</node>
<!-- aruco markers -->
<include file="$(find clover)/launch/aruco.launch" if="$(eval aruco or force_init)">
<arg name="force_init" value="$(arg force_init)"/>
<arg name="disable" value="$(eval not aruco)"/>
</include>
<include file="$(find clover)/launch/aruco.launch" if="$(arg aruco)"/>
<!-- optical flow -->
<node pkg="nodelet" type="nodelet" name="optical_flow" args="load clover/optical_flow main_camera_nodelet_manager" if="$(arg optical_flow)" clear_params="true" output="screen" respawn="true">
@@ -51,6 +47,9 @@
<!-- simplified offboard control -->
<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"/>
</node>

View File

@@ -1,11 +1,11 @@
# Config file for mavros
# Based on https://raw.githubusercontent.com/mavlink/mavros/master/mavros/launch/px4_config.yaml
startup_px4_usb_quirk: false
startup_px4_usb_quirk: true
conn:
heartbeat_rate: 1.0 # send heartbeat rate in Hertz
timeout: 10.0 # heartbeat timeout in seconds
heartbeat_rate: 1.0 # send hertbeat rate in Hertz
timeout: 10.0 # hertbeat timeout in seconds
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)
@@ -13,7 +13,6 @@ time:
time_ref_source: "fcu" # time_reference source
timesync_mode: MAVLINK
timesync_avg_alpha: 0.6 # timesync averaging factor
publish_sim_time: false # don't publish /clock
global_position:
frame_id: "map" # origin frame

View File

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

View File

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

View File

@@ -43,8 +43,6 @@ from mavros import mavlink
rospy.init_node('selfcheck')
os.environ['ROSCONSOLE_FORMAT']='[${severity}]: ${message}'
tf_buffer = tf2_ros.Buffer()
tf_listener = tf2_ros.TransformListener(tf_buffer)
@@ -195,27 +193,24 @@ def check_fcu():
failure('no connection to the FCU (check wiring)')
return
clover_tag = re.compile(r'-cl[oe]ver\.\d+$')
clover_fw = False
# Make sure the console is available to us
mavlink_exec('\n')
version_str = mavlink_exec('ver all')
if version_str == '':
info('no version data available from SITL')
for line in version_str.split('\n'):
if line.startswith('FW version: '):
info(line[len('FW version: '):])
elif line.startswith('FW git tag: '): # only Clover's firmware
tag = line[len('FW git tag: '):]
clover_fw = clover_tag.search(tag)
info(tag)
elif line.startswith('HW arch: '):
info(line[len('HW arch: '):])
r = re.compile(r'^FW (git tag|version): (v?\d\.\d\.\d.*)$')
is_clover_firmware = False
for ver_line in version_str.split('\n'):
match = r.search(ver_line)
if match is not None:
field, version = match.groups()
info('firmware %s: %s' % (field, version))
if 'clover' in version or 'clever' in version:
is_clover_firmware = True
if not clover_fw:
info('not Clover PX4 firmware, check https://clover.coex.tech/firmware')
if not is_clover_firmware:
failure('not running Clover PX4 firmware, https://clover.coex.tech/firmware')
est = get_param('SYS_MC_EST_GROUP')
if est == 1:
@@ -488,12 +483,6 @@ def check_local_position():
failure('roll is %.2f deg; place copter horizontally or redo level horizon calib',
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:
failure('no local position')
@@ -623,13 +612,13 @@ def check_boot_duration():
output = subprocess.check_output('systemd-analyze').decode()
r = re.compile(r'([\d\.]+)s\s*$', flags=re.MULTILINE)
duration = float(r.search(output).groups()[0])
if duration > 20:
if duration > 15:
failure('long Raspbian boot duration: %ss (systemd-analyze for analyzing)', duration)
@check('CPU usage')
def check_cpu_usage():
WHITELIST = 'nodelet', 'gzclient', 'gzserver'
WHITELIST = 'nodelet',
CMD = "top -n 1 -b -i | tail -n +8 | awk '{ printf(\"%-8s\\t%-8s\\t%-8s\\n\", $1, $9, $12); }'"
output = subprocess.check_output(CMD, shell=True).decode()
processes = output.split('\n')
@@ -657,22 +646,13 @@ def check_clover_service():
elif 'failed' in output:
failure('service failed to run, check your launch-files')
BLACKLIST = 'Unexpected command 520', 'Time jump detected', 'different index:'
r = re.compile(r'^(.*)\[(FATAL|ERROR| WARN)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$')
r = re.compile(r'^(.*)\[(FATAL|ERROR)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$')
error_count = OrderedDict()
try:
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)
if node_error:
msg = node_error.groups()[1].strip() + ': ' + node_error.groups()[2]
msg = node_error.groups()[1] + ': ' + node_error.groups()[2]
if msg in error_count:
error_count[msg] += 1
else:
@@ -773,7 +753,7 @@ def check_rpi_health():
# with some of the FLAGs OR'ed together
output = subprocess.check_output(['vcgencmd', 'get_throttled']).decode()
except OSError:
info('could not call vcgencmd binary; not a Raspberry Pi?')
failure('could not call vcgencmd binary; not a Raspberry Pi?')
return
throttle_mask = int(output.split('=')[1], base=16)

View File

@@ -181,7 +181,6 @@ inline bool waitTransform(const string& target, const string& source,
ros::spinOnce();
r.sleep();
}
return false;
}
#define TIMEOUT(msg, timeout) (msg.header.stamp.isZero() || (ros::Time::now() - msg.header.stamp > timeout))
@@ -848,7 +847,6 @@ bool land(std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
busy = false;
return true;
}
return false;
}
int main(int argc, char **argv)
@@ -873,13 +871,6 @@ int main(int argc, char **argv)
nh_priv.param<string>("body_frame", body.child_frame_id, "body");
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));
local_position_timeout = ros::Duration(nh_priv.param("local_position_timeout", 2.0));
velocity_timeout = ros::Duration(nh_priv.param("velocity_timeout", 2.0));

View File

@@ -141,11 +141,11 @@ int main(int argc, char **argv) {
vpe_pub = nh_priv.advertise<PoseStamped>("vpe", 1);
//vpe_cov_pub = nh_priv_.advertise<PoseStamped>("pose_cov_pub", 1);
if (nh_priv.param("force_init", false) || nh_priv.param("publish_zero", false)) { // publish_zero is old name
if (nh_priv.param("publish_zero", false)) {
// publish zero to initialize the local position
zero_timer = nh.createTimer(ros::Duration(0.1), &publishZero);
publish_zero_timout = ros::Duration(nh_priv.param("force_init_timeout", 5.0));
publish_zero_duration = ros::Duration(nh_priv.param("force_init_duration", 5.0));
publish_zero_timout = ros::Duration(nh_priv.param("publish_zero_timout", 5.0));
publish_zero_duration = ros::Duration(nh_priv.param("publish_zero_duration", 5.0));
local_position_sub = nh.subscribe("mavros/local_position/pose", 1, &localPositionCallback);
}

View File

@@ -12,6 +12,4 @@ SUBSYSTEM=="tty", ATTRS{idVendor}=="26ac", ATTRS{idProduct}=="0016", ATTRS{produ
SUBSYSTEM=="tty", ATTRS{idVendor}=="26ac", ATTRS{idProduct}=="0013", ATTRS{product}=="PX4 FMU v4.x PRO", SYMLINK+="px4fmu"
# Omnibus
SUBSYSTEM=="tty", ATTRS{idVendor}=="26ac", ATTRS{idProduct}=="0001", ATTRS{product}=="PX4 OmnibusF4SD", SYMLINK+="px4fmu"
# CUAV X7 Pro
SUBSYSTEM=="tty", ATTRS{idVendor}=="3163", ATTRS{idProduct}=="004c", ATTRS{product}=="PX4 CUAV X7Pro", SYMLINK+="px4fmu"

View File

@@ -1,23 +0,0 @@
<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>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="console.html">Clover console</a> (<code>/var/log/clover.log</code>)</li>
<li><a href="clover.log">Clover console</a> (<code>/var/log/clover.log</code>)</li>
</ul>
<div class="version"></div>

View File

@@ -1,16 +1,13 @@
const url = 'ws://' + location.hostname + ':9090';
const ros = new ROSLIB.Ros({ url: url });
const params = Object.fromEntries(new URLSearchParams(window.location.search).entries());
ros.on('connection', function () {
document.body.classList.add('connected');
document.body.classList.remove('closed');
init();
});
ros.on('close', function () {
document.body.classList.remove('connected');
document.body.classList.add('closed');
setTimeout(function() {
// reconnect
ros.connect(url);
@@ -40,38 +37,56 @@ function viewTopicsList() {
let rosdistro;
function viewTopic(topic) {
let index = '<a href=topics.html>Topics</a>';
title.innerHTML = `${index}: ${topic}`;
title.innerHTML = topic;
topicMessage.style.display = 'block';
ros.getTopicType(topic, function(typeStr) {
const [pack, type] = typeStr.split('/');
let href = `https://docs.ros.org/en/${rosdistro}/api/${pack}/html/msg/${type}.html`;
title.innerHTML = `${index}: ${topic} <a id="topic-type" href=${href} target="_blank">${typeStr}</a>`;
title.innerHTML = `${topic} <a id="topic-type" href=${href} target="_blank">${typeStr}</a>`;
});
new ROSLIB.Topic({ ros: ros, name: topic }).subscribe(function(msg) {
document.title = topic;
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);
});
}
function viewParameters() {
title.innerHTML = 'Parameters';
topicMessage.style.display = 'block';
let names = ['aruco_detect', 'main_camera', 'main_camera_nodelet_manager', 'mavros', 'optical_flow',
'rangefinder', 'rosapi', 'rosbridge_websocket', 'rosdistro', 'roslaunch', 'rosversion',
'roswww_static', 'run_id', 'simple_offboard', 'visualization', 'web_video_server'];
let params = {};
// ros.getParams(function(params) {
Promise.all(names.map(function(name) {
return new Promise(function(resolve, reject) {
new ROSLIB.Param({ ros, name }).get(function(value) {
params[name] = value;
resolve();
})
});
})).then(function() {
console.log(params);
topicMessage.innerHTML = yamlStringify(params);
});
}
let mouseDown;
topicMessage.addEventListener('mousedown', function() { mouseDown = true; });
topicMessage.addEventListener('mouseup', function() { mouseDown = false; });
function init() {
const params = Object.fromEntries(new URLSearchParams(window.location.search).entries());
viewParameters();
return;
if (!params.topic) {
viewTopicsList();
} else {
@@ -81,3 +96,5 @@ function init() {
});
}
}
window.ros = ros;

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,6 @@
<arg name="est" default="ekf2"/> <!-- PX4 estimator: lpe, ekf2 -->
<arg name="vehicle" default="clover"/> <!-- PX4 vehicle configuration: clover, clover_vpe -->
<arg name="main_camera" default="true"/> <!-- Simulated vision position estimation camera (optical flow, ArUco) -->
<arg name="maintain_camera_rate" default="false"/> <!-- Slow simulation down to maintain camera rate -->
<arg name="rangefinder" default="true"/> <!-- Simulated downward-facing rangefinder, vl53l1x-like -->
<arg name="led" default="true"/> <!-- Simulated LED strip, ws281x-like -->
<arg name="gps" default="false"/> <!--Simulated GPS module -->
@@ -29,7 +28,6 @@
<!-- Clover model -->
<include file="$(find clover_description)/launch/spawn_drone.launch" if="$(eval type == 'gazebo')">
<arg name="main_camera" value="$(arg main_camera)"/>
<arg name="maintain_camera_rate" value="$(arg maintain_camera_rate)"/>
<arg name="rangefinder" value="$(arg rangefinder)"/>
<arg name="led" value="$(arg led)"/>
<arg name="gps" value="$(arg gps)"/>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0"?>
<sdf version="1.5">
<model name="aruco_100">
<static>true</static>
<link name="marker_100_link">
<pose>0 0 1e-3 0 0 1.5707963267948966</pose>
<visual name="visual_marker_100">
<cast_shadows>false</cast_shadows>
<geometry>
<box>
<size>0.22 0.22 1e-3</size>
</box>
</geometry>
<material>
<script>
<uri>model://aruco_100/materials/scripts</uri>
<uri>model://aruco_100/materials/textures</uri>
<name>aruco/marker_100</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>

View File

@@ -1,15 +0,0 @@
material aruco/marker_100
{
technique
{
pass
{
texture_unit
{
texture aruco_marker_100.png
filtering none
scale 1.0 1.0
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

View File

@@ -1,13 +0,0 @@
<?xml version="1.0"?>
<model>
<name>ArUco Marker 100</name>
<version>1.0</version>
<sdf version="1.5">marker_100.sdf</sdf>
<author>
<name>Marker Generator script</name>
<email>marker@generator.sh</email>
</author>
<description>
ArUco marker #100
</description>
</model>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0"?>
<sdf version="1.5">
<model name="aruco_101">
<static>true</static>
<link name="marker_101_link">
<pose>0 0 1e-3 0 0 1.5707963267948966</pose>
<visual name="visual_marker_101">
<cast_shadows>false</cast_shadows>
<geometry>
<box>
<size>0.44 0.44 1e-3</size>
</box>
</geometry>
<material>
<script>
<uri>model://aruco_101/materials/scripts</uri>
<uri>model://aruco_101/materials/textures</uri>
<name>aruco/marker_101</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>

View File

@@ -1,15 +0,0 @@
material aruco/marker_101
{
technique
{
pass
{
texture_unit
{
texture aruco_marker_101.png
filtering none
scale 1.0 1.0
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

View File

@@ -1,13 +0,0 @@
<?xml version="1.0"?>
<model>
<name>ArUco Marker 101</name>
<version>1.0</version>
<sdf version="1.5">marker_101.sdf</sdf>
<author>
<name>Marker Generator script</name>
<email>marker@generator.sh</email>
</author>
<description>
ArUco marker #101
</description>
</model>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0"?>
<sdf version="1.5">
<model name="aruco_102">
<static>true</static>
<link name="marker_102_link">
<pose>0 0 1e-3 0 0 1.5707963267948966</pose>
<visual name="visual_marker_102">
<cast_shadows>false</cast_shadows>
<geometry>
<box>
<size>0.44 0.44 1e-3</size>
</box>
</geometry>
<material>
<script>
<uri>model://aruco_102/materials/scripts</uri>
<uri>model://aruco_102/materials/textures</uri>
<name>aruco/marker_102</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>

View File

@@ -1,15 +0,0 @@
material aruco/marker_102
{
technique
{
pass
{
texture_unit
{
texture aruco_marker_102.png
filtering none
scale 1.0 1.0
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

View File

@@ -1,13 +0,0 @@
<?xml version="1.0"?>
<model>
<name>ArUco Marker 102</name>
<version>1.0</version>
<sdf version="1.5">marker_102.sdf</sdf>
<author>
<name>Marker Generator script</name>
<email>marker@generator.sh</email>
</author>
<description>
ArUco marker #102
</description>
</model>

View File

@@ -6,11 +6,11 @@
<pose>0 0 0 0 0 0</pose>
<sensor name='camera' type='camera'>
<camera>
<horizontal_fov>1.8</horizontal_fov>
<horizontal_fov>2.0944</horizontal_fov>
<image>
<format>B8G8R8</format>
<width>640</width>
<height>480</height>
<width>800</width>
<height>600</height>
</image>
<clip>
<near>0.02</near>
@@ -18,7 +18,7 @@
</clip>
</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<update_rate>20</update_rate>
<visualize>1</visualize>
<plugin name='camera_plugin' filename='libgazebo_ros_camera.so'>
<alwaysOn>1</alwaysOn>

View File

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

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env bash
# script for running gzweb
# usage: ./gzweb [<port>]
export NVM_DIR=$HOME/.nvm
source $NVM_DIR/nvm.sh
npm start --prefix $HOME/gzweb -p ${1-8080}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 695 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

BIN
docs/assets/qgc-params.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 KiB

View File

@@ -1,183 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg2"
version="1.1"
viewBox="0 0 385.99219 102.04687"
height="102.04688pt"
width="385.99219pt"
sodipodi:docname="Ros_logo.svg"
inkscape:export-filename="/home/mguenther/Downloads/ros-press-kit/1280px-Ros_logo.svg.png"
inkscape:export-xdpi="238.75999"
inkscape:export-ydpi="238.75999"
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1391"
id="namedview33"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="3.1550388"
inkscape:cx="232.61011"
inkscape:cy="102.64938"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<metadata
id="metadata58">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs4">
<clipPath
id="clip1">
<path
id="path7"
d="M 0.0585938,2 H 22 V 25 H 0.0585938 Z m 0,0"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
id="clip2">
<path
id="path10"
d="M 0.0585938,40 H 22 V 64 H 0.0585938 Z m 0,0"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
id="clip3">
<path
id="path13"
d="M 0.0585938,79 H 22 v 23 H 0.0585938 Z m 0,0"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
id="clip4">
<path
id="path16"
d="m 220,0.894531 h 82 V 102.94141 h -82 z m 0,0"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
id="clip5">
<path
id="path19"
d="m 316,0.894531 h 70.05078 V 102.94141 H 316 Z m 0,0"
inkscape:connector-curvature="0" />
</clipPath>
</defs>
<g
id="surface839"
transform="translate(-0.0585938,-0.894531)">
<g
id="g22"
clip-path="url(#clip1)"
style="clip-rule:nonzero">
<path
id="path24"
d="m 21.839844,13.492188 c 0,6.230468 -4.890625,11.285156 -10.917969,11.285156 C 4.890625,24.777344 0,19.722656 0,13.492188 0,7.257812 4.890625,2.207031 10.921875,2.207031 c 6.027344,0 10.917969,5.050781 10.917969,11.285157"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
</g>
<g
id="g26"
clip-path="url(#clip2)"
style="clip-rule:nonzero">
<path
id="path28"
d="m 21.839844,51.949219 c 0,6.230469 -4.890625,11.285156 -10.917969,11.285156 C 4.890625,63.234375 0,58.179688 0,51.949219 0,45.714844 4.890625,40.664062 10.921875,40.664062 c 6.027344,0 10.917969,5.050782 10.917969,11.285157"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
</g>
<g
id="g30"
clip-path="url(#clip3)"
style="clip-rule:nonzero">
<path
id="path32"
d="m 21.839844,90.40625 c 0,6.230469 -4.890625,11.28516 -10.917969,11.28516 C 4.890625,101.69141 0,96.636719 0,90.40625 0,84.175781 4.890625,79.121094 10.921875,79.121094 c 6.027344,0 10.917969,5.054687 10.917969,11.285156"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
</g>
<path
id="path34"
d="m 59.945312,51.949219 c 0,6.230469 -4.886718,11.285156 -10.917968,11.285156 -6.03125,0 -10.921875,-5.054687 -10.921875,-11.285156 0,-6.234375 4.890625,-11.285157 10.921875,-11.285157 6.03125,0 10.917968,5.050782 10.917968,11.285157"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path36"
d="m 59.945312,13.492188 c 0,6.230468 -4.886718,11.285156 -10.917968,11.285156 -6.03125,0 -10.921875,-5.054688 -10.921875,-11.285156 0,-6.234376 4.890625,-11.285157 10.921875,-11.285157 6.03125,0 10.917968,5.050781 10.917968,11.285157"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path38"
d="m 98.054688,51.949219 c 0,6.230469 -4.890626,11.285156 -10.921876,11.285156 -6.03125,0 -10.917968,-5.054687 -10.917968,-11.285156 0,-6.234375 4.886718,-11.285157 10.917968,-11.285157 6.03125,0 10.921876,5.050782 10.921876,11.285157"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path40"
d="m 98.054688,13.492188 c 0,6.230468 -4.890626,11.285156 -10.921876,11.285156 -6.03125,0 -10.917968,-5.054688 -10.917968,-11.285156 0,-6.234376 4.886718,-11.285157 10.917968,-11.285157 6.03125,0 10.921876,5.050781 10.921876,11.285157"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path42"
d="m 98.054688,90.40625 c 0,6.230469 -4.890626,11.28516 -10.921876,11.28516 -6.03125,0 -10.917968,-5.054691 -10.917968,-11.28516 0,-6.230469 4.886718,-11.285156 10.917968,-11.285156 6.03125,0 10.921876,5.054687 10.921876,11.285156"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path44"
d="m 59.945312,90.40625 c 0,6.230469 -4.886718,11.28516 -10.917968,11.28516 -6.03125,0 -10.921875,-5.054691 -10.921875,-11.28516 0,-6.230469 4.890625,-11.285156 10.921875,-11.285156 6.03125,0 10.917968,5.054687 10.917968,11.285156"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path46"
d="m 171.61328,16.453125 h -27.91797 v 31.816406 h 27.91797 c 9.57813,0 16.28125,-5.089843 16.28125,-15.835937 0,-10.324219 -6.56641,-15.980469 -16.28125,-15.980469 z M 181.32812,61 200.89453,101.44531 H 184.33984 L 165.31641,62.273438 h -21.6211 V 101.44531 H 129.60156 V 2.449219 h 42.01172 c 16.69531,0 30.78906,9.195312 30.78906,29.558593 0,15.839844 -8.07422,25.597657 -21.07422,28.992188"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
<g
id="g48"
clip-path="url(#clip4)"
style="clip-rule:nonzero">
<path
id="path50"
d="m 260.5625,15.746094 c -16.69531,0 -25.86328,14 -25.86328,36.203125 0,22.203125 9.16797,36.203125 25.86328,36.203125 16.83203,0 26,-14 26,-36.203125 0,-22.203125 -9.16797,-36.203125 -26,-36.203125 z m 0,87.253906 c -24.76563,0 -40.50391,-21.070312 -40.50391,-51.050781 0,-29.980469 15.73828,-51.054688 40.50391,-51.054688 24.90625,0 40.64062,21.074219 40.64062,51.054688 C 301.20312,81.929688 285.46875,103 260.5625,103"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
</g>
<g
id="g52"
clip-path="url(#clip5)"
style="clip-rule:nonzero">
<path
id="path54"
d="m 350.60937,103 c -13.96093,0 -26,-6.222656 -34.07421,-15.980469 l 10.26171,-10.324219 c 6.4336,7.214844 15.875,11.738282 24.90625,11.738282 13.41016,0 19.83985,-4.808594 19.83985,-14.425782 0,-7.636718 -5.60938,-11.453124 -21.6211,-16.402343 -20.25,-6.222657 -29.96484,-11.457031 -29.96484,-29.132813 0,-17.113281 13.95703,-27.578125 31.60938,-27.578125 13,0 22.85156,4.953125 31.33593,13.4375 l -10.125,10.605469 c -6.02343,-6.363281 -12.86328,-9.476562 -22.30468,-9.476562 -11.22266,0 -16.01172,5.65625 -16.01172,12.304687 0,6.929687 4.3789,10.324219 20.9375,15.414063 18.88281,5.941406 30.65234,12.164062 30.65234,29.839843 C 386.05078,90.839844 375.10156,103 350.60937,103"
style="fill:#212e4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

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

View File

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

View File

@@ -1,5 +1,7 @@
# 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.
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
In order to enable vision position estimation you should use the following [PX4 parameters](parameters.md).
In order to enable vision position estimation you should use the following [PX4 parameters](px4_parameters.md).
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
---
Main documentation: https://wiki.archlinux.org/title/Systemd.
Main documentation: [https://wiki.archlinux.org/index.php/Systemd_(Russian)](https://wiki.archlinux.org/index.php/Systemd_(Russian)).
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:
```bash
```(bash)
chmod +x my_program.py
```
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:
When scripting languages are used, [shebang] should be placed at the beginning of the file (https://ru.wikipedia.org/wiki/Shebang_(Unix)), for example:
```bash
#!/usr/bin/env python3
```(bash)
#!/usr/bin/env python
```

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.
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/master/en/config/compass.html.
Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/compass.html.
## Gyroscope
@@ -27,7 +27,7 @@ Read more in the PX4 docs: https://docs.px4.io/master/en/config/compass.html.
> **Warning** The drone should stay completely still during the calibration.
Read more in the PX4 docs: https://docs.px4.io/master/en/config/gyroscope.html.
Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/gyroscope.html.
## Accelerometer
@@ -38,7 +38,7 @@ Read more in the PX4 docs: https://docs.px4.io/master/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.
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/master/en/config/accelerometer.html.
Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/accelerometer.html.
## Level horizon
@@ -50,6 +50,6 @@ Read more in the PX4 docs: https://docs.px4.io/master/en/config/accelerometer.ht
4. Press *OK*.
5. Wait for the calibration to finish.
Read more in the PX4 docs: https://docs.px4.io/master/en/config/level_horizon_calibration.html.
Read more in the PX4 docs: https://docs.px4.io/v1.9.0/en/config/level_horizon_calibration.html.
**Next**: [RC setup](radio.md).

View File

@@ -1,6 +1,6 @@
# COEX Pix
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.
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.
> **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
> **Hint** You need to set the `CBRK_USB_CHK` [parameter](parameters.md) to 197848 for the USB connection to work.
> **Hint** You need to set the `CBRK_USB_CHK` [parameter](px4_parameters.md) to 197848 for the USB connection to work.
## UART connection

View File

@@ -8,39 +8,6 @@ You can see the articles of the CopterHack 2021 finalist teams by the link [Copt
The proposed projects have to be open-source and be compatible with the Clover quadcopter platform. Teams will work on their projects throughout the competition, bringing them closer to the state of the finished product. Industry experts will assist the participants through lectures and regular feedback.
## Projects of the contest's participants {#participants}
|Place|Team|Project|Points|
|:-:|-|-|-|
||🇰🇬 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/advanced_clover_simulator.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)||
||🇷🇺 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)||
||🇧🇷 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)||
||🇷🇺 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)||
||🇷🇺 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)||
||🇩🇪 Inondro|[Inondro Pix](https://github.com/Inondro/clover/blob/inondro-pix/docs/en/inondro_copterhack22_pix.md)||
||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)||
||🇷🇺 SPECTRE|[SPECTRE](https://github.com/alakhmenev/clover/blob/spectre_team/docs/ru/spectre_team.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)||
||🇷🇺 С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
Teams are welcome to dive into the development of the following company cases:
@@ -107,38 +74,40 @@ Prepare your application and send it as a Draft Pull Request to [Clover reposito
4. Fill out your application by the recommended template:
```markdown
# Project name
[CopterHack-2022](copterhack2022.md), team **Team name**.
## Team information
The list of team members:
(Describe the team: full name, contacts (e-mail/Telegram username), role in the team).
* Alexander Sokolov, @aleksandrsokolov111, engineer.
* Elena Smirnova, @elenasmirnova111, programmer.
## Project description
### Project idea
Briefly describe the idea and stage of the project.
### The potential outcomes
Describe how you see the project result.
### Using Clover platform
Describe how the Clover platform will be used in your project.
### Additional information at the request of participants
For example, information about the team's experience working on projects, attach a link to articles, videos.
```
```markdown
# Project name
[CopterHack-2022](copterhack2022.md), team **Team name**.
## Team information
The list of team members:
(Describe the team: full name, contacts (e-mail/Telegram username), role in the team).
* Alexander Sokolov, @aleksandrsokolov111, engineer.
* Elena Smirnova, @elenasmirnova111, programmer.
## Project description
### Project idea
Briefly describe the idea and stage of the project.
### The potential outcomes
Describe how you see the project result.
### Using Clover platform
Describe how the Clover platform will be used in your project.
### Additional information at the request of participants
For example, information about the team's experience working on projects, attach a link to articles, videos.
```
<!-- markdownlint-disable MD029 -->
5. Go to the bottom of the page and create a new branch with the title of your article:
@@ -154,9 +123,7 @@ Prepare your application and send it as a Draft Pull Request to [Clover reposito
8. In the Pull Request comments, you will be given feedback on the application. On the contest page, in the section "Projects of the contest participants", a link to your application in your fork will be published.
9. Note the *Checks* block at the bottom, a check mark should appear in the *Documentation* field. If a cross appeared, click *Details* link to see the list of issues in you article found by markdownlint. If you need to change added files, edit them in you branch changes will appear in the Pull Request automatically. **Do not open a new Pull Request for the same application**.
10. During the contest, you will work on this document, bringing it closer to the state of the finished article. By the end of the contest, you will publish your article, which will be the result of your work in CopterHack 2022.
9. During the contest, you will work on this document, bringing it closer to the state of the finished article. By the end of the contest, you will publish your article, which will be the result of your work in CopterHack 2022.
As soon as the link to the application is added to this page in the section "Projects of the contest's participants", your team has become an official participant of the CopterHack 2022!
@@ -164,6 +131,10 @@ Contest participants will be added to the special Telegram group, where one can
> **Info** There are no restrictions on the age, education, and number of people in the team.
## Projects of the contest's participants
Applications will be published as they will become available.
---
For all questions: [CopterHack 2022](https://t.me/CopterHack).

View File

@@ -95,4 +95,4 @@ We pick the web interface to control the copter because it is easier for the use
Project was created with financial support of International Ala-Too University.
![Ala-Too University](../assets/seeding_drone/ala-too.png)
![Ala-Too University](https://my.alatoo.edu.kg/images/logo_text.png)

View File

@@ -1,118 +0,0 @@
# 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:
1. In QGroundControl software, go to the *Vehicle Setup* panel and choose the *Safety* menu.
1. Open the *Safety* panel.
2. Select one of the following actions in the *RC Loss Failsafe Trigger* option:
* *Land mode* transition to automatic land mode;
* *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 2 s.
3. Set the timeout value before RC Loss triggers in the *RC Loss Timeout* field. We recommend setting it to 0.5 s.
<img src="../assets/qgc-failsafe.png" alt="QGroundControl failsafe" class="zoom">

View File

@@ -1,6 +1,6 @@
# Flight
> **Info** See also official PX4 flying guide: https://docs.px4.io/master/en/flying/.
> **Info** See also official PX4 flying guide: https://docs.px4.io/v1.9.0/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.

View File

@@ -9,8 +9,7 @@ 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;
* `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);
* `setpoint` is current position setpoint;
* `main_camera_optical` is the coordinate system, [linked to the main camera](camera_setup.md#frame);
* `setpoint` is current position setpoint.
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.
PX4 should be properly [configured](parameters.md) to use the rangefinder data.
PX4 should be properly [configured](px4_parameters.md) to use the rangefinder data.
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);
* `COMMAND_LONG` a command to the quadcopter (take off, land, toggle modes, etc).
A complete list of MAVLink messages is available in [MAVLink documentation](https://mavlink.io/en/messages/common.html).
A complete list of MAVLink messages is available in [MAVLink documentation] (http://mavlink.org/messages/common).
### System, system component

View File

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

View File

@@ -1,10 +1,12 @@
# Use of Optical Flow
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.
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.
## Enabling
> **Hint** For Optical Flow to work it's required that the laser rangefinder is [connected and configured](laser.md).
> **Hint** It is recommended to use [special PX4 firmware for Clover](firmware.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`:
@@ -12,7 +14,7 @@ Enable Optical Flow in the file `~/catkin_ws/src/clover/clover/launch/clover.lau
<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.

View File

@@ -1,112 +0,0 @@
# PX4 Parameters
Full documentation on PX4 parameters: https://docs.px4.io/master/en/advanced_config/parameter_reference.html.
For changing PX4 parameters, use QGroundControl software, [connect to Clover over Wi-Fi](gcs_bridge.md) or USB. Go to *Vehicle Setup* panel (click on the QGroundControl logo in the top-left corner) and choose *Parameters* menu.
## Recommended values
### Common parameters
|Parameter|Value|Comment|
|-|-|-|
|`SENS_FLOW_ROT`|0 (*No rotation*)|If using *PX4Flow* hardware, keep the default value|
|`SENS_FLOW_MINHGT`|0.01|For [VL53L1X](laser.md) rangefinder|
|`SENS_FLOW_MAXHGT`|4.0|For [VL53L1X](laser.md) rangefinder|
|`SENS_FLOW_MAXR`|10.0||
|`SYS_HAS_MAG`|0|If impossible to run the magnetometer (*No mags found* error)|
### Estimator subsystem parameters
In case of using LPE ([COEX patched firmware](firmware.md)):
|Parameter|Value|Comment|
|-|-|-|
|`LPE_FUSION`|86|Checkboxes: *flow* + *vis* + *land Detector* + *gyro comp*. If flying over horizontal floor *pub agl as lpos down* checkbox is allowed.<br>Details: [Optical Flow](optical_flow.md), [ArUco markers](aruco_map.md), [GPS](gps.md).|
|`LPE_VIS_DELAY`|0.0||
|`LPE_VIS_Z`|0.1||
|`LPE_FLW_SCALE`|1.0||
|`LPE_FLW_R`|0.2||
|`LPE_FLW_RR`|0.0||
|`LPE_FLW_QMIN`|10||
|`ATT_W_EXT_HDG`|0.5|Enabling usage of external yaw angle (when navigating using [markers map](aruco_map.md))|
|`ATT_EXT_HDG_M`|1 (*Vision*)||
|`ATT_W_MAG`|0|Disabling usage of the magnetometer (when navigating indoor)|
In case of using EKF2 (official firmware):
<!-- markdownlint-disable MD044 -->
|Parameter|Value|Comment|
|-|-|-|
|`EKF2_AID_MASK`|27|Checkboxes: (optionally) *gps* + *flow* + *vision position* + *vision yaw*.<br>Details: [Optical Flow](optical_flow.md), [ArUco markers](aruco_map.md), [GPS](gps.md).|
|`EKF2_OF_DELAY`|0||
|`EKF2_OF_QMIN`|10||
|`EKF2_OF_N_MIN`|0.05||
|`EKF2_OF_N_MAX`|0.2||
|`EKF2_HGT_MODE`|2 (*Range sensor*)|If the [rangefinder](laser.md) is present and flying over horizontal floor|
|`EKF2_EVA_NOISE`|0.1||
|`EKF2_EVP_NOISE`|0.1||
|`EKF2_EV_DELAY`|0||
|`EKF2_MAG_TYPE`|5 (*None*)|Disabling usage of the magnetometer (when navigating indoor)|
<!-- markdownlint-enable MD031 -->
> **Info** See also: list of default parameters of the [Clover simulator](simulation.md): https://github.com/CopterExpress/clover/blob/master/clover_simulation/airframes/4500_clover.
## Additional information
The `SYS_MC_EST_GROUP` parameter defines the estimator subsystem to use.
Estimator subsystem is a group of modules that calculates the current state of the copter using readings from the sensors. The copter state includes:
* Angle rate of the copter pitch_rate, roll_rate, yaw_rate;
* Copter orientation (in the local coordinate system) pitch, roll, yaw (one of presentations);
* Copter position (in the local coordinate system) x, y, z;
* Copter speed (in the local coordinate system) vx, vy, vz;
* Global coordinates of the copter latitude, longitude, altitude;
* Altitude above the surface;
* Other parameters (the drift of gyroscopes, wind speed, etc.).
`SYS_AUTOCONFIG` — resets all parameters (sets to 1).
## EKF2
`EKF2_AID_MASK` — selects sensors that are used by EKF2 to calculate the copter state.
`EKF2_HGT_MODE` is the main source of height data (z in the local coordinate system):
* 0 pressure reading on the barometer.
* 1 GPS.
* 2 distance meter (for example, vl53l1x).
* 3 data from VPE.
Variant 2 is the most accurate; however, it is correct to use it only if the surface the copter flies over is flat. Otherwise, the Z axis origin will move up and down with the altitude of the surface.
## Multicopter Position Control
These parameters adjust the flight of the copter by position (POSCTL, OFFBOARD, AUTO modes).
`MPC_THR_HOVER` — hovering throttle. This option is to set to the approximate percentage of throttle needed to make the copter maintain its altitude. If copter has a tendency to gain or lose altitude during the hovering mode, reduce or increase this value.
`MPC_XY_P` position factor *P* of the ESC. This parameter affects how sharply the copter will react to the position commands. A too high value may cause overshoots.
`MPC_XY_VEL_P` speed factor *P* of the ESC. This parameter also affects the accuracy and sharpness of copter execution of the given position. A too high value may cause overshoots.
`MPC_XY_VEL_MAX` — the maximum horizontal speed in POSCTL, OFFBOARD, AUTO modes.
`MPC_Z_P`, `MPC_Z_VEL_P` vertical position and speed factors *P* of the ESCs they determine the copter's ability to maintain the desired altitude.
`MPC_LAND_SPEED` is the vertical velocity of landing in the LAND mode.
## LPE + Q attitude estimator
These parameters configure the behavior of the `lpe` and `q` modules, which compute the state (orientation, position) of the copter. These parameters apply **only** if the `SYS_MC_EST_GROUP` parameter is set to `1` (local_position_estimator, attitude_estimator_q).
## Commander
Prearm checks, switching the modes and states of the copter.
## Sensors
Enabling, disabling and configuring various sensors.

View File

@@ -6,16 +6,15 @@ 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.
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).
3. Calculate the voltage divider:
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. Set the *Number of cells* parameter according to the number of cells in your battery (*3* for the Clover 4 drone).
2. Calculate the voltage divider:
* Measure voltage across the battery (you may use a battery voltage tester for that).
* Press the *Calculate* button next to the *Voltage divider* label.
* Put the battery voltage into the prompt and click *Calculate*.
* 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">
Further reading: https://docs.qgroundcontrol.com/en/SetupView/Power.html.
@@ -31,6 +30,6 @@ Further reading: https://docs.qgroundcontrol.com/en/SetupView/Power.html.
<img src="../assets/qgc-power.png" class="zoom">
Further reading: https://docs.px4.io/master/en/advanced_config/esc_calibration.html.
Further reading: https://docs.px4.io/v1.9.0/en/advanced_config/esc_calibration.html.
**Next**: [Failsafe configuration](failsafe.md)

View File

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

72
docs/en/px4_parameters.md Normal file
View File

@@ -0,0 +1,72 @@
# PX4 Parameters
Main article: https://dev.px4.io/en/advanced/parameter_reference.html
> **Note** This is a description some of the most important PX4 parameters as of version 1.8.0. The full list is available at the link above.
To change PX4 parameters, you can use the QGroundControl application [by connecting to Clover via Wi-Fi](gcs_bridge.md):
![PX4 parameters in QGroundControl](../assets/qgc-params.png)
## Main parameters
The most important parameters are listed in this paragraph.
`SYS_MC_EST_GROUP` select the estimator module.
This is a group of modules that calculates the current state of the copter using readings from the sensors. The copter state includes:
* Angle rate of the copter pitch_rate, roll_rate, yaw_rate;
* Copter orientation (in the local coordinate system) pitch, roll, yaw (one of presentations);
* Copter position (in the local coordinate system) x, y, z;
* Copter speed (in the local coordinate system) vx, vy, vz;
* Global coordinates of the copter latitude, longitude, altitude;
* Altitude above the surface;
* Other parameters (the drift of gyroscopes, wind speed, etc.).
`SYS_AUTOCONFIG` — resets all parameters (sets to 1).
## EKF2
`EKF2_AID_MASK` — selects sensors that are used by EKF2 to calculate the copter state.
`EKF2_HGT_MODE` is the main source of height data (z in the local coordinate system):
* 0 pressure reading on the barometer.
* 1 GPS.
* 2 distance meter (for example, vl53l1x).
* 3 data from VPE.
Variant 2 is the most accurate; however, it is correct to use it only if the surface the copter flies over is flat. Otherwise, the Z axis origin will move up and down with the altitude of the surface.
## Multicopter Position Control
These parameters adjust the flight of the copter by position (POSCTL, OFFBOARD, AUTO modes).
`MPC_THR_HOVER` — hovering throttle. This option is to set to the approximate percentage of throttle needed to make the copter maintain its altitude. If copter has a tendency to gain or lose altitude during the hovering mode, reduce or increase this value.
`MPC_XY_P` position factor *P* of the ESC. This parameter affects how sharply the copter will react to the position commands. A too high value may cause overshoots.
`MPC_XY_VEL_P` speed factor *P* of the ESC. This parameter also affects the accuracy and sharpness of copter execution of the given position. A too high value may cause overshoots.
`MPC_XY_VEL_MAX` — the maximum horizontal speed in POSCTL, OFFBOARD, AUTO modes.
`MPC_Z_P`, `MPC_Z_VEL_P` vertical position and speed factors *P* of the ESCs they determine the copter's ability to maintain the desired altitude.
`MPC_LAND_SPEED` is the vertical velocity of landing in the LAND mode.
## LPE + Q attitude estimator
These parameters configure the behavior of the `lpe` and `q` modules, which compute the state (orientation, position) of the copter. These parameters apply **only** if the `SYS_MC_EST_GROUP` parameter is set to `1` (local_position_estimator, attitude_estimator_q)
TODO
## Commander
Prearm checks, switching the modes and states of the copter.
## Sensors
Enabling, disabling and configuring various sensors.
TODO

View File

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

View File

@@ -1,7 +1,7 @@
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. A Raspberry Pi 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. Raspberry Pi 3 is included in the kits for programmable quadcopters "Clover".
<img src="../assets/raspberry.png" class="center zoom" alt="Raspberry Pi 3" width="400">

View File

@@ -1,28 +1,33 @@
# ROS
ROS
===
<img src="../assets/ros.svg" width="200" align="right">
Main article: http://wiki.ros.org
Main documentation: https://wiki.ros.org.
ROS is a widely used framework for developing complex and distributed robotic systems.
**ROS** is a widely used framework for developing complex and distributed robotic systems. The [Clover autonomous flights platform](programming.md) is based on ROS.
Installation
---
## Installation
Main article: http://wiki.ros.org/melodic/Installation/Ubuntu
ROS is already installed on [the RPi image](image.md).
To install ROS on your PC you may address the [official installation documentation](https://wiki.ros.org/noetic/Installation/Ubuntu). For a quick start it's recommended to use [the virtual machine image with ROS and Clover simulator](simulation_vm.md).
To use ROS on a PC, we recommend using Ubuntu Linux (or a virtual machine such as Parallels Desktop Lite](https://itunes.apple.com/ru/app/parallels-desktop-lite/id1085114709?mt=12) or [VirtualBox](https://www.virtualbox.org)).
## Concepts
> **Note** For ROS Melodic distribution, we recommend using Ubuntu 18.04.
Concepts
---
### Nodes
Main article: https://wiki.ros.org/Nodes.
Main article: http://wiki.ros.org/Nodes
ROS node is a special program (usually written in Python or C++) that communicates with other nodes via ROS topics and ROS services. Dividing complex robotic systems into isolated nodes provides certain advantages: reduced coupling of the code, increased reusability and reliability.
ROS node is a special program (usually written in Python or C++) that communicates with other nodes via ROS topics and ROS services. Dividing complex robotic systems into isolated nodes provides certain advantages: reduced coupling of the code, increases re-usability and reliability.
Many robotic libraries and drivers are made as ROS nodes.
Many robotic libraries and the drivers are executed in the form of ROS-nodes.
In order to turn an ordinary program into a ROS node, include the `rospy` (Python) or `roscpp` (C++) library, and insert the initialization code.
In order to turn an ordinary program into a ROS node, include a `rospy` or `roscpp` library, and insert the initialization code.
An example of a ROS node in Python:
@@ -31,52 +36,32 @@ import rospy
rospy.init_node('my_ros_node') # the name of the ROS node
rospy.spin() # entering an infinite loop...
rospy.spin() # entering an endless cycle...
```
> **Info** Any [autonomous flight script](programming.md) for Clover is a ROS node.
### Topics
Main article: https://wiki.ros.org/Topics
Main article: http://wiki.ros.org/Topics
A topic is a named data bus used by the nodes for exchanging messages. Any node can *publish* a message to any topic, and *subscribe* to any topic.
A topic is a named data bus used by the nodes for exchanging messages. Any node can *post* a message in a random topic, and *subscribe* to an arbitrary topic.
Для каждого созданного топика должен быть задан тип сообщений, которые по нему передаются. ROS включает в себя большое количество стандартных типов сообщений, покрывающих различные аспекты робототехники, но при необходимости возможно создание собственных типов сообщений. Примеры стандартных типов сообщений:
Each topic has the a of messages it passes. ROS include a lot of standard message types, covering different aspects of robotics. Creating custom message types is also possible. Example of standard message types:
|Message type|Description|
|-|-|
|[`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/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/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.|
|[`sensor_msgs/Image`](https://docs.ros.org/api/sensor_msgs/html/msg/Image.html)|Image (see the [article on working with the camera](camera.md)).|
> **Info** See the rest of standard message types in packages: [`common_msgs`](http://wiki.ros.org/common_msgs), [`std_msgs`](https://wiki.ros.org/std_msgs), [`geometry_msgs`](https://wiki.ros.org/geometry_msgs), [`sensor_msgs`](https://wiki.ros.org/sensor_msgs), and others.
Example of publishing a message of type [`String`]((https://docs.ros.org/api/std_msgs/html/msg/String.html)) in a topic `/foo` in Python:
An example of [`std_msgs/String`](http://docs.ros.org/api/std_msgs/html/msg/String.html) (line) message type posting in topic `/foo` in Python:
```python
from std_msgs.msg import String
rospy.init_node('my_ros_node')
# ...
foo_pub = rospy.Publisher('/foo', String, queue_size=1) # creating a Publisher
foo_pub.publish(data='Hello, world!') # publishing the message
# ...
foo_pub.publish(data='Hello, world!') # posting the message
```
Example of subscription to a topic `/foo`:
An example of subscription to topic `/foo`:
```python
import rospy
from std_msgs.msg import String
rospy.init_node('my_ros_node')
def foo_callback(msg):
print(msg.data)
@@ -84,101 +69,42 @@ def foo_callback(msg):
rospy.Subscriber('/foo', String, foo_callback)
```
You can read a topic message once, using `wait_for_message` function:
There is also an opportunity to work with the topics using the `rostopic` utility. For example, using the following command, one can view messages published in topic `/variety of the Aegean sea/state`:
```python
msg = rospy.wait_for_message('/foo', String, timeout=3) # wait for a message in /foo topic with timeout of 3 seconds
```
You can also work with topics using the `rostopic` utility. For example, using the following command, you can view messages published in topic `/mavros/state`:
```bash
```(bash)
rostopic echo /mavros/state
```
The `rostopic info` command shows the type of messages in the topic, and `rostopic hz` shows frequency of published messages.
Also you can monitor and visualize topics using [graphical tools of ROS](rviz.md).
### Services
Main article: https://wiki.ros.org/Services
Main article: http://wiki.ros.org/Services
A service can be assimilated to the a function that can be called from one node, and processed in another one. The service has a name that is similar to the name of the topic, and 2 message types: request type and response type.
Thus, ROS services implement [remote procedure call (RPC)](https://en.wikipedia.org/wiki/Remote_procedure_call) pattern.
Example of invoking a ROS service in Python:
An example ROS service invoking from Python:
```python
import rospy
from clover.srv import GetTelemetry
rospy.init_node('my_ros_node')
# ...
# Creating a wrapper for the get_telemetry service of the clover package with the GetTelemetry type:
get_telemetry = rospy.ServiceProxy('get_telemetry', srv.GetTelemetry)
# Invoking the service, and getting the quadcopter telemetry:
# Invoking the service, and receiving the quadcopter telemetry:
telemetry = get_telemetry()
```
You can also work with the services using the `rosservice` utility. For instance, you can call service `/get_telemetry` from the command line:
```bash
```(bash)
rosservice call /get_telemetry "{frame_id: ''}"
```
More examples of using the services for Clover quadcopter autonomous flights are available in the [documentation for node simple_offboard](simple_offboard.md).
### Names
Main article: https://wiki.ros.org/Names.
Any topic, service or a parameter is identified with a unique name. A ROS name is hierarchical structure with a `/` symbol as a separator (which is close to a file name in a file system).
Examples of ROS names:
* `/` (global namespace)
* `/foo`
* `/stanford/robot/name`
* `/wg/node1`
This names are global (close to global names in a file system). In practice, it's recommended to use *private* or *relative* names.
#### Private name
Each node can use its own private namespace (corresponding its name) for its resources. For example, `aruco_detect` node may publish such topics:
* `/aruco_detect/markers`
* `/aruco_detect/visualization`
* `/aruco_detect/debug`
When a node is referring its private resource, instead of `/aruco_detect/` namespace it may use `~` symbol:
* `~markers`
* `~visualization`
* `~debug`
Thus, creating a `foo` topic and the private namespace would look like this:
```python
private_foo_pub = rospy.Publisher('~foo', String, queue_size=1)
```
#### Relative name
Several nodes may group into a common namespace (for example, when there are several robots in the network). For referring topics and services in the current namespace, the opening `/` symbol is omitted.
Example of create a `foo` topic in the current namespace:
```python
relative_foo_pub = rospy.Publisher('foo', String, queue_size=1)
```
> **Hint** Generally, it's recommended to use private or relative names instead of global ones.
### Working on several PCs
Working on several PCs
---
Main article: http://wiki.ros.org/ROS/Tutorials/MultipleMachines.

View File

@@ -22,7 +22,11 @@ To start the Clover state visualization in real time, connect to it [via Wi-Fi](
ROS_MASTER_URI=http://192.168.11.1:11311 rviz
```
> **Note** In case of using a virtual machine for using rviz and other tools it might be necessary to change its network configuration to *bridge* mode ([see details for VMware](https://docs.vmware.com/en/VMware-Workstation-Player-for-Windows/16.0/com.vmware.player.win.using.doc/GUID-826323AD-D014-475D-8909-DFA73B5A3A57.html)).
If connection is not established, make sure the `.bashrc` of Clover contains line:
```(bash)
export ROS_HOSTNAME=`hostname`.local
```
Using rviz
---
@@ -43,7 +47,7 @@ Axis or Grid configured to frame `aruco_map` will visualize the location [on the
### jsk_rviz_plugins
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:
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:
```(bash)
sudo apt-get install ros-melodic-jsk-visualization

View File

@@ -27,29 +27,28 @@ Main article: https://docs.qgroundcontrol.com/en/SetupView/Firmware.html
> **Note** Do not connect your flight controller prior to flashing.
We recommend using the modified version of [PX4 with COEX patches](firmware.md) for the Clover drone, especially for autonomous flights. Download the latest stable version **<a class="latest-firmware v4" href="https://github.com/CopterExpress/Firmware/releases">from our GitHub</a>**.
We recommend using the modified version of PX4 by CopterExpress for the Clover drone, especially for autonomous flights. Download the latest stable version **<a class="latest-firmware v4" href="https://github.com/CopterExpress/Firmware/releases">from our GitHub</a>**.
To use all the most recent PX4 functions you also can use the latest official firmware version (experimentally).
> **Info** For Pixhawk-based quadcopters there is a separate firmware version. See details in "[Pixhawk / Pixracer firmware flashing](firmware.md)" article.
Flash the flight controller with this firmware:
<img src="../assets/qgc-firmware.png" alt="QGroundControl firmware upload" class="zoom">
1. Disconnect the flight controller from computer (if connected).
2. Launch QGroundControl software.
3. Go to *Vehicle Setup* panel (click on the QGroundControl logo in the top-left corner) and select *Firmware* menu.
1. Launch QGroundControl software.
2. Open the *Vehicle Setup* tab.
3. Select the *Firmware* menu.
4. Connect your flight controller to your PC over USB.
5. Select *PX4 Flight Stack* in the right bar appeared.
5. Wait for the flight controller to connect to QGroundControl.
6. Select *PX4 Flight Stack* in the right bar.
<img src="../assets/qgc-firmware.png" alt="QGroundControl firmware upload" class="zoom">
To use the recommended Copter Express firmware:
6. To use **COEX patched firmware**:
* Check *Advanced Settings* checkbox.
* Select *Custom firmware file...* from the dropdown list.
* Press *OK* and select the file that you've downloaded.
* Check *Advanced Settings* checkbox.
* Select *Custom firmware file...* from the dropdown list.
* Press *OK* and select the file that you've downloaded.
To use the latest **official stable firmware** just press *OK*.
To use the latest official stable firmware just press *OK*.
Wait for QGroundControl to finish flashing the flight controller.
@@ -83,7 +82,7 @@ This is how the main QGroundControl settings window will look like:
### Setting parameters
Open the *Vehicle Setup* tab and select the *Parameters* menu. You can use the *Search* field to find parameters by name. Recommended parameters values are given in the further documentation and also in the [parameters summary article](parameters.md).
Open the *Vehicle Setup* tab and select the *Parameters* menu. You can use the *Search* field to find parameters by name.
<img src="../assets/qgc-parameters.png" alt="QGroundControl parameters" class="zoom">

View File

@@ -1,4 +1,11 @@
# Autonomous flight
Autonomous flight (OFFBOARD)
===
> **Note** In the image version **0.20** `clever` package was renamed to `clover`. See [previous version of the article](https://github.com/CopterExpress/clover/blob/v0.19/docs/en/simple_offboard.md) for older images.
<!-- -->
> **Hint** We recommend using our [custom PX4 firmware for Clover](firmware.md#modified-firmware-for-clover) for autonomous flights.
The `simple_offboard` module of the `clover` package is intended for simplified programming of the autonomous drone flight (`OFFBOARD` [flight mode](modes.md)). It allows setting the desired flight tasks, and automatically transforms [coordinates between frames](frames.md).
@@ -6,7 +13,8 @@ The `simple_offboard` module of the `clover` package is intended for simplified
Main services are [`get_telemetry`](#gettelemetry) (receive telemetry data), [`navigate`](#navigate) (fly to a given point along a straight line), [`navigate_global`](#navigateglobal) (fly to a point specified as latitude and longitude along a straight line), [`land`](#land) (switch to landing mode).
## Python usage
Python examples
---
You need to create proxies for services before calling them. Use the following template for your programs:
@@ -29,7 +37,8 @@ land = rospy.ServiceProxy('land', Trigger)
Unused proxy functions may be removed from the code.
## API description
API description
---
> **Note** Omitted numeric parameters are set to 0.
@@ -286,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).
> **Note** Set the `COM_DISARM_LAND` [PX4 parameter](parameters.md) to a value greater than 0 to enable automatic disarm after landing.
> **Note** Set the `COM_DISARM_LAND` [PX4 parameter](px4_parameters.md) to a value greater than 0 to enable automatic disarm after landing.
Landing the drone:
@@ -303,9 +312,14 @@ Landing the drone (command line):
rosservice call /land "{}"
```
> **Caution** In recent PX4 versions, the vehicle will be switched out of LAND mode to manual mode, if the remote control sticks are moved significantly.
<!--
### release
## Additional materials
Stop publishing setpoints to the drone (release control). Required to continue monitoring by means of [MAVROS](mavros.md).
-->
Additional materials
------------------------
* [ArUco-based position estimation and navigation](aruco.md).
* [Program samples and snippets](snippets.md).

View File

@@ -2,153 +2,95 @@
Setting up the simulation environment from scratch requires some effort, but results in the most performant setup, with less chance of driver issues.
> **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**.
## 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
```
Prerequisites: Ubuntu 18.04, [native ROS installation](ros-install.md).
## 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 the workspace and clone Clover sources:
```bash
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
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/ethz-asl/mav_comm
git clone https://github.com/CopterExpress/clover
git clone https://github.com/CopterExpress/ros_led
```
Install all dependencies using `rosdep`:
Install all prerequisites using `rosdep`:
```bash
cd ~/catkin_ws
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -y
```
Install Python dependencies:
```bash
sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt
```
## 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` and `mavlink` submodules into `~/catkin_ws/src` as well.
Clone PX4 sources and make the required symlinks:
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:
```bash
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/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/
cd ~/catkin_ws/src
git clone --recursive https://github.com/CopterExpress/Firmware -b v1.10.1-clever
ln -s Firmware/Tools/sitl_gazebo ./sitl_gazebo
```
> **Hint** You may use more recent PX4 version, but there would be more risk of something would not be working.
## Install PX4 prerequisites
PX4 comes with its own script for dependency installation. We may as well leverage it:
```bash
cd ~/catkin_ws/src/PX4-Autopilot/Tools/setup
cd ~/catkin_ws/src/Firmware/Tools/setup
sudo ./ubuntu.sh
```
This will install everything required to build PX4 and its SITL environment.
> **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`.
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:
Install more required Python packages:
```bash
pip3 install --user toml
```
sudo ./ubuntu.sh --no-nuttx
```
## Add the Clover airframe
## Patch Gazebo plugins
Add the Clover airframe to PX4 using the command:
The `sitl_gazebo` package containing required Gazebo plugins needs patching due to recent changes in MAVLink. These patches are already preapplied in the [virtual machine image](simulation_vm.md) and are stored in the VM repository. Run the following commands to download and apply the patches:
```bash
ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
cd ~/catkin_ws/src/Firmware/Tools/sitl_gazebo
wget https://raw.githubusercontent.com/CopterExpress/clover_vm/master/assets/patches/sitl_gazebo.patch
patch -p1 < sitl_gazebo.patch
rm sitl_gazebo.patch
```
## Install geographiclib datasets
`mavros` package requires geographiclib datasets to be present:
`mavros` requires geographiclib datasets to be present:
```bash
sudo /opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh
cd ~
wget https://raw.githubusercontent.com/mavlink/mavros/6f5bd5a1a67c19c2e605f33de296b1b1be9d02fc/mavros/scripts/install_geographiclib_datasets.sh
chmod +x ./install_geographiclib_datasets.sh
sudo ./install_geographiclib_datasets.sh
rm ./install_geographiclib_datasets.sh
```
## Build the simulator
Build your workspace:
With all dependencies installed, you can build your workspace:
```bash
cd ~/catkin_ws
catkin_make
```
> **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.
> **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`
## Run the simulator
In order to be sure that everything was built correctly, try running the simulator for the first time:
```bash
source ~/catkin_ws/devel/setup.bash
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
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.
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.
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/
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).
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).
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,11 +8,13 @@
<a name="block-takeoff"></a><!-- old name of anchor -->
Function to fly to a point and wait for copter's arrival:
Fly towards a point and wait for copter's arrival:
```python
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):
navigate(x=x, y=y, z=z, yaw=yaw, speed=speed, frame_id=frame_id, auto_arm=auto_arm)
@@ -62,6 +64,8 @@ Wait for copter's arrival to the [navigate](simple_offboard.md#navigate) target:
```python
import math
# ...
def wait_arrival(tolerance=0.2):
while not rospy.is_shutdown():
telem = get_telemetry(frame_id='navigate_target')
@@ -75,8 +79,6 @@ 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)):
```python
import math
def get_distance(x1, y1, z1, x2, y2, z2):
return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2 + (z1 - z2) ** 2)
```
@@ -86,8 +88,6 @@ def get_distance(x1, y1, z1, x2, y2, z2):
Approximation of distance (in meters) between two global coordinates (latitude/longitude):
```python
import math
def get_distance_global(lat1, lon1, lat2, lon2):
return math.hypot(lat1 - lat2, lon1 - lon2) * 1.113195e5
```
@@ -203,16 +203,19 @@ from geometry_msgs.msg import PoseStamped, TwistStamped
from sensor_msgs.msg import BatteryState
from mavros_msgs.msg import RCIn
# ...
def pose_update(pose):
# Processing new data of copter's position
pass
# Other handler functions
# ...
rospy.Subscriber('/mavros/local_position/pose', PoseStamped, pose_update)
rospy.Subscriber('/mavros/local_position/velocity', TwistStamped, velocity_update)
rospy.Subscriber('/mavros/battery', BatteryState, battery_update)
rospy.Subscriber('mavros/rc/in', RCIn, rc_callback)
rospy.spin()
```
Information about MAVROS topics is available at [the link](mavros.md).
@@ -226,13 +229,18 @@ Information about MAVROS topics is available at [the link](mavros.md).
Send an arbitrary [MAVLink message](mavlink.md) to the copter:
```python
# ...
from mavros_msgs.msg import Mavlink
from mavros import mavlink
from pymavlink import mavutil
# ...
mavlink_pub = rospy.Publisher('mavlink/to', Mavlink, queue_size=1)
# Sending a HEARTBEAT message:
msg = mavutil.mavlink.MAVLink_heartbeat_message(mavutil.mavlink.MAV_TYPE_GCS, 0, 0, 0, 0, 0)
msg.pack(mavutil.mavlink.MAVLink('', 2, 1))
ros_msg = mavlink.convert_to_rosmsg(msg)
@@ -273,6 +281,8 @@ Change the [flight mode](modes.md) to arbitrary one:
```python
from mavros_msgs.srv import SetMode
# ...
set_mode = rospy.ServiceProxy('mavros/set_mode', SetMode)
# ...
@@ -287,6 +297,8 @@ Flip:
```python
import math
# ...
PI_2 = math.pi / 2
def flip():
@@ -325,6 +337,8 @@ from pymavlink import mavutil
from mavros_msgs.srv import CommandLong
from mavros_msgs.msg import State
# ...
send_command = rospy.ServiceProxy('/mavros/cmd/command', CommandLong)
def calibrate_gyro():
@@ -358,6 +372,8 @@ Enable and disable [ArUco markers recognition](aruco_marker.md) dynamically (for
import rospy
import dynamic_reconfigure.client
# ...
client = dynamic_reconfigure.client.Client('aruco_detect')
# Turn markers recognition off
@@ -376,42 +392,10 @@ Wait for global position to appear (finishing [GPS receiver](gps.md) initializat
```python
import math
# ...
while not rospy.is_shutdown():
if math.isfinite(get_telemetry().lat):
break
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
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:
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:
```python
import collections

View File

@@ -1,25 +0,0 @@
# 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)
* [Полетные режимы](modes.md)
* [Настройка питания](power.md)
* [Настройка Failsafe](failsafe.md)
* [Настройка failsafe](failsafe.md)
* [Ручной полет](flight.md)
* [Упражнения](flight_exercises.md)
* [Работа с Raspberry Pi](raspberry.md)
@@ -75,7 +75,7 @@
* [Пилотирование со смартфона](rc.md)
* [Настройка сети RPi](network.md)
* [Интерфейс UART](uart.md)
* [Параметры PX4](parameters.md)
* [Параметры PX4](px4_parameters.md)
* [Работа с логами PX4](flight_logs.md)
* [Прошивка PX4](firmware.md)
* [Протокол MAVLink](mavlink.md)
@@ -114,8 +114,6 @@
* [Робокросс-2019](robocross2019.md)
* [CopterHack-2018](copterhack2018.md)
* [CopterHack-2017](copterhack2017.md)
* [Конкурс видео](video_contest.md)
* [Образовательные конкурсы](educational_contests.md)
* [Проекты на базе Клевера](projects.md)
* [Система автоматической посадки (AMLS)](amls.md)
* [Разработка системы для управления БПЛА с помощью шлема виртуальной реальности](remote-control-with-oculusvr.md)

View File

@@ -75,9 +75,9 @@ else:
shape = 'undefined'
color = 'undefined'
if shape == 'brown':
if shape = 'brown':
culture = "greshiha"
if shape == 'yellow_orange':
if shape = 'yellow_orange':
culture = "pshenitsa"
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
Для работы механизма Vision Position Estimation необходимы следующие [настройки PX4](parameters.md).
Для работы механизма Vision Position Estimation необходимы следующие [настройки PX4](px4_parameters.md).
При использовании **LPE** (параметр `SYS_MC_EST_GROUP` = `local_position_estimator, attitude_estimator_q`):

View File

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

View File

@@ -14,9 +14,7 @@
4. Последовательно устанавливайте квадрокоптер в каждую из указанных ориентаций до появления желтой рамки.
5. Вращайте квадрокоптер по направлению стрелки до появления зеленой рамки.
> **Warning** Последние версии прошивки PX4 не поддерживают внутренний компас на полетном контроллере COEX Pix. При появлении ошибки *No mags found* перейдите во вкладку *Parameters*, установите параметры `SYS_HAS_MAG` в `0`, `EKF2_MAG_TYPE` в `None` и перезагрузите полетный контроллер (*Tools* => *Reboot Vehicle*).
Дополнительная информация: https://docs.px4.io/master/en/config/compass.html.
Дополнительная информация: https://docs.px4.io/v1.9.0/en/config/compass.html.
## Гироскоп
@@ -29,7 +27,7 @@
> **Warning** Во время калибровки гироскопа квадрокоптер не должен менять своего положения, шататься и т. д.
Дополнительная информация: https://docs.px4.io/master/en/config/gyroscope.html.
Дополнительная информация: https://docs.px4.io/v1.9.0/en/config/gyroscope.html.
## Акселерометр
@@ -40,7 +38,7 @@
3. Последовательно устанавливайте квадрокоптер в каждую из указанных ориентаций до появления желтой рамки.
4. Держите квадрокоптер неподвижно до появления зеленой рамки.
Дополнительная информация: https://docs.px4.io/master/en/config/accelerometer.html.
Дополнительная информация: https://docs.px4.io/v1.9.0/en/config/accelerometer.html.
## Уровень горизонта
@@ -52,6 +50,6 @@
4. Нажмите *OK*.
5. Дождитесь окончания калибровки.
Дополнительная информация: https://docs.px4.io/master/en/config/level_horizon_calibration.html.
Дополнительная информация: https://docs.px4.io/v1.9.0/en/config/level_horizon_calibration.html.
**Далее**: [Настройка пульта](radio.md).

View File

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

View File

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

View File

@@ -8,39 +8,6 @@ CopterHack 2022 — это международный конкурс по ра
На конкурс принимаются проекты с открытым исходным кодом и совместимые с платформой квадрокоптера "Клевер". На протяжении конкурса команды работают на собственными идеями и разработками, приближая их к состоянию готового продукта. В этом участникам помогают эксперты отрасли через лекции и регулярную обратную связь.
## Проекты участников конкурса {#participants}
|Место|Команда|Проект|Балл|
|:-:|-|-|-|
||🇰🇬 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/advanced_clover_simulator.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)||
||🇷🇺 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)||
||🇧🇷 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)||
||🇷🇺 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)||
||🇷🇺 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)||
||🇩🇪 Inondro|[Inondro Pix](https://github.com/Inondro/clover/blob/inondro-pix/docs/en/inondro_copterhack22_pix.md)||
||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)||
||🇷🇺 SPECTRE|[SPECTRE](https://github.com/alakhmenev/clover/blob/spectre_team/docs/ru/spectre_team.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)||
||🇷🇺 С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;|
команды, не дошедшие до финала.
## Направление "кейс компании"
Команды приглашаются принять участие в работе над следующими кейсами компании:
@@ -107,38 +74,40 @@ CopterHack 2022 — это международный конкурс по ра
4. Оформите вашу заявку в соответствии с рекомендуемым шаблоном:
```markdown
# Название проекта
[CopterHack-2022](copterhack2022.md), команда **Название команды**.
## Информация о команде
Состав команды:
(Опишите состав команды: имя и фамилия, контакты (e-mail/имя пользователя в Telegram), роль в команде).
* Александр Соколов, @aleksandrsokolov111, инженер.
* Елена Смирнова, @elenasmirnova111, программист.
## Описание проекта
### Идея проекта
Опишите кратко идею и стадию проекта.
### Планируемые результаты
Опишите как вы видите результат проекта.
### Использование платформы "Клевер"
Опишите как в вашем проекте будет использоваться платформа "Клевер".
### Дополнительная информация по желанию участников
Например, информация об опыте работы команды над проектами, прикрепить ссылку на статьи, видео.
```
```markdown
# Название проекта
[CopterHack-2022](copterhack2022.md), команда **Название команды**.
## Информация о команде
Состав команды:
(Опишите состав команды: имя и фамилия, контакты (e-mail/имя пользователя в Telegram), роль в команде).
* Александр Соколов, @aleksandrsokolov111, инженер.
* Елена Смирнова, @elenasmirnova111, программист.
## Описание проекта
### Идея проекта
Опишите кратко идею и стадию проекта.
### Планируемые результаты
Опишите как вы видите результат проекта.
### Использование платформы "Клевер"
Опишите как в вашем проекте будет использоваться платформа "Клевер".
### Дополнительная информация по желанию участников
Например, информация об опыте работы команды над проектами, прикрепить ссылку на статьи, видео.
```
<!-- markdownlint-disable MD029 -->
5. Перейдите вниз страницы и создайте новую ветку с названием вашей статьи:
@@ -154,9 +123,7 @@ CopterHack 2022 — это международный конкурс по ра
8. В комментариях Pull Request вам будет дана обратная связь по заявке. На страничке конкурса в разделе "Проекты участников конкурса" будет опубликована ссылка на вашу заявку в вашем форке.
9. Обратите внимание на блок *Checks*, в графе Documentation должна стоять галочка. Если там стоит крестик, перейдите по ссылке *Details*, чтобы увидеть список проблем с оформлением статьи. При необходимости изменения добавляемых файлов, меняйте их в вашей ветке изменения будут появляться в Pull Request автоматически. **Не создавайте новый Pull Request для одной и той же заявки**.
10. На протяжении конкурса вы будете работать над этим документом, приближая его к состоянию статьи. В документе будет видна история разработки и ежемесячные апдейты. К финалу конкурса вы сможете опубликовать вашу статью, это и будет результат вашей работы в CopterHack.
9. На протяжении конкурса вы будете работать над этим документом, приближая его к состоянию статьи. В документе будет видна история разработки и ежемесячные апдейты. К финалу конкурса вы сможете опубликовать вашу статью, это и будет результат вашей работы в CopterHack.
Как только ссылка на заявку будет добавлена на эту страничку в раздел "Проекты участников конкурса", ваша команда стала официальным участником CopterHack 2022!
@@ -164,6 +131,10 @@ CopterHack 2022 — это международный конкурс по ра
> **Info** Ограничения по возрасту, образованию и количеству человек в команде отсутствуют.
## Проекты участников конкурса
Заявки будут публиковаться по мере поступления.
---
По всем вопросам: [CopterHack 2022](https://t.me/CopterHack).

View File

@@ -94,4 +94,4 @@ mv visual_ddrone-master ddrone
Хотим выразить благодарность Международному университету Ала-Тоо за предоставленную финансовую помощь в осуществлении данного проекта.
![Ala-Too University](../assets/seeding_drone/ala-too.png)
![Ala-Too University](https://my.alatoo.edu.kg/images/logo_text.png)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,9 @@
## Включение
> **Hint** Для работы Optical Flow необходим [подключенный и настроенный лазерный дальномер](laser.md).
> **Hint** Необходимо использование [специальной сборки PX4 для Клевера](firmware.md#прошивка-для-клевера).
Необходимо использование дальномера. [Подключите и настройте дальномер VL53L1X](laser.md), используя инструкцию.
Включите Optical Flow в файле `~/catkin_ws/src/clover/clover/launch/clover.launch`:
@@ -12,7 +14,7 @@
<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).

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
<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).
@@ -10,7 +10,7 @@
## Система позиционирования {#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
@@ -32,7 +32,7 @@
## Автономный полет {#flight}
> **Info** Для изучения языка программирования Python можно обратиться к [самоучителю](https://pythonworld.ru/samouchitel-python).
> **Info** Для изучения языка программирования Python вы можете обратиться к [самоучителю](https://pythonworld.ru/samouchitel-python).
После настройки системы позиционирования становится возможным написание скриптов для автономных полетов. Для выполнения скриптов [подключитесь в Raspberry Pi по SSH](ssh.md).
@@ -51,6 +51,8 @@ python3 flight.py
Пример программы для полета (взлет, пролет вперед, посадка):
```python
# coding: utf8
import rospy
from clover import srv
from std_srvs.srv import Trigger

View File

@@ -1,64 +1,20 @@
# Параметры PX4
Полная документация по параметрам PX4: https://docs.px4.io/master/en/advanced_config/parameter_reference.html.
Основная статья: https://dev.px4.io/en/advanced/parameter_reference.html
Для изменения параметров PX4 используйте программу QGroundControl, [подключившись к Клеверу по Wi-Fi](gcs_bridge.md) или USB. Перейдите в панель *Vehicle Setup* (кликнув на логотип QGroundControl в левом верхнем углу и выберите меню *Parameters*.
> **Note** Это описание некоторых, наиболее важных параметров PX4 по состоянию на версию 1.8.0. Полный список см. по ссылке выше.
## Рекомендованные значения
Для изменения параметров PX4 можно воспользоваться программой QGroundControl, [подключившись к Клеверу по Wi-Fi](gcs_bridge.md):
### Общие параметры
![Параметры PX4 в QGroundControl](../assets/qgc-params.png)
|Параметр|Значение|Примечание|
|-|-|-|
|`SENS_FLOW_ROT`|0 (*No rotation*)|В случае использования "железного" [PX4Flow](px4flow.md), оставьте значение по умолчанию|
|`SENS_FLOW_MINHGT`|0.01|Для [дальномера VL53L1X](laser.md)|
|`SENS_FLOW_MAXHGT`|4.0|Для [дальномера VL53L1X](laser.md)|
|`SENS_FLOW_MAXR`|10.0||
|`SYS_HAS_MAG`|0|При невозможности запуска магнитометра (ошибка *No mags found*)|
## Основные параметры
### Настройки подсистемы Estimator
Наиболее важные параметры вынесены в этот параграф.
В случае использования LPE ([прошивка COEX](firmware.md)):
`SYS_MC_EST_GROUP`  выбор модуля estimator'а.
|Параметр|Значение|Примечание|
|-|-|-|
|`LPE_FUSION`|86|Чекбоксы: *flow* + *vis* + *land Detector* + *gyro comp*. При полете над ровным полом возможно включение *pub agl as lpos down*. <br>Подробнее: [Optical Flow](optical_flow.md), [ArUco-маркеры](aruco_map.md), [GPS](gps.md).|
|`LPE_VIS_DELAY`|0.0||
|`LPE_VIS_Z`|0.1||
|`LPE_FLW_SCALE`|1.0||
|`LPE_FLW_R`|0.2||
|`LPE_FLW_RR`|0.0||
|`LPE_FLW_QMIN`|10||
|`ATT_W_EXT_HDG`|0.5|Включение использования внешнего угла по рысканью (при навигации по [карте маркеров](aruco_map.md))|
|`ATT_EXT_HDG_M`|1 (*Vision*)||
|`ATT_W_MAG`|0|Выключение магнитометра (при навигации внутри помещения)|
В случае использования EKF2 (официальная прошивка):
<!-- markdownlint-disable MD044 -->
|Параметр|Значение|Примечание|
|-|-|-|
|`EKF2_AID_MASK`|27|Чекбоксы: (опционально) *gps* + *flow* + *vision position* + *vision yaw*.<br>Подробнее: [Optical Flow](optical_flow.md), [ArUco-маркеры](aruco_map.md), [GPS](gps.md).|
|`EKF2_OF_DELAY`|0||
|`EKF2_OF_QMIN`|10||
|`EKF2_OF_N_MIN`|0.05||
|`EKF2_OF_N_MAX`|0.2||
|`EKF2_HGT_MODE`|2 (*Range sensor*)|При наличии [дальномера](laser.md) и полете над ровным полом|
|`EKF2_EVA_NOISE`|0.1||
|`EKF2_EVP_NOISE`|0.1||
|`EKF2_EV_DELAY`|0||
|`EKF2_MAG_TYPE`|5 (*None*)|Выключение магнитометра (при навигации внутри помещения)|
<!-- markdownlint-enable MD031 -->
> **Info** См. также: список параметров по умолчанию в [симуляторе](simulation.md): https://github.com/CopterExpress/clover/blob/master/clover_simulation/airframes/4500_clover.
## Дополнительная информация
Параметр `SYS_MC_EST_GROUP` отвечает за выбор Estimator'а.
Estimator это подсистема, которая вычисляет текущее состояние (state) коптера, используя показания с датчиков. В состояние коптера входит:
Это группа модулей, которая вычисляет текущее состояние (state) коптера, используя показания с датчиков. В состояние коптера входит:
* угловая скорость коптера pitch_rate, roll_rate, yaw_rate;
* ориентация коптера (в локальной системе координат) pitch (тангаж), roll (крен), yaw (рысканье) (одно из представлений);
@@ -101,7 +57,9 @@ Estimator это подсистема, которая вычисляет тек
## LPE + Q attitude estimator
Данные параметры настраивают поведение модулей `lpe` и `q`, которые вычисляют состояние (ориентацию, позицию) коптера. Эти параметры применяются **только** если параметр `SYS_MC_EST_GROUP` установлен в значение `1` (local_position_estimator, attitude_estimator_q).
Данные параметры настраивают поведение модулей `lpe` и `q`, которые вычисляют состояние (ориентацию, позицию) коптера. Эти параметры применяются **только** если параметр `SYS_MC_EST_GROUP` установлен в значение `1` (local_position_estimator, attitude_estimator_q)
TODO
## Commander
@@ -110,3 +68,5 @@ Estimator это подсистема, которая вычисляет тек
## Sensors
Включение, выключение и настройка различных датчиков.
TODO

View File

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

Some files were not shown because too many files have changed in this diff Show More