Compare commits

...

75 Commits

Author SHA1 Message Date
Oleg Kalachev
b3ac99fbef Merge branch 'master' into recent-px4 2021-12-17 07:40:18 +03:00
Oleg Kalachev
cba12e115e builder: remove unneeded catkin_blacklist_packages 2021-12-16 13:57:13 +03:00
Oleg Kalachev
ae9a5154ab Merge branch 'master' into recent-px4 2021-12-16 13:44:15 +03:00
Oleg Kalachev
bb6a6c81f3 selfcheck.py: don’t show 'different index' warnings 2021-12-16 13:41:14 +03:00
Oleg Kalachev
1878e467ac Merge branch 'master' into recent-px4 2021-12-16 13:35:23 +03:00
Elena Seliverstova
d27bbf31bd docs: video contest page (#427)
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2021-12-16 00:21:48 +03:00
Oleg Kalachev
8668295cfe docs: fix 2021-12-14 19:24:59 +03:00
Oleg Kalachev
535b366bab docs: update copterhack article 2021-12-14 18:52:32 +03:00
Oleg Kalachev
9f6aa7dabd docs: add get-param and set-param snippets 2021-12-11 09:54:02 +03:00
Oleg Kalachev
f4d00a47af docs: fix 2021-12-10 16:19:07 +03:00
Oleg Kalachev
0f438235c2 docs: minor fix 2021-12-10 09:43:09 +03:00
Oleg Kalachev
e4ad687e28 docs: fix to native simulator setup article 2021-12-10 09:07:27 +03:00
Oleg Kalachev
5d58ffd1db docs: rework native simulator installation article 2021-12-10 07:53:55 +03:00
Oleg Kalachev
b2ed1fccc6 simple_offboard: remove warnings 2021-12-10 05:00:08 +03:00
Oleg Kalachev
aa136e7f15 docs: minor fix 2021-12-10 02:28:28 +03:00
Oleg Kalachev
9743bcbaaf Disable publish_sim_time in mavros as it breaks the simulation 2021-12-10 02:28:18 +03:00
Oleg Kalachev
75aed624db docs: remove unneeded 'coding' from program template 2021-11-30 16:40:35 +03:00
Oleg Kalachev
75b63ad77d Merge branch 'master' into recent-px4 2021-11-25 23:41:36 +03:00
Oleg Kalachev
36a4962bc0 www: add link to topics list page in topic viewer 2021-11-25 23:41:24 +03:00
Oleg Kalachev
140535b0b4 Merge branch 'master' into recent-px4 2021-11-25 23:36:30 +03:00
Oleg Kalachev
2cd3be1139 optical_flow: ability to change default flow gyro values 2021-11-25 23:36:20 +03:00
Oleg Kalachev
6909ba5819 www: change background when connection in closed in topics view 2021-11-25 23:27:09 +03:00
Oleg Kalachev
2a8c85144e Merge branch 'master' into recent-px4 2021-11-25 22:55:46 +03:00
Oleg Kalachev
f1783bdd0b selfcheck.py: ignore some records of error log in report 2021-11-25 22:54:45 +03:00
Oleg Kalachev
528be179e6 selfcheck.py: parse warnings from error log correctly 2021-11-25 22:49:31 +03:00
Oleg Kalachev
fe588e7af9 blocks: raise exception when cannot connect to pigpiod 2021-11-22 20:16:10 +03:00
Oleg Kalachev
15551db840 docs: add redirect from /gpio 2021-11-22 20:10:39 +03:00
Oleg Kalachev
65bc74b5ec docs: some updates to optical flow article 2021-11-19 10:16:10 +03:00
Oleg Kalachev
ac4f16f973 selfcheck.py: fix and simplify firmware version parsing, remove Clover firmware warning 2021-11-19 10:14:41 +03:00
Oleg Kalachev
9dc4407afc selfcheck.py: make not finding vcgencmd not a failure 2021-11-19 09:50:56 +03:00
Oleg Kalachev
365bd4146a selfcheck.py: add gzclient and gzserver to cpu eaters whitelist 2021-11-19 09:50:52 +03:00
Oleg Kalachev
fc99269404 selfcheck.py: remove timestamps from selfcheck reports 2021-11-19 09:50:43 +03:00
Oleg Kalachev
baf8b736d4 selfcheck.py: make not finding vcgencmd not a failure 2021-11-19 09:47:45 +03:00
Oleg Kalachev
bb318ce93f selfcheck.py: add gzclient and gzserver to cpu eaters whitelist 2021-11-19 09:47:07 +03:00
Oleg Kalachev
d7b6968fee selfcheck.py: remove timestamps from selfcheck reports 2021-11-19 09:46:46 +03:00
Oleg Kalachev
08f6aa7aee docs: update 2021-11-18 14:43:21 +03:00
Oleg Kalachev
d5e729c66c docs: update firmware flashing section 2021-11-16 09:09:50 +03:00
Oleg Kalachev
27c83d062c docs: use enumerated list for consistency 2021-11-16 07:40:27 +03:00
Oleg Kalachev
04bc9fb017 docs: some updates in setup section 2021-11-16 07:32:02 +03:00
Oleg Kalachev
b2928dd536 docs: info on no mags found error 2021-11-16 07:31:01 +03:00
Oleg Kalachev
2a4163cbeb docs: update PX4 docs links 2021-11-16 07:30:33 +03:00
Oleg Kalachev
d1edc95ab5 docs: minor fix 2021-11-16 07:28:31 +03:00
Oleg Kalachev
9231679353 copterhack-2022: update Moopt title 2021-11-09 16:31:43 +03:00
Oleg Kalachev
4defe2c7ef copterhack-2022: fix 2021-11-08 22:57:51 +03:00
Bartosz Ptak
9f3410847f copterhack-2022: fix (#423) 2021-11-08 22:56:46 +03:00
Oleg Kalachev
fa8da1cb33 copterhack-2022: add participants list 2021-11-08 17:38:43 +03:00
Oleg Kalachev
3bb285fd35 docs: fix 2021-11-03 18:59:48 +03:00
Oleg Kalachev
ec1829e60c docs: remove external image 2021-11-03 00:34:17 +03:00
Oleg Kalachev
c32a412f42 Builder: echo commands in image-ros.sh 2021-11-02 23:19:18 +03:00
Oleg Kalachev
810ddb4157 docs: update ros article 2021-11-02 20:58:27 +03:00
Oleg Kalachev
3656c1714a docs: update copterhack article 2021-11-01 20:11:30 +03:00
Oleg Kalachev
937b68aa43 docs: redirect /ros to English version 2021-11-01 19:12:46 +03:00
Oleg Kalachev
bdd1b06541 docs: fix building pdf 2021-10-30 21:57:49 +03:00
Oleg Kalachev
dd96c91b55 docs: minor fix 2021-10-30 21:36:51 +03:00
Oleg Kalachev
8f3d64e9aa docs: minor fix 2021-10-22 16:46:18 +03:00
Oleg Kalachev
cfd413ffc1 simulation: tune external camera model fov 2021-10-20 10:09:33 +03:00
Oleg Kalachev
ca054c88ba clover_simulation: add script for running gzweb 2021-10-12 05:55:16 +03:00
murata,katsutoshi
d55576bf4f udev: add CUAV X7 Pro (#392) 2021-10-12 01:46:52 +03:00
Oleg Kalachev
470e6ff0e9 Fix for editorconfig 2021-10-08 16:40:18 +03:00
Oleg Kalachev
441cf7fcf7 editoconfig-lint: don’t check .material files 2021-10-08 16:38:30 +03:00
Oleg Kalachev
fc5960586b simulation: add several separate aruco markers models 2021-10-08 16:35:12 +03:00
Oleg Kalachev
4aef1e616c docs: minor fix 2021-10-07 01:59:58 +03:00
Oleg Kalachev
463c08da96 docs: update simulation installation instructions 2021-10-07 01:32:16 +03:00
Oleg Kalachev
ebaaa14a7e docs: update header in sitl article (ru) 2021-10-07 01:17:33 +03:00
Oleg Kalachev
c0d33abff6 docs: add info on rostopic info and rostopic hz 2021-10-07 00:51:55 +03:00
Oleg Kalachev
3c4ef56b4e Fix can't find Rust compiler while installing cryptography
Using an older cryptography version that didn’t need Rust
See https://stackoverflow.com/a/68472128/6850197
2021-10-07 00:18:45 +03:00
Oleg Kalachev
17e806601d Tune parameters of external camera 2021-10-07 00:18:19 +03:00
Oleg Kalachev
3e3c5aa453 Add maintain_camera_rate argument to simulator.launch 2021-10-06 23:54:19 +03:00
Oleg Kalachev
7fd463d1cb docs: add note on bridge mode for using rviz etc 2021-10-06 22:12:47 +03:00
Oleg Kalachev
64b083b242 Add external camera model 2021-10-06 21:17:21 +03:00
Oleg Kalachev
b2ec48f0f3 blocks: minor fix 2021-10-06 17:53:25 +03:00
Oleg Kalachev
b249524828 Use markdownlint-cli@0.28.1 as of https://github.com/DavidAnson/markdownlint/issues/435 2021-10-05 16:33:38 +03:00
Oleg Kalachev
d0dcc0e72a docs: some fixes to rviz article 2021-10-05 15:34:59 +03:00
Oleg Kalachev
4c6e7029e8 docs: fix 2021-09-26 18:23:52 +03:00
Oleg Kalachev
613f70fd25 Add subscriber example 2021-09-24 17:34:54 +03:00
66 changed files with 1191 additions and 309 deletions

View File

@@ -19,7 +19,7 @@ jobs:
sudo sh -c "echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections"
sudo apt-get update && sudo apt-get install -y calibre msttcorefonts
builder/assets/install_gitbook.sh
npm install markdownlint-cli -g
npm install markdownlint-cli@0.28.1 -g # FIXME: https://github.com/DavidAnson/markdownlint/issues/435
npm install svgexport -g
gitbook -V
markdownlint -V

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"
./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"

View File

@@ -13,7 +13,7 @@
# copies or substantial portions of the Software.
#
set -e # Exit immidiately on non-zero result
set -ex # exit on error, echo commands
REPO=$1
REF=$2
@@ -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 -DCATKIN_BLACKLIST_PACKAGES=clover_gazebo_plugins
catkin_make -j2 -DCMAKE_BUILD_TYPE=RelWithDebInfo
source devel/setup.bash
echo_stamp "Install clever package (for backwards compatibility)"

View File

@@ -137,6 +137,7 @@ 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 tornado==5.1.1
my_travis_retry pip3 install butterfly
my_travis_retry pip3 install butterfly[systemd]

View File

@@ -0,0 +1,15 @@
# Information: https://clover.coex.tech/en/laser.html
import rospy
from sensor_msgs.msg import Range
rospy.init_node('process_rangefinder')
def range_callback(msg):
# Process data from the rangefinder
print('Rangefinder distance:', msg.range)
# Subscribe to laser rangefinder data
rospy.Subscriber('rangefinder/range', Range, range_callback)
rospy.spin()

View File

@@ -13,6 +13,7 @@ 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

@@ -53,6 +53,7 @@ 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()
{
@@ -69,6 +70,7 @@ 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);
@@ -194,9 +196,9 @@ private:
uint32_t integration_time_us = integration_time.toSec() * 1.0e6;
// Calculate flow gyro
flow_.integrated_xgyro = NAN;
flow_.integrated_ygyro = NAN;
flow_.integrated_zgyro = NAN;
flow_.integrated_xgyro = flow_gyro_default_;
flow_.integrated_ygyro = flow_gyro_default_;
flow_.integrated_zgyro = flow_gyro_default_;
if (calc_flow_gyro_) {
try {

View File

@@ -43,6 +43,8 @@ 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)
@@ -199,18 +201,13 @@ def check_fcu():
if version_str == '':
info('no version data available from SITL')
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 is_clover_firmware:
failure('not running Clover PX4 firmware, https://clover.coex.tech/firmware')
for line in version_str.split('\n'):
if line.startswith('FW version: '):
info(line[len('FW version: '):])
elif line.startswith('FW git tag: '):
info(line[len('FW git tag: '):])
elif line.startswith('HW arch: '):
info(line[len('HW arch: '):])
est = get_param('SYS_MC_EST_GROUP')
if est == 1:
@@ -618,7 +615,7 @@ def check_boot_duration():
@check('CPU usage')
def check_cpu_usage():
WHITELIST = 'nodelet',
WHITELIST = 'nodelet', 'gzclient', 'gzserver'
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')
@@ -646,13 +643,22 @@ def check_clover_service():
elif 'failed' in output:
failure('service failed to run, check your launch-files')
r = re.compile(r'^(.*)\[(FATAL|ERROR)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$')
BLACKLIST = 'Unexpected command 520', 'Time jump detected', 'different index:'
r = re.compile(r'^(.*)\[(FATAL|ERROR| WARN)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$')
error_count = OrderedDict()
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] + ': ' + node_error.groups()[2]
msg = node_error.groups()[1].strip() + ': ' + node_error.groups()[2]
if msg in error_count:
error_count[msg] += 1
else:
@@ -753,7 +759,7 @@ def check_rpi_health():
# with some of the FLAGs OR'ed together
output = subprocess.check_output(['vcgencmd', 'get_throttled']).decode()
except OSError:
failure('could not call vcgencmd binary; not a Raspberry Pi?')
info('could not call vcgencmd binary; not a Raspberry Pi?')
return
throttle_mask = int(output.split('=')[1], base=16)

View File

@@ -181,6 +181,7 @@ 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))
@@ -847,6 +848,7 @@ bool land(std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
busy = false;
return true;
}
return false;
}
int main(int argc, char **argv)

View File

@@ -12,4 +12,6 @@ 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

@@ -3,11 +3,13 @@ const ros = new ROSLIB.Ros({ url: url });
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);
@@ -37,13 +39,14 @@ function viewTopicsList() {
let rosdistro;
function viewTopic(topic) {
title.innerHTML = topic;
let index = '<a href=topics.html>Topics</a>';
title.innerHTML = `${index}: ${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 = `${topic} <a id="topic-type" href=${href} target="_blank">${typeStr}</a>`;
title.innerHTML = `${index}: ${topic} <a id="topic-type" href=${href} target="_blank">${typeStr}</a>`;
});
new ROSLIB.Topic({ ros: ros, name: topic }).subscribe(function(msg) {

View File

@@ -17,6 +17,7 @@
}
#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>

View File

@@ -211,7 +211,7 @@ function loadPrograms() {
updateChanged();
}, function(err) {
document.querySelector('.backend-fail').style.display = 'inline';
alert(`Error loading programs list.\n\nHave you enabled clover_blocks in clover.launch?`);
alert(`Error loading programs list.\n\nHave you enabled 'blocks' in clover.launch?`);
runButton.disabled = true;
})
}

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()';
Blockly.Python.definitions_['init_pigpio'] = 'pi = pigpio.pi()\nif not pi.connected: raise Exception(\'Cannot connect to pigpiod\')';
}
const GPIO_READ = `\ndef gpio_read(pin):

View File

@@ -4,6 +4,7 @@
<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 -->
@@ -28,6 +29,7 @@
<!-- 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

@@ -0,0 +1,24 @@
<?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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

View File

@@ -0,0 +1,13 @@
<?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

@@ -0,0 +1,24 @@
<?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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

View File

@@ -0,0 +1,13 @@
<?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

@@ -0,0 +1,24 @@
<?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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

View File

@@ -0,0 +1,13 @@
<?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

@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<sdf version="1.5">
<model name="camera">
<static>true</static>
<link name='camera_link'>
<pose>0 0 0 0 0 0</pose>
<sensor name='camera' type='camera'>
<camera>
<horizontal_fov>1.8</horizontal_fov>
<image>
<format>B8G8R8</format>
<width>640</width>
<height>480</height>
</image>
<clip>
<near>0.02</near>
<far>300</far>
</clip>
</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<visualize>1</visualize>
<plugin name='camera_plugin' filename='libgazebo_ros_camera.so'>
<alwaysOn>1</alwaysOn>
<imageTopicName>image_raw</imageTopicName>
<cameraTopicName>camera_info</cameraTopicName>
<cameraName>camera</cameraName>
<frameName>/camera</frameName>
</plugin>
</sensor>
</link>
</model>
</sdf>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<model>
<name>Camera</name>
<version>1.0</version>
<sdf version="1.5">camera.sdf</sdf>
<author>
<name>Oleg Kalachev</name>
<email>okalachev@gmail.com</email>
</author>
<description>
External camera
</description>
</model>

View File

@@ -0,0 +1,8 @@
#!/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}

BIN
docs/assets/dhcp.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

183
docs/assets/ros.svg Normal file
View File

@@ -0,0 +1,183 @@
<?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>

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -100,6 +100,7 @@
* [CopterHack-2019](copterhack2019.md)
* [CopterHack-2018](copterhack2018.md)
* [CopterHack-2017](copterhack2017.md)
* [Video contest](video_contest.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

@@ -8,6 +8,39 @@ 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/advancedclover2.md)||
||🇻🇳 Dragon&Tanker|[Dragon&Tanker](https://github.com/uml4/clover/blob/drone_observe_autonomous_car/docs/en/dragon_and_tanker_team.md)||
||🇷🇺 Stereo|[Neural obstacle avoidance](https://github.com/den250400/clover/blob/neural-obstacle-avoidance/docs/en/neural-obstacle-avoidance.md)||
||🇷🇺 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)||
||🇷🇺 V-NAV|[Visual Navigation](https://github.com/v-nav/clover/blob/v-nav_article/docs/ru/v-nav.md)||
||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)||
||🇷🇺 Джедаи 1581|[Ретранслятор на базе Клевера](https://github.com/JJNIK/clover/blob/patch-1/docs/ru/1581.md)||
||🇷🇺 SPECTRE|[SPECTRE](https://github.com/alakhmenev/clover/blob/spectre_team/docs/ru/spectre_team.md)||
||🇷🇺 Lucky flight|[Swarm of Improved Clover](https://github.com/bessiaka/clover/blob/Lucky-flight/docs/ru/lucky_flight.md)||
||🇷🇺 SolidEye|[Разработка лидара без движущихся частей](https://github.com/feanorgg/clover/blob/solideye/docs/ru/solid_eye.md)||
||🇰🇬 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;|
|✕|🇺🇸 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:
@@ -74,40 +107,38 @@ 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.
```
<!-- markdownlint-disable MD029 -->
```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.
```
5. Go to the bottom of the page and create a new branch with the title of your article:
@@ -123,7 +154,9 @@ 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. 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. 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.
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!
@@ -131,10 +164,6 @@ 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](https://my.alatoo.edu.kg/images/logo_text.png)
![Ala-Too University](../assets/seeding_drone/ala-too.png)

View File

@@ -51,8 +51,6 @@ 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

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

View File

@@ -1,33 +1,28 @@
ROS
===
# ROS
Main article: http://wiki.ros.org
<img src="../assets/ros.svg" width="200" align="right">
ROS is a widely used framework for developing complex and distributed robotic systems.
Main documentation: https://wiki.ros.org.
Installation
---
**ROS** is a widely used framework for developing complex and distributed robotic systems. The [Clover autonomous flights platform](programming.md) is based on ROS.
Main article: http://wiki.ros.org/melodic/Installation/Ubuntu
## Installation
ROS is already installed on [the RPi image](image.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)).
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).
> **Note** For ROS Melodic distribution, we recommend using Ubuntu 18.04.
Concepts
---
## Concepts
### Nodes
Main article: http://wiki.ros.org/Nodes
Main article: https://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, increases re-usability 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, increased reusability and reliability.
Many robotic libraries and the drivers are executed in the form of ROS-nodes.
Many robotic libraries and drivers are made as ROS nodes.
In order to turn an ordinary program into a ROS node, include a `rospy` or `roscpp` library, and insert the initialization code.
In order to turn an ordinary program into a ROS node, include the `rospy` (Python) or `roscpp` (C++) library, and insert the initialization code.
An example of a ROS node in Python:
@@ -36,32 +31,52 @@ import rospy
rospy.init_node('my_ros_node') # the name of the ROS node
rospy.spin() # entering an endless cycle...
rospy.spin() # entering an infinite loop...
```
> **Info** Any [autonomous flight script](programming.md) for Clover is a ROS node.
### Topics
Main article: http://wiki.ros.org/Topics
Main article: https://wiki.ros.org/Topics
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.
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.
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:
Для каждого созданного топика должен быть задан тип сообщений, которые по нему передаются. 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:
```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!') # posting the message
foo_pub.publish(data='Hello, world!') # publishing the message
```
An example of subscription to topic `/foo`:
Example of subscription to a topic `/foo`:
```python
import rospy
from std_msgs.msg import String
rospy.init_node('my_ros_node')
def foo_callback(msg):
print(msg.data)
@@ -69,42 +84,101 @@ def foo_callback(msg):
rospy.Subscriber('/foo', String, foo_callback)
```
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`:
You can read a topic message once, using `wait_for_message` function:
```(bash)
```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
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: http://wiki.ros.org/Services
Main article: https://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.
An example ROS service invoking from Python:
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:
```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 receiving the quadcopter telemetry:
# Invoking the service, and getting 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).
Working on several PCs
---
### 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
Main article: http://wiki.ros.org/ROS/Tutorials/MultipleMachines.

View File

@@ -3,28 +3,26 @@ Using rviz and rqt
![rviz](../assets/rviz.png)
The [rviz] tool(http://wiki.ros.org/rviz) allows real-time visualization of all components of the robotic system —the system of coordinates, moving parts, sensors, camera images — on the 3D stage.
The [rviz](http://wiki.ros.org/rviz) tool allows real-time visualization of all components of the robotic system —the system of coordinates, moving parts, sensors, camera images — on the 3D stage.
[rqt](http://wiki.ros.org/rqt) is a set of GUI for analyzing and controlling ROS systems. For example, `rqt_image_view` allows viewing topics with images, `rqt_multiplot` allows plot charts by the values in topics, etc.
To use rviz and rqt, a PC running 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)) is required.
To use rviz and rqt, a PC running 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)) is required.
> **Hint** You can use the [preconfigured virtual machine image](simulation_vm.md) with ROS and Clover toolkit.
Install package `ros-melodic-desktop-full` or `ros-melodic-desktop` using the [installation documentation](http://wiki.ros.org/melodic/Installation/Ubuntu).
Start rviz
---
To start the Clover state visualization in real time, connect to it via Wi-Fi (`clover-xxx`) and run rviz, specifying an appropriate ROS_MASTER_URI:
To start the Clover state visualization in real time, connect to it [via Wi-Fi](wifi.md) (`clover-xxxx`) and run rviz, specifying an appropriate ROS_MASTER_URI:
```(bash)
ROS_MASTER_URI=http://192.168.11.1:11311 rviz
```
If connection is not established, make sure the `.bashrc` of Clover contains line:
```(bash)
export ROS_HOSTNAME=`hostname`.local
```
> **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)).
Using rviz
---

View File

@@ -2,95 +2,153 @@
Setting up the simulation environment from scratch requires some effort, but results in the most performant setup, with less chance of driver issues.
Prerequisites: Ubuntu 18.04, [native ROS installation](ros-install.md).
> **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
```
## 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:
Create a workspace for the simulation:
```bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/CopterExpress/clover
git clone https://github.com/CopterExpress/ros_led
cd ~/catkin_ws
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
```
Install all prerequisites using `rosdep`:
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
```
Install all dependencies using `rosdep`:
```bash
cd ~/catkin_ws
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -y
```
## Get PX4 sources
PX4 will be built along with the other packages in our workspace. You may clone it directly into the workspace or put it somewhere and symlink to `~/catkin_ws/src`. We will need to put its `sitl_gazebo` submodule in `~/catkin_ws/src` as well. For simplicity's sake we will clone the firmware directly to the workspace:
Install Python dependencies:
```bash
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
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:
```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/
```
> **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/Firmware/Tools/setup
cd ~/catkin_ws/src/PX4-Autopilot/Tools/setup
sudo ./ubuntu.sh
```
This will install everything required to build PX4 and its SITL environment.
You may want to skip installing the ARM toolchain if you're not planning on compiling PX4 for your flight controller. To do this, use the `--no-nuttx` flag:
> **Hint** You may want to skip installing the ARM toolchain if you're not planning on compiling PX4 for your flight controller. To do this, use the `--no-nuttx` flag: `sudo ./ubuntu.sh --no-nuttx`.
```
sudo ./ubuntu.sh --no-nuttx
```
## Patch Gazebo plugins
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:
Install more required Python packages:
```bash
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
pip3 install --user toml
```
## Add the Clover airframe
Add the Clover airframe to PX4 using the command:
```bash
ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
```
## Install geographiclib datasets
`mavros` requires geographiclib datasets to be present:
`mavros` package requires geographiclib datasets to be present:
```bash
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
sudo /opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh
```
## Build the simulator
With all dependencies installed, you can build your workspace:
Build your workspace:
```bash
cd ~/catkin_ws
catkin_make
```
> **Note** Some of the files - particularly Gazebo plugins - require large amounts of RAM to be built. You may wish to reduce the number of parallel jobs; the number of parallel jobs should be equal to the amount of RAM in gigabytes divided by 2 - so a 16GB machine should use no more than 8 jobs. You can specify the number of jobs using the `-j` flag: `catkin_make -j8`
> **Note** If building fails with RAM issues (`c++: fatal error: Killed signal terminated program cc1plus`), reduce the number of parallel jobs using `-j` key. For example, to use only two parallel jobs use `catkin_make -j2` command.
## Run the simulator
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

@@ -399,3 +399,45 @@ while not rospy.is_shutdown():
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))
```

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

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

View File

@@ -17,7 +17,7 @@
* [Работа с FS-A8S](rc_flysky_a8s.md)
* [Полетные режимы](modes.md)
* [Настройка питания](power.md)
* [Настройка failsafe](failsafe.md)
* [Настройка Failsafe](failsafe.md)
* [Ручной полет](flight.md)
* [Упражнения](flight_exercises.md)
* [Работа с Raspberry Pi](raspberry.md)
@@ -114,6 +114,7 @@
* [Робокросс-2019](robocross2019.md)
* [CopterHack-2018](copterhack2018.md)
* [CopterHack-2017](copterhack2017.md)
* [Конкурс видео](video_contest.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

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

View File

@@ -8,6 +8,39 @@ 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/advancedclover2.md)||
||🇻🇳 Dragon&Tanker|[Dragon&Tanker](https://github.com/uml4/clover/blob/drone_observe_autonomous_car/docs/en/dragon_and_tanker_team.md)||
||🇷🇺 Stereo|[Neural obstacle avoidance](https://github.com/den250400/clover/blob/neural-obstacle-avoidance/docs/en/neural-obstacle-avoidance.md)||
||🇷🇺 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)||
||🇷🇺 V-NAV|[Visual Navigation](https://github.com/v-nav/clover/blob/v-nav_article/docs/ru/v-nav.md)||
||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)||
||🇷🇺 Джедаи 1581|[Ретранслятор на базе Клевера](https://github.com/JJNIK/clover/blob/patch-1/docs/ru/1581.md)||
||🇷🇺 SPECTRE|[SPECTRE](https://github.com/alakhmenev/clover/blob/spectre_team/docs/ru/spectre_team.md)||
||🇷🇺 Lucky flight|[Swarm of Improved Clover](https://github.com/bessiaka/clover/blob/Lucky-flight/docs/ru/lucky_flight.md)||
||🇷🇺 SolidEye|[Разработка лидара без движущихся частей](https://github.com/feanorgg/clover/blob/solideye/docs/ru/solid_eye.md)||
||🇰🇬 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;|
|✕|🇺🇸 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;|
команды, не дошедшие до финала.
## Направление "кейс компании"
Команды приглашаются принять участие в работе над следующими кейсами компании:
@@ -74,40 +107,38 @@ CopterHack 2022 — это международный конкурс по ра
4. Оформите вашу заявку в соответствии с рекомендуемым шаблоном:
```markdown
# Название проекта
[CopterHack-2022](copterhack2022.md), команда **Название команды**.
## Информация о команде
Состав команды:
(Опишите состав команды: имя и фамилия, контакты (e-mail/имя пользователя в Telegram), роль в команде).
* Александр Соколов, @aleksandrsokolov111, инженер.
* Елена Смирнова, @elenasmirnova111, программист.
## Описание проекта
### Идея проекта
Опишите кратко идею и стадию проекта.
### Планируемые результаты
Опишите как вы видите результат проекта.
### Использование платформы "Клевер"
Опишите как в вашем проекте будет использоваться платформа "Клевер".
### Дополнительная информация по желанию участников
Например, информация об опыте работы команды над проектами, прикрепить ссылку на статьи, видео.
```
<!-- markdownlint-disable MD029 -->
```markdown
# Название проекта
[CopterHack-2022](copterhack2022.md), команда **Название команды**.
## Информация о команде
Состав команды:
(Опишите состав команды: имя и фамилия, контакты (e-mail/имя пользователя в Telegram), роль в команде).
* Александр Соколов, @aleksandrsokolov111, инженер.
* Елена Смирнова, @elenasmirnova111, программист.
## Описание проекта
### Идея проекта
Опишите кратко идею и стадию проекта.
### Планируемые результаты
Опишите как вы видите результат проекта.
### Использование платформы "Клевер"
Опишите как в вашем проекте будет использоваться платформа "Клевер".
### Дополнительная информация по желанию участников
Например, информация об опыте работы команды над проектами, прикрепить ссылку на статьи, видео.
```
5. Перейдите вниз страницы и создайте новую ветку с названием вашей статьи:
@@ -123,7 +154,9 @@ CopterHack 2022 — это международный конкурс по ра
8. В комментариях Pull Request вам будет дана обратная связь по заявке. На страничке конкурса в разделе "Проекты участников конкурса" будет опубликована ссылка на вашу заявку в вашем форке.
9. На протяжении конкурса вы будете работать над этим документом, приближая его к состоянию статьи. В документе будет видна история разработки и ежемесячные апдейты. К финалу конкурса вы сможете опубликовать вашу статью, это и будет результат вашей работы в CopterHack.
9. Обратите внимание на блок *Checks*, в графе Documentation должна стоять галочка. Если там стоит крестик, перейдите по ссылке *Details*, чтобы увидеть список проблем с оформлением статьи. При необходимости изменения добавляемых файлов, меняйте их в вашей ветке изменения будут появляться в Pull Request автоматически. **Не создавайте новый Pull Request для одной и той же заявки**.
10. На протяжении конкурса вы будете работать над этим документом, приближая его к состоянию статьи. В документе будет видна история разработки и ежемесячные апдейты. К финалу конкурса вы сможете опубликовать вашу статью, это и будет результат вашей работы в CopterHack.
Как только ссылка на заявку будет добавлена на эту страничку в раздел "Проекты участников конкурса", ваша команда стала официальным участником CopterHack 2022!
@@ -131,10 +164,6 @@ CopterHack 2022 — это международный конкурс по ра
> **Info** Ограничения по возрасту, образованию и количеству человек в команде отсутствуют.
## Проекты участников конкурса
Заявки будут публиковаться по мере поступления.
---
По всем вопросам: [CopterHack 2022](https://t.me/CopterHack).

View File

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

View File

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

View File

@@ -17,7 +17,7 @@
## Высокоуровневое управление лентой {#set_effect}
1. Для работы с лентой подключите ее к питанию +5v 5v, земле GND GND и сигнальному порту DIN GPIO21. Обратитесь [к инструкции по сборке](assemble_4_2.md#установка-led-ленты) для подробностей.
2. Включите поддержку LED-ленты в файле `~/catkin_ws/src/clever/clever/launch/clover.launch`:
2. Включите поддержку LED-ленты в файле `~/catkin_ws/src/clover/clover/launch/clover.launch`:
```xml
<arg name="led" default="true"/>

View File

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

View File

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

View File

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

View File

@@ -51,8 +51,6 @@ python3 flight.py
Пример программы для полета (взлет, пролет вперед, посадка):
```python
# coding: utf8
import rospy
from clover import srv
from std_srvs.srv import Trigger

View File

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

View File

@@ -24,7 +24,7 @@
Для начала проверим и попробуем подключиться к Raspberry по сети Wi-Fi. Узнать подключается ли Raspberry, а также узнать его IP-address для дальнейшей работы. Подключаемся к маршрутизатору по локальному адресу 192.168.0.1, затем переходим к списку подключённых устройств и находим устройство с названием: cloverXXXX, где Х любое число.
![Список клиентов, подключённых к маршрутизатору](https://user-images.githubusercontent.com/60854798/111508088-e1917480-877d-11eb-80c1-58a0fd6df65b.jpg)
![Список клиентов, подключённых к маршрутизатору](../assets/dhcp.jpg)
## Удаленное управление

View File

@@ -1,33 +1,28 @@
ROS
===
# ROS
Основная статья: http://wiki.ros.org
<img src="../assets/ros.svg" width="200" align="right">
ROS – это широко используемый фреймворк для создания сложных и распределенных робототехнических систем.
Основная документация: https://wiki.ros.org.
Установка
---
**ROS** это широко используемый фреймворк для создания сложных, распределенных робототехнических систем. На ROS основана [программная платформа Клевера](programming.md).
Основная статья: http://wiki.ros.org/melodic/Installation/Ubuntu
## Установка
ROS уже установлен на [образе для RPi](image.md).
ROS уже установлен на [образе для RPi для Клевера](image.md).
Для использования ROS на компьютере рекомендуется ОС Ubuntu Linux (либо виртуальная машина, например [Parallels Desktop Lite](https://itunes.apple.com/ru/app/parallels-desktop-lite/id1085114709?mt=12) или [VirtualBox](https://www.virtualbox.org)).
Для установки инструментов ROS на компьютере вы можете обратиться к [официальной документации](https://wiki.ros.org/noetic/Installation/Ubuntu) по установке. Для быстрого старта рекомендуется воспользоваться [образом виртуальной машины с ROS и симулятором Клевера](simulation_vm.md).
> **Note** Для дистрибутива ROS Melodic рекомендуется Ubuntu версии 18.04.
Концепции
---
## Концепции
### Ноды
Основная статья: http://wiki.ros.org/Nodes
Основная статья: https://wiki.ros.org/Nodes.
ROS-нода это специальная программа (обычно написанная на Python или C++), которая взаимодействует с другими нодами посредством ROS-топиков и ROS-сервисов. Разделение сложных робототехнических систем на изолированные ноды дает определенные преимущества: понижается связанность кода, повышается переиспользуемость и надежность.
ROS-нода[^1] это специальная программа (обычно написанная на Python или C++), которая взаимодействует с другими нодами посредством ROS-топиков и ROS-сервисов. Разделение сложных робототехнических систем на изолированные ноды дает определенные преимущества: понижается связанность кода, повышается переиспользуемость и надежность.
Очень многие робототехнические библиотеки и драйвера выполнены именно в виде ROS-нод.
Для того, чтобы превратить обычную программу в ROS-ноду, необходимо подключить к ней библиотеку `rospy` или `roscpp` и добавить инициализирующий код.
Для того, чтобы превратить обычную программу в ROS-ноду, необходимо подключить к ней библиотеку `rospy` (Python) или `roscpp` (C++) и добавить инициализирующий код.
Пример ROS-ноды на языке Python:
@@ -39,22 +34,36 @@ rospy.init_node('my_ros_node') # имя ROS-ноды
rospy.spin() # входим в бесконечный цикл...
```
> **Info** Любая [программа для автономного полета Клевера](programming.md) является ROS-нодой.
### Топики
Основная статья: http://wiki.ros.org/Topics
Основная статья: https://wiki.ros.org/Topics.
Топик это именованная шина данных, по которой ноды обмениваются сообщениями. Любая нода может *опубликовать* сообщение в произвольный топик, а также *подписаться* на произвольный топик.
Пример публикации сообщения типа [`std_msgs/String`](http://docs.ros.org/api/std_msgs/html/msg/String.html) (строка) в топик `/foo` на языке Python:
Для каждого созданного топика должен быть задан тип сообщений, которые по нему передаются. ROS включает в себя большое количество стандартных типов сообщений, покрывающих различные аспекты робототехники, но при необходимости возможно создание собственных типов сообщений. Примеры стандартных типов сообщений:
|Тип сообщения|Описание|
|-|-|
|[`std_msgs/Int64`](https://docs.ros.org/api/std_msgs/html/msg/Int64.html)|Целое число.|
|[`std_msgs/Float64`](https://docs.ros.org/api/std_msgs/html/msg/Float64.html)|Число с плавающей точкой (дробное) двойной точности.|
|[`std_msgs/String`](https://docs.ros.org/api/std_msgs/html/msg/String.html)|Строка.|
|[`geometry_msgs/PoseStamped`](https://docs.ros.org/api/geometry_msgs/html/msg/PoseStamped.html)|Позиция и ориентация объекта с заданной [системой координат](frames.md) и временной меткой (широко используется для передачи текущей позиции робота и его частей).|
|[`geometry_msgs/TwistStamped`](https://docs.ros.org/api/geometry_msgs/html/msg/TwistStamped.html)|Линейная и угловая скорость объекта с заданной системой координат и временной меткой.|
|[`sensor_msgs/Image`](https://docs.ros.org/api/sensor_msgs/html/msg/Image.html)|Изображение (см. [статью о работе с камерой](camera.md))|
> **Info** Смотрите остальные стандартные типы сообщений в пакетах [`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) и других.
Пример публикации сообщения типа [`std_msgs/String`](https://docs.ros.org/api/std_msgs/html/msg/String.html) (строка) в топик `/foo` на языке Python:
```python
import rospy
from std_msgs.msg import String
# ...
rospy.init_node('my_ros_node')
foo_pub = rospy.Publisher('/foo', String, queue_size=1) # создаем Publisher'а
# ...
foo_pub = rospy.Publisher('/foo', String, queue_size=1) # создаем Publisher
foo_pub.publish(data='Hello, world!') # публикуем сообщение
```
@@ -62,31 +71,51 @@ foo_pub.publish(data='Hello, world!') # публикуем сообщение
Пример подписки на топик `/foo`:
```python
import rospy
from std_msgs.msg import String
rospy.init_node('my_ros_node')
def foo_callback(msg):
print(msg.data)
# Подписываемся. При получении сообщения в топик /foo будет вызвана функция foo_callback.
rospy.Subscriber('/foo', String, foo_callback)
rospy.spin() # входим в бесконечный цикл, чтобы программа не завершила работу
```
Также, существует возможность работы с топиками с помощью утилиты `rostopic`. Например, с помощью следующей команды можно просматривать сообщения, публикуемые в топик `/mavros/state`:
Вы можете прочитать данные из топика однократно, используя функцию `wait_for_message`:
```python
msg = rospy.wait_for_message('/foo', String, timeout=3) # ждать сообщения в топике /foo в таймаутом 3 с
```
Также существует возможность работы с топиками с помощью утилиты `rostopic`. Например, с помощью следующей команды можно просматривать сообщения, публикуемые в топик `/mavros/state`:
```bash
rostopic echo /mavros/state
```
Команда `rostopic info` позволяет узнать тип сообщений в топике, команда `rostopic hz` — частоту публикуемых в топике сообщений.
Также данные в топиках можно визуализировать и в [графических инструментах ROS](rviz.md).
### Сервисы
Основная статья: http://wiki.ros.org/Services
Основная статья: https://wiki.ros.org/Services.
Сервис – это некоторый аналог функции, которая может быть вызвана из одной ноды, а обработана в другой. У сервиса есть имя, аналогичное имени топика, и 2 типа сообщений: тип запроса и тип ответа.
Таким образом, сервисы реализуют паттерн [*удаленного вызова процедур*](https://ru.wikipedia.org/wiki/Удалённый_вызов_процедур).
Пример вызова ROS-сервиса из языка Python:
```python
import rospy
from clover.srv import GetTelemetry
# ...
rospy.init_node('my_ros_node')
# Создаем обертку над сервисом get_telemetry пакета clover с типом GetTelemetry:
get_telemetry = rospy.ServiceProxy('get_telemetry', srv.GetTelemetry)
@@ -103,9 +132,62 @@ rosservice call /get_telemetry "{frame_id: ''}"
Больше примеров использования сервисов для автономных полетов квадрокоптера Клевер можно посмотреть в [документации ноды simple_offboard](simple_offboard.md).
Работа на нескольких машинах
---
### Имена
Основная статья: http://wiki.ros.org/ROS/Tutorials/MultipleMachines.
Основная статья: https://wiki.ros.org/Names.
Любой топик, сервис или параметр идентифицируется с помощью уникального имени. ROS-имя представляет собой иерархическую структуру с символом `/` в качестве разделителя (сходно с именами в файловой системе).
Примеры ROS-имен:
* `/` (глобальное пространство имен)
* `/foo`
* `/stanford/robot/name`
* `/wg/node1`
Эти имена является глобальными (аналогично полному пути в файлу в файловой системе). На практике рекомендуется использование *приватных* или *относительных* имен.
#### Приватное имя
Каждая нода может использовать собственное приватное пространство имен (соответствующее имени ноды) для своих ресурсов. Например, нода `aruco_detect` может публиковать такие топики:
* `/aruco_detect/markers`
* `/aruco_detect/visualization`
* `/aruco_detect/debug`
Когда нода ссылается на свой приватный ресурс, вместо пространства имен (`/aruco_detect/`) используется символ `~`, например:
* `~markers`
* `~visualization`
* `~debug`
Таким образом, создание топика `foo` в приватном пространство имен из Python будет выглядеть так:
```python
private_foo_pub = rospy.Publisher('~foo', String, queue_size=1)
```
#### Относительное имя
Несколько нод также могут объединяться в общее пространство имен (например, при одновременной работе нескольких роботов). Для того, чтобы ссылаться на топики с учетом общего пространства имен, в названии ресурса опускается начальный символ `/`.
Пример создание топика `foo` с учетом общего пространства имен:
```python
relative_foo_pub = rospy.Publisher('foo', String, queue_size=1)
```
> **Hint** В общем случае всегда рекомендуется использовать приватные или относительные имена ресурсов и никогда не использовать глобальные.
## Работа на нескольких машинах
Основная статья: https://wiki.ros.org/ROS/Tutorials/MultipleMachines.
Преимуществом использования ROS является возможность распределения нод на несколько машин в сети. Например, ноду, осуществляющую распознавание образом на изображении можно запустить на более мощном компьютере; ноду, управляющую коптером можно запустить непосредственно на Raspberry Pi, подключенном к полетному контроллеру и т. д.
## Дополнительные материалы
* Учебник по ROS от Voltbro - http://docs.voltbro.ru/starting-ros/.
* Другие книги по ROS - https://wiki.ros.org/Books.
[^1]: Также встречается перевод "узел".

View File

@@ -9,22 +9,20 @@
Для использования rviz и rqt необходим компьютер с ОС Ubuntu Linux (либо виртуальная машина, например [Parallels Desktop Lite](https://itunes.apple.com/ru/app/parallels-desktop-lite/id1085114709?mt=12) или [VirtualBox](https://www.virtualbox.org)).
> **Hint** Вы можете можете использовать готовый [образ виртуальной машины](simulation_vm.md) с инструментами для Клевера.
На него необходимо установить пакет `ros-melodic-desktop-full` или `ros-melodic-desktop`, используя [документацию по установке](http://wiki.ros.org/melodic/Installation/Ubuntu).
Запуск rviz
---
Для запуска визуализация состояния Клевера в реальном времени, необходимо подключиться к нему по Wi-Fi (`clover-xxx`) и запустить rviz, указав соответствующий ROS_MASTER_URI:
Для запуска визуализация состояния Клевера в реальном времени, необходимо подключиться к нему по [Wi-Fi](wifi.md) (`clover-xxxx`) и запустить rviz, указав соответствующий ROS_MASTER_URI:
```bash
ROS_MASTER_URI=http://192.168.11.1:11311 rviz
```
Если соединение не устанавливается, необходимо убедиться, что в `.bashrc` Клевера присутствует строка:
```bash
export ROS_HOSTNAME=`hostname`.local
```
> **Note** В случае использования виртуальной машины для использования rviz и других инструментов может быть необходимо поменять ее сетевую конфигурацию на режим *bridge* ([см. подробности для 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)).
Использование rviz
---

View File

@@ -16,33 +16,26 @@
<img src="../assets/pix-sd.png" alt="Pixracer и MicroSD-карта" class="zoom center" width=400>
* Установите карту в компьютер (используйте адаптер при необходимости).
* Отформатируйте карту в файловую систему FAT32. Для этого кликните на значок SD-карты в "Проводнике" и нажмите "Форматирование" в Windows. Используйте "Дисковую утилиту" в macOS.
* Выполните "Безопасное извлечение" карты, извлеките карту.
* Установите карту в полетный контроллер.
1. Установите карту в компьютер (используйте адаптер при необходимости).
2. Отформатируйте карту в файловую систему FAT32. Для этого кликните на значок SD-карты в "Проводнике" и нажмите "Форматирование" в Windows. Используйте "Дисковую утилиту" в macOS.
3. Выполните "Безопасное извлечение" карты, извлеките карту.
4. Установите карту в полетный контроллер.
## Загрузка прошивки в полетный контроллер
Основная статья: https://docs.qgroundcontrol.com/en/SetupView/Firmware.html.
Для использования всех наиболее актуальных функций PX4 используйте последнюю версию прошивки PX4 (*1.12+*).
> **Note** Перед осуществлением перепрошивки Pixracer не должен быть подключен к компьютеру по USB.
> **Note** Альтернативой является использование более старой прошивки (*1.8.2*) [с патчами COEX](firmware.md). В этой прошивке функциональность автономных полетов является более оттестированной и отлаженной. Прошивка может быть скачана с GitHub — **<a class="latest-firmware v4" href="https://github.com/CopterExpress/Firmware/releases">Скачать</a>**.
Для Клевера, в особенности для осуществления автономных полетов, рекомендуется использовать версию прошивки PX4 от Copter Express. Скачайте актуальную версию прошивки на GitHub — **<a class="latest-firmware v4" href="https://github.com/CopterExpress/Firmware/releases">скачать</a>**.
> **Info** Для квадрокоптеров с Pixhawk (Клевер 2) существует отдельная версия прошивки. Подробности смотрите в статье "[Прошивка полетного контроллера](firmware.md)".
Загрузите прошивку в полетный контролер:
1. Отключите полетный контроллер от компьютера (если он подключен).
2. Запустите программу QGroundControl.
3. Перейдите в панель *Vehicle Setup* (кликнув на логотип QGroundControl в левом верхнем углу) и выберите меню *Firmware*.
4. Подключите полетный контроллер к компьютеру по USB.
5. Выберите в появившемся меню справа *PX4 Flight Stack*.
<img src="../assets/qgc-firmware.png" alt="QGroundControl firmware upload" class="zoom">
1. Запустите программу QGroundControl.
2. Зайдите во вкладку *Vehicle Setup*.
3. Выберите меню *Firmware*.
4. Подключите Pixracer к компьютеру по USB.
5. Дождитесь подключения Pixracer к QGroundControl.
6. Выберите в меню справа *PX4 Flight Stack*.
Для загрузки прошивки от Copter Express (рекомендуется):
Для загрузки прошивки COEX:
* Выберите *Advanced settings*.
* В выпадающем меню выберите *Custom firmware file...*

View File

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

View File

@@ -1,6 +1,6 @@
# Симуляция PX4
> **Hint** Мы также предоставляем [конфигурации для Gazebo](simulation.md) и [образ виртуальной машины](simulation_vm.md) со всем необходимым для запуска симуляции Клевера.
> **Warning** Это статья описывает только установку PX4 и **является устаревшей**. Используйте официальную [конфигурацию для Gazebo](simulation.md) или [образ виртуальной машины](simulation_vm.md) со всем необходимым для запуска симуляции Клевера.
Основная статья: https://dev.px4.io/en/simulation/

View File

@@ -417,3 +417,45 @@ while not rospy.is_shutdown():
break
rospy.sleep(0.2)
```
### # {#get-param}
Считать параметр полетного контроллера:
```python
from mavros_msgs.srv import ParamGet
from mavros_msgs.msg import ParamValue
# ...
param_get = rospy.ServiceProxy('mavros/param/get', ParamGet)
# ...
# Считать параметр типа INT
value = param_get(param_id='COM_FLTMODE1').value.integer
# Считать параметр типа FLOAT
value = param_get(param_id='MPC_Z_P').value.float
```
### # {#set-param}
Изменить параметр полетного контроллера:
```python
from mavros_msgs.srv import ParamSet
from mavros_msgs.msg import ParamValue
# ...
param_set = rospy.ServiceProxy('mavros/param/set', ParamSet)
# ...
# Изменить параметр типа INT:
param_set(param_id='COM_FLTMODE1', value=ParamValue(integer=8))
# Изменить параметр типа FLOAT:
param_set(param_id='MPC_Z_P', value=ParamValue(real=1.5))
```

View File

@@ -4,7 +4,7 @@
## Дальномер HC-SR04
<img src="../assets/hc-sr04.jpg" alt="hc-sr04" width=200>
<img src="../assets/hc-sr04.jpg" alt="HC-SR04" width=200>
## Установка

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

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

View File

@@ -26,7 +26,7 @@
{ "from": "rc.html", "to": "ru/rc.html" },
{ "from": "web_video_server.html", "to": "ru/web_video_server.html" },
{ "from": "frames.html", "to": "ru/frames.html" },
{ "from": "ros.html", "to": "ru/ros.html" },
{ "from": "ros.html", "to": "en/ros.html" },
{ "from": "mavros.html", "to": "ru/mavros.html" },
{ "from": "simple_offboard.html", "to": "ru/simple_offboard.html" },
{ "from": "aruco/", "to": "en/aruco.html" },
@@ -63,6 +63,7 @@
{ "from": "power/", "to": "en/power.html" },
{ "from": "connection/", "to": "en/connection.html" },
{ "from": "clover_vm/", "to": "en/simulation_vm.html" },
{ "from": "gpio/", "to": "en/gpio.html" },
{ "from": "ru/microsd_images.html", "to": "image.html" },
{ "from": "en/microsd_images.html", "to": "image.html" }