mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 11:43:25 +00:00
Merge branch 'master' into recent-px4
This commit is contained in:
@@ -13,6 +13,7 @@ time:
|
||||
time_ref_source: "fcu" # time_reference source
|
||||
timesync_mode: MAVLINK
|
||||
timesync_avg_alpha: 0.6 # timesync averaging factor
|
||||
publish_sim_time: false # don't publish /clock
|
||||
|
||||
global_position:
|
||||
frame_id: "map" # origin frame
|
||||
|
||||
@@ -181,6 +181,7 @@ inline bool waitTransform(const string& target, const string& source,
|
||||
ros::spinOnce();
|
||||
r.sleep();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#define TIMEOUT(msg, timeout) (msg.header.stamp.isZero() || (ros::Time::now() - msg.header.stamp > timeout))
|
||||
@@ -847,6 +848,7 @@ bool land(std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
|
||||
busy = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
* [CopterHack-2019](copterhack2019.md)
|
||||
* [CopterHack-2018](copterhack2018.md)
|
||||
* [CopterHack-2017](copterhack2017.md)
|
||||
* [Video contest](video_contest.md)
|
||||
* [Clover-based projects](projects.md)
|
||||
* [Autonomous Multirotor Landing System (AMLS)](amls.md)
|
||||
* [Drone show](clever-show.md)
|
||||
|
||||
@@ -75,9 +75,9 @@ else:
|
||||
shape = 'undefined'
|
||||
color = 'undefined'
|
||||
|
||||
if shape = 'brown':
|
||||
if shape == 'brown':
|
||||
culture = "greshiha"
|
||||
if shape = 'yellow_orange':
|
||||
if shape == 'yellow_orange':
|
||||
culture = "pshenitsa"
|
||||
|
||||
image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_colback_color)
|
||||
|
||||
@@ -11,10 +11,9 @@ The proposed projects have to be open-source and be compatible with the Clover q
|
||||
## 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)||
|
||||
@@ -28,16 +27,19 @@ The proposed projects have to be open-source and be compatible with the Clover q
|
||||
||🇷🇺 Дрой Ронов|[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)| |
|
||||
|✕|🇺🇸 EnviroFleet|[EnviroFleet](https://github.com/gueyman/clover/blob/envirofleet/docs/en/enviro_fleet.md)||
|
||||
|✕|🇷🇺 Бизнес-гуси|[Drone Rover Climbing System](https://github.com/HexaHEX/clover/blob/CopterHack2022_Business_Geese-1/docs/ru/business_geese.md)||
|
||||
|✕|🇷🇺 fuall|[Доставка дронами](https://github.com/Silly4s/clover/blob/master/docs/ru/dostavka.md)||
|
||||
|✕|🇷🇺 Scout_Drone|[Создание поисково-спасательного беспилотного летательного аппарата](https://github.com/MustafaNatur/clover/blob/Scout_Drone.md/docs/ru/scout_drone.md)| |
|
||||
|
||||
✕ – teams which haven't qualified for the Final.
|
||||
|
||||
## Company case competition
|
||||
|
||||
|
||||
@@ -51,8 +51,6 @@ python3 flight.py
|
||||
Below is a complete flight program that performs a takeoff, flies forward and lands:
|
||||
|
||||
```python
|
||||
#coding: utf8
|
||||
|
||||
import rospy
|
||||
from clover import srv
|
||||
from std_srvs.srv import Trigger
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Raspberry Pi
|
||||
============
|
||||
|
||||
**Raspberry Pi** is a single-board computer that fits in the palm, created on the basis of ARM mobile microprocessor. It features low energy consumption, and it can even run on solar panels. Raspberry Pi 3 is included in the kits for programmable quadcopters "Clover".
|
||||
**Raspberry Pi** is a single-board computer that fits in the palm, created on the basis of ARM mobile microprocessor. It features low energy consumption, and it can even run on solar panels. A Raspberry Pi is included in the kits for programmable quadcopters "Clover".
|
||||
|
||||
<img src="../assets/raspberry.png" class="center zoom" alt="Raspberry Pi 3" width="400">
|
||||
|
||||
|
||||
@@ -4,31 +4,56 @@ Setting up the simulation environment from scratch requires some effort, but res
|
||||
|
||||
> **Hint** See up-to-date commands set for installation Clover simulation software in the script, that builds the virtual machine image with the simulator: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh).
|
||||
|
||||
Prerequisites: Ubuntu 20.04 and [ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu).
|
||||
Prerequisites: **Ubuntu 20.04**.
|
||||
|
||||
## Install ROS
|
||||
|
||||
Install ROS Noetic using the [official installation manual](http://wiki.ros.org/noetic/Installation/Ubuntu) (Desktop or Full install).
|
||||
|
||||
Add sourcing ROS' `setup.bash` initialization script to your `.bashrc`:
|
||||
|
||||
```bash
|
||||
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Install required tools:
|
||||
|
||||
```bash
|
||||
sudo apt install build-essential git python3-pip python3-rosdep
|
||||
```
|
||||
|
||||
## Create a workspace for the simulation
|
||||
|
||||
Throughout this guide we will be using the `catkin_ws` as the workspace name. Feel free to change it in your setup. We will be creating it in the home directory of the current user (`~`).
|
||||
|
||||
Create the workspace and clone Clover sources:
|
||||
Create a workspace for the simulation:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/catkin_ws/src
|
||||
cd ~/catkin_ws
|
||||
catkin_make
|
||||
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Clone Clover sources:
|
||||
|
||||
```bash
|
||||
cd ~/catkin_ws/src
|
||||
git clone --depth 1 https://github.com/CopterExpress/clover
|
||||
git clone --depth 1 https://github.com/CopterExpress/ros_led
|
||||
git clone --depth 1 https://github.com/ethz-asl/mav_comm
|
||||
```
|
||||
|
||||
Install all prerequisites using `rosdep`:
|
||||
Install all dependencies using `rosdep`:
|
||||
|
||||
```bash
|
||||
cd ~/catkin_ws
|
||||
sudo rosdep init
|
||||
rosdep update
|
||||
rosdep install --from-paths src --ignore-src -y
|
||||
```
|
||||
|
||||
Install Python-dependencies:
|
||||
Install Python dependencies:
|
||||
|
||||
```bash
|
||||
sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt
|
||||
@@ -36,15 +61,19 @@ sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requiremen
|
||||
|
||||
## Get PX4 sources
|
||||
|
||||
PX4 will be built along with the other packages in our workspace. You may clone it directly into the workspace or put it somewhere and symlink to `~/catkin_ws/src`. We will need to put its `sitl_gazebo` submodule in `~/catkin_ws/src` as well. For simplicity's sake we will clone the firmware directly to the workspace:
|
||||
PX4 will be built along with the other packages in our workspace. You may clone it directly into the workspace or put it somewhere and symlink to `~/catkin_ws/src`. We will need to put its `sitl_gazebo` and `mavlink` submodules into `~/catkin_ws/src` as well.
|
||||
|
||||
Clone PX4 sources and make the required symlinks:
|
||||
|
||||
```bash
|
||||
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
|
||||
ln -s ~/PX4-Autopilot ~/catkin_ws/src/
|
||||
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
|
||||
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/
|
||||
```
|
||||
|
||||
> **Hint** You may use more recent PX4 version, but there would be more risk of something would not be working.
|
||||
|
||||
## Install PX4 prerequisites
|
||||
|
||||
PX4 comes with its own script for dependency installation. We may as well leverage it:
|
||||
@@ -56,10 +85,12 @@ sudo ./ubuntu.sh
|
||||
|
||||
This will install everything required to build PX4 and its SITL environment.
|
||||
|
||||
You may want to skip installing the ARM toolchain if you're not planning on compiling PX4 for your flight controller. To do this, use the `--no-nuttx` flag:
|
||||
> **Hint** You may want to skip installing the ARM toolchain if you're not planning on compiling PX4 for your flight controller. To do this, use the `--no-nuttx` flag: `sudo ./ubuntu.sh --no-nuttx`.
|
||||
|
||||
```
|
||||
sudo ./ubuntu.sh --no-nuttx
|
||||
Install more required Python packages:
|
||||
|
||||
```bash
|
||||
pip3 install --user toml
|
||||
```
|
||||
|
||||
## Add the Clover airframe
|
||||
@@ -67,7 +98,7 @@ sudo ./ubuntu.sh --no-nuttx
|
||||
Add the Clover airframe to PX4 using the command:
|
||||
|
||||
```bash
|
||||
ln -s "$(catkin_find clover_simulation airframes)"/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
|
||||
ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
|
||||
```
|
||||
|
||||
## Install geographiclib datasets
|
||||
@@ -80,20 +111,44 @@ sudo /opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh
|
||||
|
||||
## Build the simulator
|
||||
|
||||
With all dependencies installed, you can build your workspace:
|
||||
Build your workspace:
|
||||
|
||||
```bash
|
||||
cd ~/catkin_ws
|
||||
catkin_make
|
||||
```
|
||||
|
||||
> **Note** Some of the files - particularly Gazebo plugins - require large amounts of RAM to be built. You may wish to reduce the number of parallel jobs; the number of parallel jobs should be equal to the amount of RAM in gigabytes divided by 2 - so a 16GB machine should use no more than 8 jobs. You can specify the number of jobs using the `-j` flag: `catkin_make -j8`
|
||||
> **Note** If building fails with RAM issues (`c++: fatal error: Killed signal terminated program cc1plus`), reduce the number of parallel jobs using `-j` key. For example, to use only two parallel jobs use `catkin_make -j2` command.
|
||||
|
||||
## Run the simulator
|
||||
|
||||
In order to be sure that everything was built correctly, try running the simulator for the first time:
|
||||
|
||||
```bash
|
||||
source ~/catkin_ws/devel/setup.bash
|
||||
roslaunch clover_simulation simulator.launch
|
||||
```
|
||||
|
||||
You can test autonomous flight using example scripts in `~/catkin_ws/src/clover/clover/examples` directory.
|
||||
|
||||
## Additional steps
|
||||
|
||||
Optionally, install roscore systemd service to have roscore running in background:
|
||||
|
||||
```bash
|
||||
sed -i "s/pi/$USER/g" ~/catkin_ws/src/clover/builder/assets/roscore.service
|
||||
sudo cp ~/catkin_ws/src/clover/builder/assets/roscore.service /etc/systemd/system
|
||||
sudo systemctl enable roscore
|
||||
sudo systemctl start roscore
|
||||
```
|
||||
|
||||
Install any web server to serve Clover's web tools (`~/.ros/www` directory), e. g. Monkey:
|
||||
|
||||
```bash
|
||||
wget https://github.com/CopterExpress/clover_vm/raw/master/assets/packages/monkey_1.6.9-1_amd64.deb -O /tmp/monkey_1.6.9-1_amd64.deb
|
||||
sudo apt-get install -y /tmp/monkey_1.6.9-1_amd64.deb
|
||||
sed "s/pi/$USER/g" ~/catkin_ws/src/clover/builder/assets/monkey | sudo tee /etc/monkey/sites/default
|
||||
sudo -E sh -c "sed -i 's/SymLink Off/SymLink On/' /etc/monkey/monkey.conf"
|
||||
sudo cp ~/catkin_ws/src/clover/builder/assets/monkey.service /etc/systemd/system/monkey.service
|
||||
sudo systemctl enable monkey
|
||||
sudo systemctl start monkey
|
||||
```
|
||||
|
||||
@@ -399,3 +399,45 @@ while not rospy.is_shutdown():
|
||||
break
|
||||
rospy.sleep(0.2)
|
||||
```
|
||||
|
||||
### # {#get-param}
|
||||
|
||||
Read flight controller's parameter:
|
||||
|
||||
```python
|
||||
from mavros_msgs.srv import ParamGet
|
||||
from mavros_msgs.msg import ParamValue
|
||||
|
||||
# ...
|
||||
|
||||
param_get = rospy.ServiceProxy('mavros/param/get', ParamGet)
|
||||
|
||||
# ...
|
||||
|
||||
# Read parameter of type INT
|
||||
value = param_get(param_id='COM_FLTMODE1').value.integer
|
||||
|
||||
# Read parameter of type FLOAT
|
||||
value = param_get(param_id='MPC_Z_P').value.float
|
||||
```
|
||||
|
||||
### # {#set-param}
|
||||
|
||||
Set flight controller's parameter:
|
||||
|
||||
```python
|
||||
from mavros_msgs.srv import ParamSet
|
||||
from mavros_msgs.msg import ParamValue
|
||||
|
||||
# ...
|
||||
|
||||
param_set = rospy.ServiceProxy('mavros/param/set', ParamSet)
|
||||
|
||||
# ...
|
||||
|
||||
# Set parameter of type INT:
|
||||
param_set(param_id='COM_FLTMODE1', value=ParamValue(integer=8))
|
||||
|
||||
# Set parameter of type FLOAT:
|
||||
param_set(param_id='MPC_Z_P', value=ParamValue(real=1.5))
|
||||
```
|
||||
|
||||
25
docs/en/video_contest.md
Normal file
25
docs/en/video_contest.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Contest for the best educational video on assembly and configuration
|
||||
|
||||
Requirements:
|
||||
|
||||
- the video contains the entire process of assembling and configuring the Clover 4.2 drone kit: from opening the box with components to flying the copter in Position mode using ArUco markers;
|
||||
- the video is uploaded to YouTube and is public accessible;
|
||||
- the video contains voice-over in English;
|
||||
- the video lasts from 6 to 60 minutes.
|
||||
|
||||
Dates of the contest: February 12 – December 13, 2021.
|
||||
|
||||
## Prizes
|
||||
|
||||
- 🥇 1st place: $500 (USD).
|
||||
- 🥈 2nd place: $300 (USD).
|
||||
- 🥉 3rd place: $200 (USD).
|
||||
|
||||
## Results
|
||||
|
||||
|Place|Participant|Link to the video|
|
||||
|:-:|-|-|
|
||||
|1|🇷🇺 Philipp Batalin|https://www.youtube.com/watch?v=f0rpdulOSEk|
|
||||
|2|🇮🇹 Sara Pettinari|https://www.youtube.com/watch?v=PxxfyVH6RRA|
|
||||
|3|🇲🇾 Kai Feng Chew|https://www.youtube.com/watch?v=skgSwFle6Ms|
|
||||
|3|🇰🇿 Nikita Lobanov|https://www.youtube.com/watch?v=93b1epEM3SQ|
|
||||
@@ -114,6 +114,7 @@
|
||||
* [Робокросс-2019](robocross2019.md)
|
||||
* [CopterHack-2018](copterhack2018.md)
|
||||
* [CopterHack-2017](copterhack2017.md)
|
||||
* [Конкурс видео](video_contest.md)
|
||||
* [Проекты на базе Клевера](projects.md)
|
||||
* [Система автоматической посадки (AMLS)](amls.md)
|
||||
* [Разработка системы для управления БПЛА с помощью шлема виртуальной реальности](remote-control-with-oculusvr.md)
|
||||
|
||||
@@ -75,9 +75,9 @@ else:
|
||||
shape = 'undefined'
|
||||
color = 'undefined'
|
||||
|
||||
if shape = 'brown':
|
||||
if shape == 'brown':
|
||||
culture = "greshiha"
|
||||
if shape = 'yellow_orange':
|
||||
if shape == 'yellow_orange':
|
||||
culture = "pshenitsa"
|
||||
|
||||
image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_colback_color)
|
||||
|
||||
@@ -11,10 +11,9 @@ 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)||
|
||||
@@ -28,16 +27,19 @@ CopterHack 2022 — это международный конкурс по ра
|
||||
||🇷🇺 Дрой Ронов|[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)| |
|
||||
|✕|🇺🇸 EnviroFleet|[EnviroFleet](https://github.com/gueyman/clover/blob/envirofleet/docs/en/enviro_fleet.md)||
|
||||
|✕|🇷🇺 Бизнес-гуси|[Drone Rover Climbing System](https://github.com/HexaHEX/clover/blob/CopterHack2022_Business_Geese-1/docs/ru/business_geese.md)||
|
||||
|✕|🇷🇺 fuall|[Доставка дронами](https://github.com/Silly4s/clover/blob/master/docs/ru/dostavka.md)||
|
||||
|✕|🇷🇺 Scout_Drone|[Создание поисково-спасательного беспилотного летательного аппарата](https://github.com/MustafaNatur/clover/blob/Scout_Drone.md/docs/ru/scout_drone.md)| |
|
||||
|
||||
✕ – команды, не дошедшие до финала.
|
||||
|
||||
## Направление "кейс компании"
|
||||
|
||||
|
||||
@@ -51,8 +51,6 @@ python3 flight.py
|
||||
Пример программы для полета (взлет, пролет вперед, посадка):
|
||||
|
||||
```python
|
||||
# coding: utf8
|
||||
|
||||
import rospy
|
||||
from clover import srv
|
||||
from std_srvs.srv import Trigger
|
||||
|
||||
@@ -4,16 +4,40 @@
|
||||
|
||||
> **Hint** Смотрите актуальный набор команд установки необходимого ПО для запуска симулятора Клевера в скрипте сборки виртуальной машины с симулятором: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh).
|
||||
|
||||
Требования для сборки: Ubuntu 20.04 и [ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu).
|
||||
Требования для сборки: **Ubuntu 20.04**.
|
||||
|
||||
## Установка ROS
|
||||
|
||||
Установите ROS Noetic используя [официальную документацию по установке](http://wiki.ros.org/noetic/Installation/Ubuntu) (Desktop или Full установка).
|
||||
|
||||
Добавьте выполнение инициализирующего скрипта ROS `setup.bash` в ваш файл `.bashrc`:
|
||||
|
||||
```bash
|
||||
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Установите необходимые инструменты, которые понадобятся для дальнейшей установки:
|
||||
|
||||
```bash
|
||||
sudo apt install build-essential git python3-pip python3-rosdep
|
||||
```
|
||||
|
||||
## Создание рабочего пространства для симулятора
|
||||
|
||||
В этой статье мы будем использовать `catkin_ws` как имя рабочего пространства (вы можете поменять её). Мы создадим её в домашнем каталоге текущего пользователя (`~`).
|
||||
|
||||
Создайте рабочее пространство и загрузите исходный код Клевера:
|
||||
Создайте рабочее пространство:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/catkin_ws/src
|
||||
cd ~/catkin_ws
|
||||
catkin_make
|
||||
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Склонируйте исходный код пакетов Clover:
|
||||
|
||||
```bash
|
||||
cd ~/catkin_ws/src
|
||||
git clone --depth 1 https://github.com/CopterExpress/clover
|
||||
git clone --depth 1 https://github.com/CopterExpress/ros_led
|
||||
@@ -24,6 +48,7 @@ git clone --depth 1 https://github.com/ethz-asl/mav_comm
|
||||
|
||||
```bash
|
||||
cd ~/catkin_ws
|
||||
sudo rosdep init
|
||||
rosdep update
|
||||
rosdep install --from-paths src --ignore-src -y
|
||||
```
|
||||
@@ -36,15 +61,19 @@ sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requiremen
|
||||
|
||||
## Загрузка исходного кода PX4
|
||||
|
||||
Сборка PX4 будет осуществлена вместе с другими пакетами в нашем рабочем пространстве. Вы можете загрузить его прямо в рабочее пространство или поместить куда-нибудь и создать симлинк к `~/catkin_ws/src`. Нам также нужно будет поместить его подмодуль `sitl_gazebo` в `~/catkin_ws/src`. Для упрощения мы загрузим прошивку прямо в рабочее пространство:
|
||||
Сборка PX4 будет осуществлена вместе с другими пакетами в нашем рабочем пространстве. Вы можете загрузить его прямо в рабочее пространство или поместить куда-нибудь и создать симлинк к `~/catkin_ws/src`. Нам также нужно будет поместить его подмодули `sitl_gazebo` и `mavlink` в `~/catkin_ws/src`.
|
||||
|
||||
Склонируйте исходный код PX4 и создайте необходимые симлинки:
|
||||
|
||||
```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
|
||||
ln -s ~/PX4-Autopilot ~/catkin_ws/src/
|
||||
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
|
||||
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/
|
||||
```
|
||||
|
||||
> **Hint** Вы можете использовать более позднюю версию PX4 с большим риском, что что-то не заработает.
|
||||
|
||||
## Установка зависимостей PX4
|
||||
|
||||
PX4 имеет свой собственный скрипт для установки зависимостей. Воспользуемся им:
|
||||
@@ -56,10 +85,12 @@ sudo ./ubuntu.sh
|
||||
|
||||
Он установит все, что нужно для сборки PX4 и SITL.
|
||||
|
||||
Также вы можете пропустить установку ARM тулчейна, если вы не планируете компилировать PX4 для вашего полетного контроллера. Для этого воспользуйтесь флагом `--no-nuttx`:
|
||||
> **Hint** Также вы можете пропустить установку ARM тулчейна, если вы не планируете компилировать PX4 для вашего полетного контроллера. Для этого воспользуйтесь флагом `--no-nuttx`: `sudo ./ubuntu.sh --no-nuttx`.
|
||||
|
||||
```
|
||||
sudo ./ubuntu.sh --no-nuttx
|
||||
Установите дополнительные необходимые Python-пакеты:
|
||||
|
||||
```bash
|
||||
pip3 install --user toml
|
||||
```
|
||||
|
||||
## Добавление рамы Клевера
|
||||
@@ -67,7 +98,7 @@ sudo ./ubuntu.sh --no-nuttx
|
||||
Добавьте в PX4 раму Клевера с помощью следующей команды:
|
||||
|
||||
```bash
|
||||
ln -s "$(catkin_find clover_simulation airframes)"/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
|
||||
ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
|
||||
```
|
||||
|
||||
## Установка датасетов geographiclib
|
||||
@@ -87,13 +118,37 @@ cd ~/catkin_ws
|
||||
catkin_make
|
||||
```
|
||||
|
||||
> **Note** Некоторые файлы, особенно плагины Gazebo, требуют большого объема оперативной памяти для сборки. Вы можете уменьшить количество параллельных процессов; количество параллельных процессов должно быть равно объёму RAM в гигабайтах, поделенному на 2. Например, для машины с 16Гб следует указывать не более 8 процессов. Вы можете указать количество процессов, используя флаг `-j` : ```catkin_make -j8```
|
||||
> **Note** Если процесс сборки завершится с ошибкой, связанной с недостатком памяти (`c++: fatal error: Killed signal terminated program cc1plus`), уменьшите количество параллельно исполняемых процессов используя ключ `-j`. Например, чтобы использовать только два параллельных процесса используйте команду `catkin_make -j2`.
|
||||
|
||||
## Запуск симулятора
|
||||
|
||||
Чтобы удостовериться в том, что все было собрано корректно, попробуйте запустить симулятор:
|
||||
|
||||
```bash
|
||||
source ~/catkin_ws/devel/setup.bash
|
||||
roslaunch clover_simulation simulator.launch
|
||||
```
|
||||
|
||||
Вы можете проверить автономный полет используя скрипты в директории `~/catkin_ws/src/clover/clover/examples`.
|
||||
|
||||
## Дополнительные шаги
|
||||
|
||||
Опционально вы можете установить systemd-сервис для roscore для того, чтобы roscore был постоянно запущен в фоне:
|
||||
|
||||
```bash
|
||||
sed -i "s/pi/$USER/g" ~/catkin_ws/src/clover/builder/assets/roscore.service
|
||||
sudo cp ~/catkin_ws/src/clover/builder/assets/roscore.service /etc/systemd/system
|
||||
sudo systemctl enable roscore
|
||||
sudo systemctl start roscore
|
||||
```
|
||||
|
||||
Установите любой веб-сервер, чтобы раздавать веб-инструменты Клевера (директория `~/.ros/www`), например, Monkey:
|
||||
|
||||
```bash
|
||||
wget https://github.com/CopterExpress/clover_vm/raw/master/assets/packages/monkey_1.6.9-1_amd64.deb -O /tmp/monkey_1.6.9-1_amd64.deb
|
||||
sudo apt-get install -y /tmp/monkey_1.6.9-1_amd64.deb
|
||||
sed "s/pi/$USER/g" ~/catkin_ws/src/clover/builder/assets/monkey | sudo tee /etc/monkey/sites/default
|
||||
sudo -E sh -c "sed -i 's/SymLink Off/SymLink On/' /etc/monkey/monkey.conf"
|
||||
sudo cp ~/catkin_ws/src/clover/builder/assets/monkey.service /etc/systemd/system/monkey.service
|
||||
sudo systemctl enable monkey
|
||||
sudo systemctl start monkey
|
||||
```
|
||||
|
||||
@@ -417,3 +417,45 @@ while not rospy.is_shutdown():
|
||||
break
|
||||
rospy.sleep(0.2)
|
||||
```
|
||||
|
||||
### # {#get-param}
|
||||
|
||||
Считать параметр полетного контроллера:
|
||||
|
||||
```python
|
||||
from mavros_msgs.srv import ParamGet
|
||||
from mavros_msgs.msg import ParamValue
|
||||
|
||||
# ...
|
||||
|
||||
param_get = rospy.ServiceProxy('mavros/param/get', ParamGet)
|
||||
|
||||
# ...
|
||||
|
||||
# Считать параметр типа INT
|
||||
value = param_get(param_id='COM_FLTMODE1').value.integer
|
||||
|
||||
# Считать параметр типа FLOAT
|
||||
value = param_get(param_id='MPC_Z_P').value.float
|
||||
```
|
||||
|
||||
### # {#set-param}
|
||||
|
||||
Изменить параметр полетного контроллера:
|
||||
|
||||
```python
|
||||
from mavros_msgs.srv import ParamSet
|
||||
from mavros_msgs.msg import ParamValue
|
||||
|
||||
# ...
|
||||
|
||||
param_set = rospy.ServiceProxy('mavros/param/set', ParamSet)
|
||||
|
||||
# ...
|
||||
|
||||
# Изменить параметр типа INT:
|
||||
param_set(param_id='COM_FLTMODE1', value=ParamValue(integer=8))
|
||||
|
||||
# Изменить параметр типа FLOAT:
|
||||
param_set(param_id='MPC_Z_P', value=ParamValue(real=1.5))
|
||||
```
|
||||
|
||||
25
docs/ru/video_contest.md
Normal file
25
docs/ru/video_contest.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Конкурс на лучшее образовательное видео по сборке и настройке
|
||||
|
||||
Требования:
|
||||
|
||||
- видео содержит весь процесс сборки и настройки конструктора Клевер 4.2: от открытия коробки с компонентами до летающего Коптера в режиме Position по ArUco-маркерам;
|
||||
- видео загружено на YouTube и находится в открытом доступе;
|
||||
- видео содержит озвучивание и субтитры на русском языке;
|
||||
- видео длится от 6 до 60 минут.
|
||||
|
||||
Даты проведения конкурса: 12 февраля – 13 декабря 2021.
|
||||
|
||||
## Призы
|
||||
|
||||
- 🥇 1 место: $500.
|
||||
- 🥈 2 место: $300.
|
||||
- 🥉 3 место: $200.
|
||||
|
||||
## Результаты
|
||||
|
||||
|Место|Участник|Ссылка на видео|
|
||||
|:-:|-|-|
|
||||
|1|🇷🇺 Филипп Баталин|https://www.youtube.com/watch?v=f0rpdulOSEk|
|
||||
|2|🇮🇹 Sara Pettinari|https://www.youtube.com/watch?v=PxxfyVH6RRA|
|
||||
|3|🇲🇾 Kai Feng Chew|https://www.youtube.com/watch?v=skgSwFle6Ms|
|
||||
|3|🇰🇿 Никита Лобанов|https://www.youtube.com/watch?v=93b1epEM3SQ|
|
||||
Reference in New Issue
Block a user