Compare commits

..

1 Commits

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

View File

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

View File

@@ -13,7 +13,7 @@
# copies or substantial portions of the Software.
#
set -ex # exit on error, echo commands
set -e # Exit immidiately on non-zero result
REPO=$1
REF=$2

View File

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

View File

@@ -26,7 +26,6 @@ cd /home/pi/catkin_ws/src/clover/builder/test/
./tests.sh
./tests.py
./tests_py3.py
./test_pigpio.py
[[ $(./test_qr.py) == "Found QRCODE with data Проверка Unicode with center at x=66.0, y=66.0" ]]
[[ $(./tests_clever.py) == "Warning: clever package is renamed to clover" ]] # test backwards compatibility

View File

@@ -1,6 +0,0 @@
#!/usr/bin/env python3
import pigpio
pi = pigpio.pi()
pi.set_mode(24, pigpio.OUTPUT)
pi.write(24, True)

View File

@@ -43,8 +43,6 @@ from mavros import mavlink
rospy.init_node('selfcheck')
os.environ['ROSCONSOLE_FORMAT']='[${severity}]: ${message}'
tf_buffer = tf2_ros.Buffer()
tf_listener = tf2_ros.TransformListener(tf_buffer)
@@ -620,7 +618,7 @@ def check_boot_duration():
@check('CPU usage')
def check_cpu_usage():
WHITELIST = 'nodelet', 'gzclient', 'gzserver'
WHITELIST = 'nodelet',
CMD = "top -n 1 -b -i | tail -n +8 | awk '{ printf(\"%-8s\\t%-8s\\t%-8s\\n\", $1, $9, $12); }'"
output = subprocess.check_output(CMD, shell=True).decode()
processes = output.split('\n')
@@ -755,7 +753,7 @@ def check_rpi_health():
# with some of the FLAGs OR'ed together
output = subprocess.check_output(['vcgencmd', 'get_throttled']).decode()
except OSError:
info('could not call vcgencmd binary; not a Raspberry Pi?')
failure('could not call vcgencmd binary; not a Raspberry Pi?')
return
throttle_mask = int(output.split('=')[1], base=16)

View File

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

View File

@@ -53,6 +53,29 @@ function viewTopic(topic) {
});
}
function viewParameters() {
title.innerHTML = 'Parameters';
topicMessage.style.display = 'block';
let names = ['aruco_detect', 'main_camera', 'main_camera_nodelet_manager', 'mavros', 'optical_flow',
'rangefinder', 'rosapi', 'rosbridge_websocket', 'rosdistro', 'roslaunch', 'rosversion',
'roswww_static', 'run_id', 'simple_offboard', 'visualization', 'web_video_server'];
let params = {};
// ros.getParams(function(params) {
Promise.all(names.map(function(name) {
return new Promise(function(resolve, reject) {
new ROSLIB.Param({ ros, name }).get(function(value) {
params[name] = value;
resolve();
})
});
})).then(function() {
console.log(params);
topicMessage.innerHTML = yamlStringify(params);
});
}
let mouseDown;
topicMessage.addEventListener('mousedown', function() { mouseDown = true; });
@@ -61,6 +84,9 @@ topicMessage.addEventListener('mouseup', function() { mouseDown = false; });
function init() {
const params = Object.fromEntries(new URLSearchParams(window.location.search).entries());
viewParameters();
return;
if (!params.topic) {
viewTopicsList();
} else {
@@ -70,3 +96,5 @@ function init() {
});
}
}
window.ros = ros;

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

View File

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

Before

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -8,37 +8,6 @@ You can see the articles of the CopterHack 2021 finalist teams by the link [Copt
The proposed projects have to be open-source and be compatible with the Clover quadcopter platform. Teams will work on their projects throughout the competition, bringing them closer to the state of the finished product. Industry experts will assist the participants through lectures and regular feedback.
## Projects of the contest's participants {#participants}
|Place|Team|Project|Points|
|-|-|-|-|
||🇰🇬 Alatoo University Team|[Облачная платформа для симулятора Клевера](https://github.com/pteacher/clover/blob/clover_simulator/docs/ru/clover-development-studio.md)||
||🇧🇾 FTL|[Advanced Clover 2](https://github.com/FTL-team/clover/blob/FTL-advancedClover2/docs/ru/advancedclover2.md)||
||🇺🇸 EnviroFleet|[EnviroFleet](https://github.com/gueyman/clover/blob/envirofleet/docs/en/enviro_fleet.md)||
||🇻🇳 Dragon&Tanker|[Dragon&Tanker](https://github.com/uml4/clover/blob/drone_observe_autonomous_car/docs/en/dragon_and_tanker_team.md)||
||🇷🇺 Stereo|[Neural obstacle avoidance](https://github.com/den250400/clover/blob/neural-obstacle-avoidance/docs/en/neural-obstacle-avoidance.md)||
||🇷🇺 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)||
||🇷🇺 Бизнес-гуси|[Drone Rover Climbing System](https://github.com/HexaHEX/clover/blob/CopterHack2022_Business_Geese-1/docs/ru/business_geese.md)||
||🇷🇺 fuall|[Доставка дронами](https://github.com/Silly4s/clover/blob/master/docs/ru/dostavka.md)||
||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)||
||🇷🇺 Джедаи 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)||
||🇷🇺 Scout_Drone|[Создание поисково-спасательного беспилотного летательного аппарата](https://github.com/MustafaNatur/clover/blob/Scout_Drone.md/docs/ru/scout_drone.md)||
||🇷🇺 С305|[Система мониторинга воздуха](https://github.com/Ruslan2288/clover/blob/master/docs/ru/air_monitor.md)|&nbsp;|
## Company case competition
Teams are welcome to dive into the development of the following company cases:
@@ -105,38 +74,40 @@ Prepare your application and send it as a Draft Pull Request to [Clover reposito
4. Fill out your application by the recommended template:
```markdown
# Project name
[CopterHack-2022](copterhack2022.md), team **Team name**.
## Team information
The list of team members:
(Describe the team: full name, contacts (e-mail/Telegram username), role in the team).
* Alexander Sokolov, @aleksandrsokolov111, engineer.
* Elena Smirnova, @elenasmirnova111, programmer.
## Project description
### Project idea
Briefly describe the idea and stage of the project.
### The potential outcomes
Describe how you see the project result.
### Using Clover platform
Describe how the Clover platform will be used in your project.
### Additional information at the request of participants
For example, information about the team's experience working on projects, attach a link to articles, videos.
```
```markdown
# Project name
[CopterHack-2022](copterhack2022.md), team **Team name**.
## Team information
The list of team members:
(Describe the team: full name, contacts (e-mail/Telegram username), role in the team).
* Alexander Sokolov, @aleksandrsokolov111, engineer.
* Elena Smirnova, @elenasmirnova111, programmer.
## Project description
### Project idea
Briefly describe the idea and stage of the project.
### The potential outcomes
Describe how you see the project result.
### Using Clover platform
Describe how the Clover platform will be used in your project.
### Additional information at the request of participants
For example, information about the team's experience working on projects, attach a link to articles, videos.
```
<!-- markdownlint-disable MD029 -->
5. Go to the bottom of the page and create a new branch with the title of your article:
@@ -152,9 +123,7 @@ Prepare your application and send it as a Draft Pull Request to [Clover reposito
8. In the Pull Request comments, you will be given feedback on the application. On the contest page, in the section "Projects of the contest participants", a link to your application in your fork will be published.
9. Note the *Checks* block at the bottom, a check mark should appear in the *Documentation* field. If a cross appeared, click *Details* link to see the list of issues in you article found by markdownlint. If you need to change added files, edit them in you branch changes will appear in the Pull Request automatically. **Do not open a new Pull Request for the same application**.
10. During the contest, you will work on this document, bringing it closer to the state of the finished article. By the end of the contest, you will publish your article, which will be the result of your work in CopterHack 2022.
9. During the contest, you will work on this document, bringing it closer to the state of the finished article. By the end of the contest, you will publish your article, which will be the result of your work in CopterHack 2022.
As soon as the link to the application is added to this page in the section "Projects of the contest's participants", your team has become an official participant of the CopterHack 2022!
@@ -162,6 +131,10 @@ Contest participants will be added to the special Telegram group, where one can
> **Info** There are no restrictions on the age, education, and number of people in the team.
## Projects of the contest's participants
Applications will be published as they will become available.
---
For all questions: [CopterHack 2022](https://t.me/CopterHack).

View File

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

View File

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

View File

@@ -22,7 +22,11 @@ To start the Clover state visualization in real time, connect to it [via Wi-Fi](
ROS_MASTER_URI=http://192.168.11.1:11311 rviz
```
> **Note** In case of using a virtual machine for using rviz and other tools it might be necessary to change its network configuration to *bridge* mode ([see details for VMware](https://docs.vmware.com/en/VMware-Workstation-Player-for-Windows/16.0/com.vmware.player.win.using.doc/GUID-826323AD-D014-475D-8909-DFA73B5A3A57.html)).
If connection is not established, make sure the `.bashrc` of Clover contains line:
```(bash)
export ROS_HOSTNAME=`hostname`.local
```
Using rviz
---

View File

@@ -2,9 +2,7 @@
Setting up the simulation environment from scratch requires some effort, but results in the most performant setup, with less chance of driver issues.
> **Hint** See up-to-date commands set for installation Clover simulation software in the script, that builds the virtual machine image with the simulator: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh).
Prerequisites: Ubuntu 20.04 and [ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu).
Prerequisites: Ubuntu 18.04, [native ROS installation](ros-install.md).
## Create a workspace for the simulation
@@ -15,9 +13,8 @@ Create the workspace and clone Clover sources:
```bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone --depth 1 https://github.com/CopterExpress/clover
git clone --depth 1 https://github.com/CopterExpress/ros_led
git clone --depth 1 https://github.com/ethz-asl/mav_comm
git clone https://github.com/CopterExpress/clover
git clone https://github.com/CopterExpress/ros_led
```
Install all prerequisites using `rosdep`:
@@ -28,21 +25,14 @@ rosdep update
rosdep install --from-paths src --ignore-src -y
```
Install Python-dependencies:
```bash
sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt
```
## Get PX4 sources
PX4 will be built along with the other packages in our workspace. You may clone it directly into the workspace or put it somewhere and symlink to `~/catkin_ws/src`. We will need to put its `sitl_gazebo` submodule in `~/catkin_ws/src` as well. For simplicity's sake we will clone the firmware directly to the workspace:
```bash
cd ~/catkin_ws/src
git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/PX4-Autopilot
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/sitl_gazebo
git clone --recursive https://github.com/CopterExpress/Firmware -b v1.10.1-clever
ln -s Firmware/Tools/sitl_gazebo ./sitl_gazebo
```
## Install PX4 prerequisites
@@ -50,7 +40,7 @@ ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/sitl_gazebo
PX4 comes with its own script for dependency installation. We may as well leverage it:
```bash
cd ~/catkin_ws/src/PX4-Autopilot/Tools/setup
cd ~/catkin_ws/src/Firmware/Tools/setup
sudo ./ubuntu.sh
```
@@ -62,20 +52,27 @@ You may want to skip installing the ARM toolchain if you're not planning on comp
sudo ./ubuntu.sh --no-nuttx
```
## Add the Clover airframe
## Patch Gazebo plugins
Add the Clover airframe to PX4 using the command:
The `sitl_gazebo` package containing required Gazebo plugins needs patching due to recent changes in MAVLink. These patches are already preapplied in the [virtual machine image](simulation_vm.md) and are stored in the VM repository. Run the following commands to download and apply the patches:
```bash
ln -s "$(catkin_find clover_simulation airframes)"/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
cd ~/catkin_ws/src/Firmware/Tools/sitl_gazebo
wget https://raw.githubusercontent.com/CopterExpress/clover_vm/master/assets/patches/sitl_gazebo.patch
patch -p1 < sitl_gazebo.patch
rm sitl_gazebo.patch
```
## Install geographiclib datasets
`mavros` package requires geographiclib datasets to be present:
`mavros` requires geographiclib datasets to be present:
```bash
sudo /opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh
cd ~
wget https://raw.githubusercontent.com/mavlink/mavros/6f5bd5a1a67c19c2e605f33de296b1b1be9d02fc/mavros/scripts/install_geographiclib_datasets.sh
chmod +x ./install_geographiclib_datasets.sh
sudo ./install_geographiclib_datasets.sh
rm ./install_geographiclib_datasets.sh
```
## Build the simulator

View File

@@ -8,37 +8,6 @@ CopterHack 2022 — это международный конкурс по ра
На конкурс принимаются проекты с открытым исходным кодом и совместимые с платформой квадрокоптера "Клевер". На протяжении конкурса команды работают на собственными идеями и разработками, приближая их к состоянию готового продукта. В этом участникам помогают эксперты отрасли через лекции и регулярную обратную связь.
## Проекты участников конкурса {#participants}
|Место|Команда|Проект|Балл|
|-|-|-|-|
||🇰🇬 Alatoo University Team|[Облачная платформа для симулятора Клевера](https://github.com/pteacher/clover/blob/clover_simulator/docs/ru/clover-development-studio.md)||
||🇧🇾 FTL|[Advanced Clover 2](https://github.com/FTL-team/clover/blob/FTL-advancedClover2/docs/ru/advancedclover2.md)||
||🇺🇸 EnviroFleet|[EnviroFleet](https://github.com/gueyman/clover/blob/envirofleet/docs/en/enviro_fleet.md)||
||🇻🇳 Dragon&Tanker|[Dragon&Tanker](https://github.com/uml4/clover/blob/drone_observe_autonomous_car/docs/en/dragon_and_tanker_team.md)||
||🇷🇺 Stereo|[Neural obstacle avoidance](https://github.com/den250400/clover/blob/neural-obstacle-avoidance/docs/en/neural-obstacle-avoidance.md)||
||🇷🇺 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)||
||🇷🇺 Бизнес-гуси|[Drone Rover Climbing System](https://github.com/HexaHEX/clover/blob/CopterHack2022_Business_Geese-1/docs/ru/business_geese.md)||
||🇷🇺 fuall|[Доставка дронами](https://github.com/Silly4s/clover/blob/master/docs/ru/dostavka.md)||
||🇮🇳 DJS Phoenix|[Autonomous valet parking drone assistance](https://github.com/DJSPhoenix/clover/blob/DJSPhoenix-Ikshana/docs/en/djs_phoenix_ikshana.md)||
||🇷🇺 Джедаи 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)||
||🇷🇺 Scout_Drone|[Создание поисково-спасательного беспилотного летательного аппарата](https://github.com/MustafaNatur/clover/blob/Scout_Drone.md/docs/ru/scout_drone.md)||
||🇷🇺 С305|[Система мониторинга воздуха](https://github.com/Ruslan2288/clover/blob/master/docs/ru/air_monitor.md)|&nbsp;|
## Направление "кейс компании"
Команды приглашаются принять участие в работе над следующими кейсами компании:
@@ -105,38 +74,40 @@ CopterHack 2022 — это международный конкурс по ра
4. Оформите вашу заявку в соответствии с рекомендуемым шаблоном:
```markdown
# Название проекта
[CopterHack-2022](copterhack2022.md), команда **Название команды**.
## Информация о команде
Состав команды:
(Опишите состав команды: имя и фамилия, контакты (e-mail/имя пользователя в Telegram), роль в команде).
* Александр Соколов, @aleksandrsokolov111, инженер.
* Елена Смирнова, @elenasmirnova111, программист.
## Описание проекта
### Идея проекта
Опишите кратко идею и стадию проекта.
### Планируемые результаты
Опишите как вы видите результат проекта.
### Использование платформы "Клевер"
Опишите как в вашем проекте будет использоваться платформа "Клевер".
### Дополнительная информация по желанию участников
Например, информация об опыте работы команды над проектами, прикрепить ссылку на статьи, видео.
```
```markdown
# Название проекта
[CopterHack-2022](copterhack2022.md), команда **Название команды**.
## Информация о команде
Состав команды:
(Опишите состав команды: имя и фамилия, контакты (e-mail/имя пользователя в Telegram), роль в команде).
* Александр Соколов, @aleksandrsokolov111, инженер.
* Елена Смирнова, @elenasmirnova111, программист.
## Описание проекта
### Идея проекта
Опишите кратко идею и стадию проекта.
### Планируемые результаты
Опишите как вы видите результат проекта.
### Использование платформы "Клевер"
Опишите как в вашем проекте будет использоваться платформа "Клевер".
### Дополнительная информация по желанию участников
Например, информация об опыте работы команды над проектами, прикрепить ссылку на статьи, видео.
```
<!-- markdownlint-disable MD029 -->
5. Перейдите вниз страницы и создайте новую ветку с названием вашей статьи:
@@ -152,9 +123,7 @@ CopterHack 2022 — это международный конкурс по ра
8. В комментариях Pull Request вам будет дана обратная связь по заявке. На страничке конкурса в разделе "Проекты участников конкурса" будет опубликована ссылка на вашу заявку в вашем форке.
9. Обратите внимание на блок *Checks*, в графе Documentation должна стоять галочка. Если там стоит крестик, перейдите по ссылке *Details*, чтобы увидеть список проблем с оформлением статьи. При необходимости изменения добавляемых файлов, меняйте их в вашей ветке изменения будут появляться в Pull Request автоматически. **Не создавайте новый Pull Request для одной и той же заявки**.
10. На протяжении конкурса вы будете работать над этим документом, приближая его к состоянию статьи. В документе будет видна история разработки и ежемесячные апдейты. К финалу конкурса вы сможете опубликовать вашу статью, это и будет результат вашей работы в CopterHack.
9. На протяжении конкурса вы будете работать над этим документом, приближая его к состоянию статьи. В документе будет видна история разработки и ежемесячные апдейты. К финалу конкурса вы сможете опубликовать вашу статью, это и будет результат вашей работы в CopterHack.
Как только ссылка на заявку будет добавлена на эту страничку в раздел "Проекты участников конкурса", ваша команда стала официальным участником CopterHack 2022!
@@ -162,6 +131,10 @@ CopterHack 2022 — это международный конкурс по ра
> **Info** Ограничения по возрасту, образованию и количеству человек в команде отсутствуют.
## Проекты участников конкурса
Заявки будут публиковаться по мере поступления.
---
По всем вопросам: [CopterHack 2022](https://t.me/CopterHack).

View File

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

View File

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

View File

@@ -1,28 +1,33 @@
# ROS
ROS
===
<img src="../assets/ros.svg" width="200" align="right">
Основная статья: http://wiki.ros.org
Основная документация: https://wiki.ros.org.
ROS – это широко используемый фреймворк для создания сложных и распределенных робототехнических систем.
**ROS** это широко используемый фреймворк для создания сложных, распределенных робототехнических систем. На ROS основана [программная платформа Клевера](programming.md).
Установка
---
## Установка
Основная статья: http://wiki.ros.org/melodic/Installation/Ubuntu
ROS уже установлен на [образе для RPi для Клевера](image.md).
ROS уже установлен на [образе для RPi](image.md).
Для установки инструментов ROS на компьютере вы можете обратиться к [официальной документации](https://wiki.ros.org/noetic/Installation/Ubuntu) по установке. Для быстрого старта рекомендуется воспользоваться [образом виртуальной машины с ROS и симулятором Клевера](simulation_vm.md).
Для использования ROS на компьютере рекомендуется ОС Ubuntu Linux (либо виртуальная машина, например [Parallels Desktop Lite](https://itunes.apple.com/ru/app/parallels-desktop-lite/id1085114709?mt=12) или [VirtualBox](https://www.virtualbox.org)).
## Концепции
> **Note** Для дистрибутива ROS Melodic рекомендуется Ubuntu версии 18.04.
Концепции
---
### Ноды
Основная статья: https://wiki.ros.org/Nodes.
Основная статья: http://wiki.ros.org/Nodes
ROS-нода[^1] это специальная программа (обычно написанная на Python или C++), которая взаимодействует с другими нодами посредством ROS-топиков и ROS-сервисов. Разделение сложных робототехнических систем на изолированные ноды дает определенные преимущества: понижается связанность кода, повышается переиспользуемость и надежность.
ROS-нода это специальная программа (обычно написанная на Python или C++), которая взаимодействует с другими нодами посредством ROS-топиков и ROS-сервисов. Разделение сложных робототехнических систем на изолированные ноды дает определенные преимущества: понижается связанность кода, повышается переиспользуемость и надежность.
Очень многие робототехнические библиотеки и драйвера выполнены именно в виде ROS-нод.
Для того, чтобы превратить обычную программу в ROS-ноду, необходимо подключить к ней библиотеку `rospy` (Python) или `roscpp` (C++) и добавить инициализирующий код.
Для того, чтобы превратить обычную программу в ROS-ноду, необходимо подключить к ней библиотеку `rospy` или `roscpp` и добавить инициализирующий код.
Пример ROS-ноды на языке Python:
@@ -34,36 +39,22 @@ rospy.init_node('my_ros_node') # имя ROS-ноды
rospy.spin() # входим в бесконечный цикл...
```
> **Info** Любая [программа для автономного полета Клевера](programming.md) является ROS-нодой.
### Топики
Основная статья: https://wiki.ros.org/Topics.
Основная статья: http://wiki.ros.org/Topics
Топик это именованная шина данных, по которой ноды обмениваются сообщениями. Любая нода может *опубликовать* сообщение в произвольный топик, а также *подписаться* на произвольный топик.
Для каждого созданного топика должен быть задан тип сообщений, которые по нему передаются. 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:
Пример публикации сообщения типа [`std_msgs/String`](http://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!') # публикуем сообщение
```
@@ -71,51 +62,31 @@ 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() # входим в бесконечный цикл, чтобы программа не завершила работу
```
Вы можете прочитать данные из топика однократно, используя функцию `wait_for_message`:
```python
msg = rospy.wait_for_message('/foo', String, timeout=3) # ждать сообщения в топике /foo в таймаутом 3 с
```
Также существует возможность работы с топиками с помощью утилиты `rostopic`. Например, с помощью следующей команды можно просматривать сообщения, публикуемые в топик `/mavros/state`:
Также, существует возможность работы с топиками с помощью утилиты `rostopic`. Например, с помощью следующей команды можно просматривать сообщения, публикуемые в топик `/mavros/state`:
```bash
rostopic echo /mavros/state
```
Команда `rostopic info` позволяет узнать тип сообщений в топике, команда `rostopic hz` — частоту публикуемых в топике сообщений.
Также данные в топиках можно визуализировать и в [графических инструментах ROS](rviz.md).
### Сервисы
Основная статья: https://wiki.ros.org/Services.
Основная статья: http://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)
@@ -132,62 +103,9 @@ rosservice call /get_telemetry "{frame_id: ''}"
Больше примеров использования сервисов для автономных полетов квадрокоптера Клевер можно посмотреть в [документации ноды simple_offboard](simple_offboard.md).
### Имена
Работа на нескольких машинах
---
Основная статья: 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.
Основная статья: http://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

@@ -22,7 +22,11 @@
ROS_MASTER_URI=http://192.168.11.1:11311 rviz
```
> **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)).
Если соединение не устанавливается, необходимо убедиться, что в `.bashrc` Клевера присутствует строка:
```bash
export ROS_HOSTNAME=`hostname`.local
```
Использование rviz
---

View File

@@ -2,9 +2,7 @@
Настройка среды для симуляции с нуля требует некоторых усилий, однако это приведет к улучшению производительности и к уменьшению вероятности появления проблем с драйверами.
> **Hint** Смотрите актуальный набор команд установки необходимого ПО для запуска симулятора Клевера в скрипте сборки виртуальной машины с симулятором: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh).
Требования для сборки: Ubuntu 20.04 и [ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu).
Требования для сборки: установлены Ubuntu 18.04 и [ROS](ros-install.md).
## Создание рабочего пространства для симулятора
@@ -15,9 +13,8 @@
```bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone --depth 1 https://github.com/CopterExpress/clover
git clone --depth 1 https://github.com/CopterExpress/ros_led
git clone --depth 1 https://github.com/ethz-asl/mav_comm
git clone https://github.com/CopterExpress/clover
git clone https://github.com/CopterExpress/ros_led
```
Установите все зависимости, используя `rosdep`:
@@ -28,21 +25,14 @@ rosdep update
rosdep install --from-paths src --ignore-src -y
```
Установите Python-зависимости:
```bash
sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt
```
## Загрузка исходного кода PX4
Сборка PX4 будет осуществлена вместе с другими пакетами в нашем рабочем пространстве. Вы можете загрузить его прямо в рабочее пространство или поместить куда-нибудь и создать симлинк к `~/catkin_ws/src`. Нам также нужно будет поместить его подмодуль `sitl_gazebo` в `~/catkin_ws/src`. Для упрощения мы загрузим прошивку прямо в рабочее пространство:
```bash
cd ~/catkin_ws/src
git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/PX4-Autopilot
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/sitl_gazebo
git clone --recursive https://github.com/CopterExpress/Firmware -b v1.10.1-clever
ln -s Firmware/Tools/sitl_gazebo ./sitl_gazebo
```
## Установка зависимостей PX4
@@ -50,7 +40,7 @@ ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/sitl_gazebo
PX4 имеет свой собственный скрипт для установки зависимостей. Воспользуемся им:
```bash
cd ~/catkin_ws/src/PX4-Autopilot/Tools/setup
cd ~/catkin_ws/src/Firmware/Tools/setup
sudo ./ubuntu.sh
```
@@ -62,12 +52,15 @@ sudo ./ubuntu.sh
sudo ./ubuntu.sh --no-nuttx
```
## Добавление рамы Клевера
## Патчинг плагинов Gazebo
Добавьте в PX4 раму Клевера с помощью следующей команды:
Пакет `sitl_gazebo`, содержащий плагины нужно пропатчить, из-за недавних изменений в MAVLink. Эти патчи уже применены в [образе виртуальной машины](simulation_vm.md) и хранятся в репозитории CopterExpress/VM. Запустите следующие команды для загрузки и применения патчей:
```bash
ln -s "$(catkin_find clover_simulation airframes)"/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
cd ~/catkin_ws/src/Firmware/Tools/sitl_gazebo
wget https://raw.githubusercontent.com/CopterExpress/clover_vm/master/assets/patches/sitl_gazebo.patch
patch -p1 < sitl_gazebo.patch
rm sitl_gazebo.patch
```
## Установка датасетов geographiclib
@@ -75,7 +68,11 @@ ln -s "$(catkin_find clover_simulation airframes)"/* ~/PX4-Autopilot/ROMFS/px4fm
Для `mavros` нужны датасеты geographiclib:
```bash
sudo /opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh
cd ~
wget https://raw.githubusercontent.com/mavlink/mavros/6f5bd5a1a67c19c2e605f33de296b1b1be9d02fc/mavros/scripts/install_geographiclib_datasets.sh
chmod +x ./install_geographiclib_datasets.sh
sudo ./install_geographiclib_datasets.sh
rm ./install_geographiclib_datasets.sh
```
## Сборка симулятора

View File

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

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>
## Установка

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": "en/ros.html" },
{ "from": "ros.html", "to": "ru/ros.html" },
{ "from": "mavros.html", "to": "ru/mavros.html" },
{ "from": "simple_offboard.html", "to": "ru/simple_offboard.html" },
{ "from": "aruco/", "to": "en/aruco.html" },