mirror of
https://github.com/CopterExpress/clover.git
synced 2026-06-08 18:44:32 +00:00
Compare commits
35 Commits
v0.22-alph
...
v0.22-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
602c1eb20a | ||
|
|
cf7f083faf | ||
|
|
8d771cf51f | ||
|
|
a48d8264f4 | ||
|
|
533ab9423d | ||
|
|
0eb360d7f1 | ||
|
|
27be9eb281 | ||
|
|
7ca8cb44e0 | ||
|
|
a829dfdbcd | ||
|
|
e5a7d7d096 | ||
|
|
0ab8e33738 | ||
|
|
f8222e1028 | ||
|
|
dce0c00773 | ||
|
|
dc8c5d9db9 | ||
|
|
261faaec0e | ||
|
|
dbd9a4a238 | ||
|
|
a43c63fd21 | ||
|
|
80d446e857 | ||
|
|
609a7ab014 | ||
|
|
c0d9bd7ef0 | ||
|
|
cdd6000c58 | ||
|
|
480a9b1f0a | ||
|
|
4943cb94b0 | ||
|
|
e0ca1272bb | ||
|
|
cb88537ddc | ||
|
|
5870521b4b | ||
|
|
659380c575 | ||
|
|
b4a8119bd7 | ||
|
|
c72eb1b440 | ||
|
|
f825901a19 | ||
|
|
200c5dea57 | ||
|
|
0504569b0c | ||
|
|
9829ee2e72 | ||
|
|
dfdaf3aa4f | ||
|
|
63f979c2ff |
@@ -119,7 +119,7 @@ generate_messages(
|
|||||||
|
|
||||||
## Generate dynamic reconfigure parameters in the 'cfg' folder
|
## Generate dynamic reconfigure parameters in the 'cfg' folder
|
||||||
generate_dynamic_reconfigure_options(
|
generate_dynamic_reconfigure_options(
|
||||||
cfg/DetectorParams.cfg
|
cfg/Detector.cfg
|
||||||
)
|
)
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
@@ -159,9 +159,6 @@ add_library(aruco_pose
|
|||||||
|
|
||||||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_gencfg)
|
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_gencfg)
|
||||||
|
|
||||||
# FIXME: hack to fix https://travis-ci.org/github/CopterExpress/clover/jobs/766318908#L6532
|
|
||||||
string(REPLACE "-lpthreads;" "" catkin_LIBRARIES "${catkin_LIBRARIES}")
|
|
||||||
|
|
||||||
## Declare a C++ executable
|
## Declare a C++ executable
|
||||||
## With catkin_make all packages are built within a single CMake context
|
## With catkin_make all packages are built within a single CMake context
|
||||||
## The recommended prefix ensures that target names across packages don't collide
|
## The recommended prefix ensures that target names across packages don't collide
|
||||||
|
|||||||
11
builder/assets/examples/get_telemetry.py
Normal file
11
builder/assets/examples/get_telemetry.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Information: https://clover.coex.tech/en/simple_offboard.html#gettelemetry
|
||||||
|
|
||||||
|
import rospy
|
||||||
|
from clover import srv
|
||||||
|
|
||||||
|
rospy.init_node('flight')
|
||||||
|
|
||||||
|
get_telemetry = rospy.ServiceProxy('get_telemetry', srv.GetTelemetry)
|
||||||
|
|
||||||
|
# Print drone's state
|
||||||
|
print(get_telemetry())
|
||||||
@@ -135,7 +135,9 @@ my_travis_retry apt-get install -y --no-install-recommends \
|
|||||||
ros-${ROS_DISTRO}-usb-cam \
|
ros-${ROS_DISTRO}-usb-cam \
|
||||||
ros-${ROS_DISTRO}-vl53l1x \
|
ros-${ROS_DISTRO}-vl53l1x \
|
||||||
ros-${ROS_DISTRO}-ws281x \
|
ros-${ROS_DISTRO}-ws281x \
|
||||||
ros-${ROS_DISTRO}-rosshow
|
ros-${ROS_DISTRO}-rosshow \
|
||||||
|
ros-${ROS_DISTRO}-cmake-modules \
|
||||||
|
ros-${ROS_DISTRO}-image-view
|
||||||
|
|
||||||
# TODO move GeographicLib datasets to Mavros debian package
|
# TODO move GeographicLib datasets to Mavros debian package
|
||||||
echo_stamp "Install GeographicLib datasets (needed for mavros)" \
|
echo_stamp "Install GeographicLib datasets (needed for mavros)" \
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ my_travis_retry pip3 install --prefer-binary rpi_ws281x
|
|||||||
echo_stamp "Setup Monkey"
|
echo_stamp "Setup Monkey"
|
||||||
mv /etc/monkey/sites/default /etc/monkey/sites/default.orig
|
mv /etc/monkey/sites/default /etc/monkey/sites/default.orig
|
||||||
mv /root/monkey /etc/monkey/sites/default
|
mv /root/monkey /etc/monkey/sites/default
|
||||||
|
sed -i 's/SymLink Off/SymLink On/' /etc/monkey/monkey.conf
|
||||||
systemctl enable monkey.service
|
systemctl enable monkey.service
|
||||||
|
|
||||||
echo_stamp "Install Node.js"
|
echo_stamp "Install Node.js"
|
||||||
|
|||||||
@@ -54,3 +54,6 @@ python3 -m pip install --upgrade pytest # TODO: https://github.com/CopterExpress
|
|||||||
cd /root/catkin_ws
|
cd /root/catkin_ws
|
||||||
source devel/setup.bash
|
source devel/setup.bash
|
||||||
catkin_make run_tests && catkin_test_results
|
catkin_make run_tests && catkin_test_results
|
||||||
|
|
||||||
|
# Step 5: Install packages
|
||||||
|
catkin_make install
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ rosversion usb_cam
|
|||||||
rosversion cv_camera
|
rosversion cv_camera
|
||||||
rosversion web_video_server
|
rosversion web_video_server
|
||||||
rosversion rosshow
|
rosversion rosshow
|
||||||
|
rosversion nodelet
|
||||||
|
rosversion image_view
|
||||||
|
|
||||||
# validate examples are present
|
# validate examples are present
|
||||||
[[ $(ls /home/pi/examples/*) ]]
|
[[ $(ls /home/pi/examples/*) ]]
|
||||||
|
|||||||
@@ -185,9 +185,6 @@ add_executable(clover_led src/led.cpp)
|
|||||||
|
|
||||||
add_executable(shell src/shell.cpp)
|
add_executable(shell src/shell.cpp)
|
||||||
|
|
||||||
# FIXME: hack to fix https://travis-ci.org/github/CopterExpress/clover/jobs/766318908#L6532
|
|
||||||
string(REPLACE "-lpthreads;" "" catkin_LIBRARIES "${catkin_LIBRARIES}")
|
|
||||||
|
|
||||||
target_link_libraries(simple_offboard
|
target_link_libraries(simple_offboard
|
||||||
${catkin_LIBRARIES}
|
${catkin_LIBRARIES}
|
||||||
${GeographicLib_LIBRARIES}
|
${GeographicLib_LIBRARIES}
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
<arg name="rangefinder_vl53l1x" default="true"/>
|
<arg name="rangefinder_vl53l1x" default="true"/>
|
||||||
<arg name="led" default="true"/>
|
<arg name="led" default="true"/>
|
||||||
<arg name="blocks" default="false"/>
|
<arg name="blocks" default="false"/>
|
||||||
<arg name="rc" default="true"/>
|
<arg name="rc" default="false"/>
|
||||||
<arg name="shell" default="true"/>
|
|
||||||
|
|
||||||
<arg name="simulator" default="false"/> <!-- flag that we are operating on a simulated drone -->
|
<arg name="simulator" default="false"/> <!-- flag that we are operating on a simulated drone -->
|
||||||
|
|
||||||
@@ -91,9 +90,6 @@
|
|||||||
<param name="use_fake_gcs" value="false"/>
|
<param name="use_fake_gcs" value="false"/>
|
||||||
</node>
|
</node>
|
||||||
|
|
||||||
<!-- Shell access through ROS service -->
|
|
||||||
<node name="shell" pkg="clover" type="shell" output="screen" if="$(arg shell)"/>
|
|
||||||
|
|
||||||
<!-- Update static directory -->
|
<!-- Update static directory -->
|
||||||
<node pkg="roswww_static" name="roswww_static" type="main.py" clear_params="true">
|
<node pkg="roswww_static" name="roswww_static" type="main.py" clear_params="true">
|
||||||
<param name="default_package" value="clover"/>
|
<param name="default_package" value="clover"/>
|
||||||
|
|||||||
@@ -6,13 +6,16 @@
|
|||||||
<arg name="viz" default="true"/>
|
<arg name="viz" default="true"/>
|
||||||
<arg name="respawn" default="true"/>
|
<arg name="respawn" default="true"/>
|
||||||
<arg name="distance_sensor_remap" default="rangefinder/range"/>
|
<arg name="distance_sensor_remap" default="rangefinder/range"/>
|
||||||
|
<arg name="usb_device" default="/dev/px4fmu"/>
|
||||||
|
<arg name="prefix" default="" unless="$(eval fcu_conn == 'usb')"/>
|
||||||
|
<arg name="prefix" default="rosrun clover waitfile $(arg usb_device)" if="$(eval fcu_conn == 'usb')"/>
|
||||||
|
|
||||||
<node pkg="mavros" type="mavros_node" name="mavros" required="false" clear_params="true" respawn="$(arg respawn)" unless="$(eval fcu_conn == 'none')" respawn_delay="1" output="screen">
|
<node pkg="mavros" type="mavros_node" name="mavros" launch-prefix="$(arg prefix)" required="false" clear_params="true" respawn="$(arg respawn)" unless="$(eval fcu_conn == 'none')" respawn_delay="1" output="screen">
|
||||||
<!-- UART connection -->
|
<!-- UART connection -->
|
||||||
<param name="fcu_url" value="/dev/ttyAMA0:921600" if="$(eval fcu_conn is None or fcu_conn == 'uart')"/>
|
<param name="fcu_url" value="/dev/ttyAMA0:921600" if="$(eval fcu_conn is None or fcu_conn == 'uart')"/>
|
||||||
|
|
||||||
<!-- USB connection -->
|
<!-- USB connection -->
|
||||||
<param name="fcu_url" value="/dev/px4fmu" if="$(eval fcu_conn == 'usb')"/>
|
<param name="fcu_url" value="$(arg usb_device)" if="$(eval fcu_conn == 'usb')"/>
|
||||||
|
|
||||||
<!-- sitl before PX4 1.9.0 -->
|
<!-- sitl before PX4 1.9.0 -->
|
||||||
<param name="fcu_url" value="udp://@$(arg fcu_ip):14557" if="$(eval fcu_conn == 'udp')"/>
|
<param name="fcu_url" value="udp://@$(arg fcu_ip):14557" if="$(eval fcu_conn == 'udp')"/>
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ private:
|
|||||||
} catch (const tf2::TransformException& e) {
|
} catch (const tf2::TransformException& e) {
|
||||||
// Invalidate previous frame
|
// Invalidate previous frame
|
||||||
prev_.release();
|
prev_.release();
|
||||||
return;
|
goto publish_debug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,6 +219,10 @@ private:
|
|||||||
flow_.quality = (uint8_t)(response * 255);
|
flow_.quality = (uint8_t)(response * 255);
|
||||||
flow_pub_.publish(flow_);
|
flow_pub_.publish(flow_);
|
||||||
|
|
||||||
|
prev_ = curr_.clone();
|
||||||
|
prev_stamp_ = msg->header.stamp;
|
||||||
|
|
||||||
|
publish_debug:
|
||||||
// Publish debug image
|
// Publish debug image
|
||||||
if (img_pub_.getNumSubscribers() > 0) {
|
if (img_pub_.getNumSubscribers() > 0) {
|
||||||
// publish debug image
|
// publish debug image
|
||||||
@@ -235,12 +239,9 @@ private:
|
|||||||
static geometry_msgs::TwistStamped velo;
|
static geometry_msgs::TwistStamped velo;
|
||||||
velo.header.stamp = msg->header.stamp;
|
velo.header.stamp = msg->header.stamp;
|
||||||
velo.header.frame_id = fcu_frame_id_;
|
velo.header.frame_id = fcu_frame_id_;
|
||||||
velo.twist.angular.x = flow_.integrated_x / integration_time.toSec();
|
velo.twist.angular.x = flow_fcu.vector.x / integration_time.toSec();
|
||||||
velo.twist.angular.y = flow_.integrated_y / integration_time.toSec();
|
velo.twist.angular.y = flow_fcu.vector.y / integration_time.toSec();
|
||||||
velo_pub_.publish(velo);
|
velo_pub_.publish(velo);
|
||||||
|
|
||||||
prev_ = curr_.clone();
|
|
||||||
prev_stamp_ = msg->header.stamp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
9
clover/src/waitfile
Executable file
9
clover/src/waitfile
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# $ ./waitfile <file> <command> <args...>
|
||||||
|
# wait until <file> appears and then invoke <command> with <args>
|
||||||
|
|
||||||
|
echo "wait for file $1"
|
||||||
|
while [ ! -e "$1" ]; do sleep 1; done;
|
||||||
|
echo "file $1 appeared"
|
||||||
|
"${@:2}"
|
||||||
@@ -33,19 +33,3 @@ def test_web_video_server(node):
|
|||||||
# Python 3
|
# Python 3
|
||||||
import urllib.request as urllib
|
import urllib.request as urllib
|
||||||
urllib.urlopen("http://localhost:8080").read()
|
urllib.urlopen("http://localhost:8080").read()
|
||||||
|
|
||||||
def test_shell(node):
|
|
||||||
execute = rospy.ServiceProxy('exec', srv.Execute)
|
|
||||||
execute.wait_for_service(5)
|
|
||||||
|
|
||||||
res = execute(cmd='echo foo')
|
|
||||||
assert res.code == 0
|
|
||||||
assert res.output == 'foo\n'
|
|
||||||
|
|
||||||
res = execute(cmd='foo')
|
|
||||||
assert res.code == 32512
|
|
||||||
assert res.output == ''
|
|
||||||
|
|
||||||
res = execute(cmd='ls foo')
|
|
||||||
assert res.code == 512
|
|
||||||
assert res.output == ''
|
|
||||||
|
|||||||
1
clover/www/clover.err
Symbolic link
1
clover/www/clover.err
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/tmp/clover.err
|
||||||
1
clover/www/clover_version
Symbolic link
1
clover/www/clover_version
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/etc/clover_version
|
||||||
@@ -9,19 +9,20 @@
|
|||||||
<li><a href="viz.html">View 3D visualization</a> (<code>ros3djs</code>)</li>
|
<li><a href="viz.html">View 3D visualization</a> (<code>ros3djs</code>)</li>
|
||||||
<li><a href="aruco_map.html">3D visualization for markers map</a> (<code>ros3djs</code>)</li>
|
<li><a href="aruco_map.html">3D visualization for markers map</a> (<code>ros3djs</code>)</li>
|
||||||
<li><a href="../clover_blocks/">Blocks programming</a> (<code>Blockly</code>)</li>
|
<li><a href="../clover_blocks/">Blocks programming</a> (<code>Blockly</code>)</li>
|
||||||
|
<li><a href="clover.err">Clover console</a> (<code>tmp/clover.err</code>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="version"></div>
|
<div class="version"></div>
|
||||||
|
|
||||||
<script src="js/roslib.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.querySelector("#wvs").href = location.protocol + '//' + location.hostname + ':8080';
|
document.querySelector("#wvs").href = location.protocol + '//' + location.hostname + ':8080';
|
||||||
document.querySelector("#butterfly").href = location.protocol + '//' + location.hostname + ':57575';
|
document.querySelector("#butterfly").href = location.protocol + '//' + location.hostname + ':57575';
|
||||||
|
|
||||||
// Determine image version
|
// Determine image version
|
||||||
var ros = new ROSLIB.Ros({ url: 'ws://' + location.hostname + ':9090' });
|
fetch('clover_version').then(function(response) {
|
||||||
var exec = new ROSLIB.Service({ ros: ros, name : '/exec', serviceType : 'clover/Execute' });
|
if (response.status !== 200) return;
|
||||||
exec.callService(new ROSLIB.ServiceRequest({ cmd: 'cat /etc/clover_version' }), function(result) {
|
response.text().then(function(text) {
|
||||||
document.querySelector('.version').innerHTML = 'Version: ' + result.output;
|
document.querySelector('.version').innerHTML = 'Version: ' + text;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import rospy
|
import rospy
|
||||||
import os
|
import os, sys
|
||||||
|
import traceback
|
||||||
import threading
|
import threading
|
||||||
import re
|
import re
|
||||||
import uuid
|
import uuid
|
||||||
@@ -116,7 +117,12 @@ def run(req):
|
|||||||
rospy.loginfo('Program forced to stop')
|
rospy.loginfo('Program forced to stop')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
rospy.logerr(str(e))
|
rospy.logerr(str(e))
|
||||||
error_pub.publish(str(e))
|
traceback.print_exc()
|
||||||
|
etype, value, tb = sys.exc_info()
|
||||||
|
fmt = traceback.format_exception(etype, value, tb)
|
||||||
|
fmt.pop(1) # remove 'clover_blocks' file frame
|
||||||
|
exc_info = ''.join(fmt)
|
||||||
|
error_pub.publish(str(e) + '\n\n' + exc_info)
|
||||||
|
|
||||||
rospy.loginfo('Program terminated')
|
rospy.loginfo('Program terminated')
|
||||||
running_lock.release()
|
running_lock.release()
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ target_compile_options(throttling_camera PRIVATE -std=c++11)
|
|||||||
add_dependencies(throttling_camera ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
add_dependencies(throttling_camera ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||||
|
|
||||||
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
|
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
|
||||||
install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
|
install(DIRECTORY models DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
|
||||||
install(DIRECTORY resources DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
|
install(DIRECTORY resources DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
|
||||||
|
|
||||||
catkin_install_python(PROGRAMS scripts/aruco_gen
|
catkin_install_python(PROGRAMS scripts/aruco_gen
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
* [Soldering safety](tb.md)
|
* [Soldering safety](tb.md)
|
||||||
* [LED strip (legacy)](leds_old.md)
|
* [LED strip (legacy)](leds_old.md)
|
||||||
* [Contribution Guidelines](contributing.md)
|
* [Contribution Guidelines](contributing.md)
|
||||||
|
* [COEX packages repository](packages.md)
|
||||||
* [Migration to v0.20](migrate20.md)
|
* [Migration to v0.20](migrate20.md)
|
||||||
* [Migration to v0.22](migrate22.md)
|
* [Migration to v0.22](migrate22.md)
|
||||||
* [Events](events.md)
|
* [Events](events.md)
|
||||||
|
|||||||
@@ -153,3 +153,13 @@ The script will take up to 100% CPU capacity. To slow down the script artificial
|
|||||||
```
|
```
|
||||||
|
|
||||||
The topic for the subscriber in this case should be changed for `main_camera/image_raw_throttled`.
|
The topic for the subscriber in this case should be changed for `main_camera/image_raw_throttled`.
|
||||||
|
|
||||||
|
## Video recording
|
||||||
|
|
||||||
|
To record a video you can use [`video_recorder`](http://wiki.ros.org/image_view#image_view.2Fdiamondback.video_recorder) node from `image_view` package:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rosrun image_view video_recorder image:=/main_camera/image_raw
|
||||||
|
```
|
||||||
|
|
||||||
|
The video file will be saved to a file `output.avi`. The `image` argument contains the name of the topic to record.
|
||||||
|
|||||||
@@ -96,3 +96,7 @@ Prepare your article and send it as a pull request to the [Clover repository](ht
|
|||||||
## Easy way
|
## Easy way
|
||||||
|
|
||||||
If the above instructions are too difficult for you, send your fixes and new articles by e-mail (<a href="mailto:okalachev@gmail.com">okalachev@gmail.com</a>) or in Telegram messenger (user <a href="tg://resolve?domain=okalachev">@okalachev</a>).
|
If the above instructions are too difficult for you, send your fixes and new articles by e-mail (<a href="mailto:okalachev@gmail.com">okalachev@gmail.com</a>) or in Telegram messenger (user <a href="tg://resolve?domain=okalachev">@okalachev</a>).
|
||||||
|
|
||||||
|
## Publishing packages
|
||||||
|
|
||||||
|
You also can publish a package, that extends Clover functionality, into the official [COEX Debian repository](packages.md).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# CopterHack 2021
|
# CopterHack 2021
|
||||||
|
|
||||||
CopterHack 2021 is a team competition for the development of open source projects for the Clover quadcopter platform.
|
CopterHack 2021 is a team competition for the development of open source projects for the Clover quadcopter platform. Fifty-four teams from 12 countries took part in the competition.
|
||||||
|
|
||||||
All information about the event can be found on the official website: https://coex.tech/copterhack.
|
All information about the event can be found on the official website: https://coex.tech/copterhack.
|
||||||
|
|
||||||
|
|||||||
27
docs/en/packages.md
Normal file
27
docs/en/packages.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# COEX packages repository
|
||||||
|
|
||||||
|
COEX provides an open [Debian-repository](https://wiki.debian.org/DebianRepository) with ROS Noetic related prebuilt binary pacakges for `armhf` architecture.
|
||||||
|
|
||||||
|
> **Info** Repository URL: http://packages.coex.tech.
|
||||||
|
|
||||||
|
The repository is already addedd in [RPi image](image.md) and may be used for simple installation of additional ROS packages.
|
||||||
|
|
||||||
|
## Packages publishing
|
||||||
|
|
||||||
|
You can make a Pull Request in a git repository with packages, adding or updating your package (a file with `.deb` extension), that relates to Clover or ROS. After merging your package will be available for installation with `apt` utility:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install ros-noetic-clover-some-feature
|
||||||
|
```
|
||||||
|
|
||||||
|
Packages, that extend Clover functionality are recommended to be named with `clover_` prefix, e. g. `clover_some_feature`.
|
||||||
|
|
||||||
|
## Using on a normal Raspberry Pi OS
|
||||||
|
|
||||||
|
On a normal Raspberry Pi OS, the repository may be added to the sources list, this way:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget -O - 'http://packages.coex.tech/key.asc' | apt-key add -
|
||||||
|
echo 'deb http://packages.coex.tech buster main' >> /etc/apt/sources.list
|
||||||
|
sudo apt update
|
||||||
|
```
|
||||||
@@ -34,7 +34,15 @@ Read more in the [GPS connection](gps.md) article.
|
|||||||
|
|
||||||
> **Info** For studying Python programming language, see [tutorial](https://www.learnpython.org/en/Welcome).
|
> **Info** For studying Python programming language, see [tutorial](https://www.learnpython.org/en/Welcome).
|
||||||
|
|
||||||
After you've configured your positioning system, you can start writing programs for autonomous flights. Use the [SSH connection to the Raspberry Pi](ssh.md) to run your scripts. In order to run a Python script use the `python3` command:
|
After you've configured your positioning system, you can start writing programs for autonomous flights. Use the [SSH connection to the Raspberry Pi](ssh.md) to run your scripts.
|
||||||
|
|
||||||
|
Before the first flight it's recommended to check the Clover's configuration with [selfcheck.py utility](selfcheck.md):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rosrun clover selfcheck.py
|
||||||
|
```
|
||||||
|
|
||||||
|
In order to run a Python script use the `python3` command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 flight.py
|
python3 flight.py
|
||||||
|
|||||||
@@ -359,3 +359,28 @@ calibrate_gyro()
|
|||||||
```
|
```
|
||||||
|
|
||||||
> **Note** In process of calibration the drone should not be moved.
|
> **Note** In process of calibration the drone should not be moved.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD044 -->
|
||||||
|
|
||||||
|
### # {#aruco-detect-enabled}
|
||||||
|
|
||||||
|
<!-- markdownlint-enable MD044 -->
|
||||||
|
|
||||||
|
Enable and disable [ArUco markers recognition](aruco_marker.md) dynamically (for example, for saving CPU resources):
|
||||||
|
|
||||||
|
```python
|
||||||
|
import rospy
|
||||||
|
import dynamic_reconfigure.client
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
client = dynamic_reconfigure.client.Client('aruco_detect')
|
||||||
|
|
||||||
|
# Turn markers recognition off
|
||||||
|
client.update_configuration({'enabled': False})
|
||||||
|
|
||||||
|
rospy.sleep(5)
|
||||||
|
|
||||||
|
# Turn markers recognition on
|
||||||
|
client.update_configuration({'enabled': True})
|
||||||
|
```
|
||||||
|
|||||||
@@ -96,6 +96,7 @@
|
|||||||
* [Подключение регулятора 4 в 1](4in1.md)
|
* [Подключение регулятора 4 в 1](4in1.md)
|
||||||
* [Светодиодная лента (legacy)](leds_old.md)
|
* [Светодиодная лента (legacy)](leds_old.md)
|
||||||
* [Вклад в Клевер](contributing.md)
|
* [Вклад в Клевер](contributing.md)
|
||||||
|
* [Репозиторий пакетов COEX](packages.md)
|
||||||
* [Переход на версию 0.20](migrate20.md)
|
* [Переход на версию 0.20](migrate20.md)
|
||||||
* [Переход на версию 0.22](migrate22.md)
|
* [Переход на версию 0.22](migrate22.md)
|
||||||
* [COEX Duocam](duocam.md)
|
* [COEX Duocam](duocam.md)
|
||||||
|
|||||||
@@ -155,3 +155,13 @@ rospy.spin()
|
|||||||
```
|
```
|
||||||
|
|
||||||
Топик для подписчика в этом случае необходимо поменять на `main_camera/image_raw_throttled`.
|
Топик для подписчика в этом случае необходимо поменять на `main_camera/image_raw_throttled`.
|
||||||
|
|
||||||
|
## Запись видео
|
||||||
|
|
||||||
|
Для записи видео может использована нода [`video_recorder`](http://wiki.ros.org/image_view#image_view.2Fdiamondback.video_recorder) из пакета `image_view`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rosrun image_view video_recorder image:=/main_camera/image_raw
|
||||||
|
```
|
||||||
|
|
||||||
|
Видео будет сохранено в файл `output.avi`. В аргументе `image` указывается название топика для записи видео.
|
||||||
|
|||||||
@@ -96,3 +96,7 @@
|
|||||||
## Простой способ
|
## Простой способ
|
||||||
|
|
||||||
Если вышеприведенные инструкции для вас оказываются слишком сложными, отправляйте правки или новые статьи по e-mail (<a href="mailto:okalachev@gmail.com">okalachev@gmail.com</a>) или в Telegram (пользователь <a href="tg://resolve?domain=okalachev">@okalachev</a>).
|
Если вышеприведенные инструкции для вас оказываются слишком сложными, отправляйте правки или новые статьи по e-mail (<a href="mailto:okalachev@gmail.com">okalachev@gmail.com</a>) или в Telegram (пользователь <a href="tg://resolve?domain=okalachev">@okalachev</a>).
|
||||||
|
|
||||||
|
## Публикация пакетов
|
||||||
|
|
||||||
|
Вы также можете опубликовать собственный пакет, расширяющий функциональность Клевера, в [Debian-репозитории COEX](packages.md).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# CopterHack 2021
|
# CopterHack 2021
|
||||||
|
|
||||||
CopterHack 2021 – это командный конкурс по разработке проектов с открытым исходным кодом для платформы квадрокоптера "Клевер".
|
CopterHack 2021 – это командный конкурс по разработке проектов с открытым исходным кодом для платформы квадрокоптера "Клевер". В конкурсе приняло участие 54 команды из 12 стран.
|
||||||
|
|
||||||
Все информацию о мероприятии смотрите на официальном сайте: https://ru.coex.tech/copterhack.
|
Все информацию о мероприятии смотрите на официальном сайте: https://ru.coex.tech/copterhack.
|
||||||
|
|
||||||
|
|||||||
27
docs/ru/packages.md
Normal file
27
docs/ru/packages.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Репозиторий пакетов COEX
|
||||||
|
|
||||||
|
COEX предоставляет открытый [Debian-репозиторий](https://wiki.debian.org/ru/SourcesList) с предсобранными пакетами, относящимися к ROS Noetic, для архитектуры `armhf`.
|
||||||
|
|
||||||
|
> **Info** Адрес репозитория: http://packages.coex.tech.
|
||||||
|
|
||||||
|
Репозиторий подключен в [образе для RPi](image.md) и может быть использован для легкой установки дополнительных ROS-пакетов.
|
||||||
|
|
||||||
|
## Публикация пакетов
|
||||||
|
|
||||||
|
Вы можете прислать Pull Request в [git-репозиторий с пакетами](https://github.com/CopterExpress/packages), добавляющий или обновляющий ваш пакет (файл с расширением `.deb`), относящийся с Клеверу или ROS. После принятия ваш пакет будет доступен для установки с помощью утилиты `apt`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install ros-noetic-clover-some-feature
|
||||||
|
```
|
||||||
|
|
||||||
|
Пакеты, расширяющие функциональность Клевера, рекомендуется называть с префиксом `clover_`, например `clover_some_feature`.
|
||||||
|
|
||||||
|
## Использование на обычной Raspberry Pi OS
|
||||||
|
|
||||||
|
На обычной Raspberry Pi OS репозиторий может быть добавлен в список источников пакетов следующими командами:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget -O - 'http://packages.coex.tech/key.asc' | apt-key add -
|
||||||
|
echo 'deb http://packages.coex.tech buster main' >> /etc/apt/sources.list
|
||||||
|
sudo apt update
|
||||||
|
```
|
||||||
@@ -32,9 +32,17 @@
|
|||||||
|
|
||||||
## Автономный полет {#flight}
|
## Автономный полет {#flight}
|
||||||
|
|
||||||
> **Info** Для изучения языка программирования Python обращайтесь к [самоучителю](https://pythonworld.ru/samouchitel-python).
|
> **Info** Для изучения языка программирования Python вы можете обратиться к [самоучителю](https://pythonworld.ru/samouchitel-python).
|
||||||
|
|
||||||
После настройки системы позиционирования становится возможным написание скриптов для автономных полетов. Для выполнения скриптов [подключитесь в Raspberry Pi по SSH](ssh.md). Для того, чтобы запустить Python-скрипт, используйте команду `python3`:
|
После настройки системы позиционирования становится возможным написание скриптов для автономных полетов. Для выполнения скриптов [подключитесь в Raspberry Pi по SSH](ssh.md).
|
||||||
|
|
||||||
|
Перед первым полетом рекомендуется проверить конфигурацию Клевера при помощи [утилиты selfcheck.py](selfcheck.md):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rosrun clover selfcheck.py
|
||||||
|
```
|
||||||
|
|
||||||
|
Для того, чтобы запустить Python-скрипт, используйте команду `python3`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 flight.py
|
python3 flight.py
|
||||||
|
|||||||
@@ -377,3 +377,28 @@ calibrate_gyro()
|
|||||||
```
|
```
|
||||||
|
|
||||||
> **Note** В процессе калибровки гироскопов дрон нельзя двигать.
|
> **Note** В процессе калибровки гироскопов дрон нельзя двигать.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD044 -->
|
||||||
|
|
||||||
|
### # {#aruco-detect-enabled}
|
||||||
|
|
||||||
|
<!-- markdownlint-enable MD044 -->
|
||||||
|
|
||||||
|
Динамически включать и отключать [распознавание ArUco-маркеров](aruco_marker.md) (например, для экономии ресурсов процессора):
|
||||||
|
|
||||||
|
```python
|
||||||
|
import rospy
|
||||||
|
import dynamic_reconfigure.client
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
client = dynamic_reconfigure.client.Client('aruco_detect')
|
||||||
|
|
||||||
|
# Turn markers recognition off
|
||||||
|
client.update_configuration({'enabled': False})
|
||||||
|
|
||||||
|
rospy.sleep(5)
|
||||||
|
|
||||||
|
# Turn markers recognition on
|
||||||
|
client.update_configuration({'enabled': True})
|
||||||
|
```
|
||||||
|
|||||||
@@ -49,7 +49,8 @@
|
|||||||
|
|
||||||
{ "from": "modes/", "to": "ru/modes.html" },
|
{ "from": "modes/", "to": "ru/modes.html" },
|
||||||
{ "from": "firmware/", "to": "en/firmware.html" },
|
{ "from": "firmware/", "to": "en/firmware.html" },
|
||||||
{ "from": "simple_offboard/", "to": "ru/simple_offboard.html" },
|
{ "from": "simple_offboard/", "to": "en/simple_offboard.html" },
|
||||||
|
{ "from": "offboard/", "to": "en/simple_offboard.html" },
|
||||||
{ "from": "camera/", "to": "ru/camera.html" },
|
{ "from": "camera/", "to": "ru/camera.html" },
|
||||||
{ "from": "snippets/", "to": "ru/snippets.html" },
|
{ "from": "snippets/", "to": "ru/snippets.html" },
|
||||||
{ "from": "optical_flow/", "to": "ru/optical_flow.html" },
|
{ "from": "optical_flow/", "to": "ru/optical_flow.html" },
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
{ "from": "camera_setup/", "to": "en/camera_setup.html" },
|
{ "from": "camera_setup/", "to": "en/camera_setup.html" },
|
||||||
{ "from": "power/", "to": "en/power.html" },
|
{ "from": "power/", "to": "en/power.html" },
|
||||||
{ "from": "connection/", "to": "en/connection.html" },
|
{ "from": "connection/", "to": "en/connection.html" },
|
||||||
|
{ "from": "clover_vm/", "to": "en/simulation_vm.html" },
|
||||||
|
|
||||||
{ "from": "ru/microsd_images.html", "to": "image.html" },
|
{ "from": "ru/microsd_images.html", "to": "image.html" },
|
||||||
{ "from": "en/microsd_images.html", "to": "image.html" }
|
{ "from": "en/microsd_images.html", "to": "image.html" }
|
||||||
|
|||||||
Reference in New Issue
Block a user