Compare commits

..

101 Commits

Author SHA1 Message Date
Oleg Kalachev
6defbea453 Update Raspberry Pi OS to 2023-12-11 2024-02-06 15:46:51 +03:00
Oleg Kalachev
9e8470a3cb Install TinyXML 2022-10-11 16:05:47 +06:00
Oleg Kalachev
e9cd3d917c Try to fix --install-layout not recognized issue 2022-10-08 19:54:19 +06:00
Oleg Kalachev
373cefb01c Remove fakeroot as we are root 2022-10-07 22:51:34 +06:00
Oleg Kalachev
d0039ea23f Typo 2022-10-07 20:44:20 +06:00
Oleg Kalachev
bd25818aa7 Add rosdep file to help bloom-generate resolve Bullseye dependencies 2022-10-07 14:34:30 +06:00
Oleg Kalachev
a73457c5c5 Debug 2022-10-07 14:08:10 +06:00
Oleg Kalachev
c8a4d49577 Try to build from catkin workdspace 2022-10-06 23:24:12 +06:00
Oleg Kalachev
123379b60e Fix 2022-10-06 23:23:21 +06:00
Oleg Kalachev
71d3144691 fix 2022-10-06 15:18:14 +06:00
Oleg Kalachev
d306a9d96d Try 2022-10-05 17:45:49 +06:00
Oleg Kalachev
1d514cf5ca Merge branch 'master' into bullseye 2022-10-05 17:42:06 +06:00
Oleg Kalachev
c0707e066a actions: build Debian packages and upload to artifacts (#458) 2022-10-05 16:10:17 +06:00
Oleg Kalachev
91c6998633 docs: add snippet to subscribe and decode incoming mavlink messages 2022-09-29 13:58:02 +05:00
Oleg Kalachev
96adadeae9 Put Debian build log to file 2022-09-24 18:14:44 +03:00
Oleg Kalachev
a1061ff32c Add ls 2022-09-24 13:46:34 +03:00
Oleg Kalachev
e9d13b865c Build Debian packages 2022-09-24 12:58:56 +03:00
Oleg Kalachev
b655a4274e List built ROS packages 2022-09-23 23:10:20 +03:00
Oleg Kalachev
d58a59afab Fix 2022-09-23 22:48:19 +03:00
Sergey Stetsky
7b431fa021 docs: add command for updating markers map in the sim (#456)
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-09-23 20:15:57 +03:00
Oleg Kalachev
d0fabd8b3e Fix 2022-09-23 19:40:06 +03:00
Oleg Kalachev
b50207e5e9 Install ROS to /opt/ros/ 2022-09-23 18:44:18 +03:00
Oleg Kalachev
97797a9178 Fix 2022-09-23 15:53:20 +03:00
Oleg Kalachev
1e8569b664 Fix 2022-09-23 15:35:23 +03:00
Oleg Kalachev
21cc47eecb Fix 2022-09-23 15:20:09 +03:00
Oleg Kalachev
4c56adafb2 Fix 2022-09-23 03:17:30 +03:00
Oleg Kalachev
8a524a8aa5 Fix 2022-09-23 03:11:47 +03:00
Oleg Kalachev
5493445747 Manually install catkin_pkg 2022-09-23 03:04:30 +03:00
Oleg Kalachev
0ef26334dc Fix 2022-09-23 02:45:52 +03:00
Oleg Kalachev
8d83e8faa3 Add ROS sources for Ubuntu 2022-09-23 02:36:01 +03:00
Oleg Kalachev
9b90214d9d Try to fix 2022-09-23 01:53:56 +03:00
Oleg Kalachev
224f6cee27 Fix 2022-09-23 01:38:59 +03:00
Oleg Kalachev
ff04b2fb75 Fix 2022-09-23 01:21:12 +03:00
Oleg Kalachev
473444ae33 Fix 2022-09-23 01:13:41 +03:00
Oleg Kalachev
168734ad8c Remove sources list before rosdep init 2022-09-23 00:56:49 +03:00
Oleg Kalachev
4e7b2e379a Restore rosdep init 2022-09-23 00:50:29 +03:00
Oleg Kalachev
ad1d51fd9e Fix 2022-09-23 00:42:20 +03:00
Oleg Kalachev
57c415db22 Add os flag to rosdep update 2022-09-23 00:32:35 +03:00
Oleg Kalachev
568386a758 Install GeographicLib datasets in build workflow 2022-09-23 00:31:21 +03:00
Oleg Kalachev
55f8f4fa1a aruco_detect: check for duplicates in marker transforms, send all transforms in one message 2022-09-23 00:31:19 +03:00
Oleg Kalachev
dd0dd6b5c1 aruco_pose: add duplicate test to CMakeLists.txt 2022-09-23 00:31:19 +03:00
Oleg Kalachev
4c40bea226 aruco_pose: implement test for TF_REPEATED_DATA when multiple markers with the same ID 2022-09-23 00:31:18 +03:00
Oleg Kalachev
6b3f5c3690 Simplify script for testing native Noetic build 2022-09-23 00:31:18 +03:00
Oleg Kalachev
63067823ee Show number of messages received in topic viewer 2022-09-23 00:31:17 +03:00
Oleg Kalachev
880f67c3bc Fix error when viewing messages without header in topic viewer 2022-09-23 00:31:17 +03:00
Oleg Kalachev
839aeb6a26 clover.launch: make force_init argument overridable externally 2022-09-23 00:31:16 +03:00
Oleg Kalachev
b123585756 mavros.launch: fix fcu_url for hitl connection 2022-09-23 00:31:16 +03:00
Oleg Kalachev
fa4757a4c8 mavros.launch: add hitl option for fcu_conn argument 2022-09-23 00:31:15 +03:00
Oleg Kalachev
28d77aea33 selfcheck.py: skip boot duration check on not Clover image 2022-09-23 00:31:15 +03:00
Oleg Kalachev
0425e1da24 optical_flow: timeout for previous frame
For cases when optical flow is dynamically disabled and enabled back
2022-09-23 00:31:14 +03:00
Oleg Kalachev
692d424a0b Remove obsolete note from readme 2022-09-23 00:31:14 +03:00
Oleg Kalachev
1c9fd7b126 docs: remove some obsolete notes about renaming 2022-09-23 00:31:13 +03:00
oponfil
a1752c1642 docs: update connection article (en) (#363)
* Add instructions on how to connect FMU to Raspberry Pi by UART

* Remove sitl connection section

Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-09-23 00:31:13 +03:00
oponfil
0dbd2d1048 docs: update connection article (#362)
* Add instructions on how to connect FMU to Raspberry Pi by UART

* Remove inactual sitl connection

Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-09-23 00:31:12 +03:00
oponfil
79408861a2 docs: docs: correction in mavros article on global setpoints (en) (#358)
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-09-23 00:31:12 +03:00
oponfil
063f2c3c13 docs: correction in mavros article on global setpoints (#357)
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-09-23 00:31:10 +03:00
Oleg Kalachev
68819bbd34 docs: update PX4 to v1.12.3 in native simulation installation article 2022-09-23 00:31:10 +03:00
Oleg Kalachev
3a5c3d5bb4 docs: comment out link to install_software.sh in simulation installation manual
The link confuses users so they often try to run it
2022-09-23 00:31:09 +03:00
Oleg Kalachev
032eb52a88 Fix python-pymavlink installation adding some lxml dependencies
Otherwise installation falls with:
Error: Please make sure the libxml2 and libxslt development packages are installed
2022-09-23 00:31:09 +03:00
Oleg Kalachev
7dc24437cf vpe_publisher: fix reading map and base link frame_id from mavros 2022-09-23 00:31:08 +03:00
Oleg Kalachev
1ccb756931 Update docs job runner to ubuntu 22.04
https://github.com/actions/runner-images/issues/6002
2022-09-23 00:31:08 +03:00
Oleg Kalachev
b5268a7b62 Deploy docs using build artifacts instead of gh-pages branch (#452)
https://github.blog/changelog/2021-12-16-github-pages-using-github-actions-for-builds-and-deployments-for-public-repositories/
2022-09-23 00:31:07 +03:00
Elena Seliverstova
a0663d6b36 Update the contact link in Telegram 2022-09-23 00:31:07 +03:00
Elena Seliverstova
26f2c966ff Update the contact link in Telegram 2022-09-23 00:31:06 +03:00
Elena Seliverstova
4517186862 docs: add new articles about CopterHack2023 (#450) 2022-09-23 00:31:06 +03:00
Oleg Kalachev
5236afe035 Make PX4 node required in the sim 2022-09-23 00:31:05 +03:00
Oleg Kalachev
fe1707d0c3 simulator: change COM_RCL_EXCEPT param to enable offboard flights without RC on PX4 v1.13 2022-09-23 00:31:05 +03:00
Oleg Kalachev
03854d2589 Implement dynamic reconfiguration for aruco_map (#448) 2022-09-23 00:31:04 +03:00
Niels Hoppe
28339e65af Add missing dependency 2022-09-23 00:31:04 +03:00
Oleg Kalachev
e11f0cf054 Minor whitespace fix 2022-09-23 00:31:03 +03:00
Oleg Kalachev
c1045cd11e Add shortcut launch-file to run the simulation 2022-09-23 00:31:03 +03:00
Oleg Kalachev
aa3373da58 docs: redirect for blocks programming article 2022-09-23 00:31:01 +03:00
Oleg Kalachev
a4ad408228 Restore rosdep update 2022-09-23 00:09:09 +03:00
Oleg Kalachev
0d436637cd Trigger build 2022-09-22 23:59:23 +03:00
Oleg Kalachev
1e12498cb2 Install GeographicLib datasets in build workflow 2022-09-14 14:19:06 +03:00
Oleg Kalachev
43037f515d aruco_detect: check for duplicates in marker transforms, send all transforms in one message 2022-09-14 12:55:27 +03:00
Oleg Kalachev
2ea848721c aruco_pose: add duplicate test to CMakeLists.txt 2022-09-14 12:46:04 +03:00
Oleg Kalachev
d06b0a0cd2 aruco_pose: implement test for TF_REPEATED_DATA when multiple markers with the same ID 2022-09-14 12:35:16 +03:00
Oleg Kalachev
1efe10c9dd Simplify script for testing native Noetic build 2022-09-10 15:26:34 +03:00
Oleg Kalachev
24cd1f6fac Show number of messages received in topic viewer 2022-09-10 08:08:09 +03:00
Oleg Kalachev
5223bef5e7 Fix error when viewing messages without header in topic viewer 2022-09-10 01:31:38 +03:00
Oleg Kalachev
105eac7e1d clover.launch: make force_init argument overridable externally 2022-09-08 14:42:45 +03:00
Oleg Kalachev
c1d6ed27aa mavros.launch: fix fcu_url for hitl connection 2022-09-08 01:32:51 +03:00
Oleg Kalachev
614784e949 mavros.launch: add hitl option for fcu_conn argument 2022-09-07 00:55:13 +03:00
Oleg Kalachev
9376c017b4 selfcheck.py: skip boot duration check on not Clover image 2022-09-03 22:53:38 +03:00
Oleg Kalachev
b5d300e218 optical_flow: timeout for previous frame
For cases when optical flow is dynamically disabled and enabled back
2022-09-03 07:26:25 +03:00
Oleg Kalachev
efb44484b0 Remove obsolete note from readme 2022-08-26 22:51:08 +03:00
Oleg Kalachev
0a2ad3d64f docs: remove some obsolete notes about renaming 2022-08-26 22:50:55 +03:00
oponfil
ffe2d3d5e4 docs: update connection article (en) (#363)
* Add instructions on how to connect FMU to Raspberry Pi by UART

* Remove sitl connection section

Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-08-26 22:36:11 +03:00
oponfil
81f4795aec docs: update connection article (#362)
* Add instructions on how to connect FMU to Raspberry Pi by UART

* Remove inactual sitl connection

Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-08-26 22:35:40 +03:00
oponfil
596ed3dcf2 docs: docs: correction in mavros article on global setpoints (en) (#358)
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-08-26 22:09:56 +03:00
oponfil
63c71fc331 docs: correction in mavros article on global setpoints (#357)
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
2022-08-26 22:08:22 +03:00
Oleg Kalachev
0efb249d9b docs: update PX4 to v1.12.3 in native simulation installation article 2022-08-26 16:05:28 +03:00
Oleg Kalachev
47c6e5aa9b docs: comment out link to install_software.sh in simulation installation manual
The link confuses users so they often try to run it
2022-08-25 18:28:52 +03:00
Oleg Kalachev
687a4f50fd Fix python-pymavlink installation adding some lxml dependencies
Otherwise installation falls with:
Error: Please make sure the libxml2 and libxslt development packages are installed
2022-08-24 22:42:18 +03:00
Oleg Kalachev
18daff1044 Fix 2022-06-18 00:11:51 +03:00
Oleg Kalachev
b96d17a746 Fix 2022-06-18 00:00:47 +03:00
Oleg Kalachev
1506d3fd96 Fix 2022-06-17 23:55:15 +03:00
Oleg Kalachev
eec0833707 Merge branch 'master' into bullseye 2022-06-17 22:14:41 +03:00
Oleg Kalachev
f9883baa87 builder: script to build ROS from scratch 2022-02-09 19:42:18 +03:00
Oleg Kalachev
3bebecf91e Update Raspberry Pi OS to 2022-01-28 (bullseye) 2022-02-05 19:40:06 +03:00
31 changed files with 1026 additions and 119 deletions

View File

@@ -16,8 +16,36 @@ jobs:
# docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:melodic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh
noetic:
runs-on: ubuntu-latest
container: ros:noetic-ros-base
defaults:
run:
working-directory: catkin_ws
shell: bash
steps:
- uses: actions/checkout@v2
- name: Native Noetic build
run: |
docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:noetic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh
- uses: actions/checkout@v2
with:
path: catkin_ws/src/clover
- name: Install requirements
run: apt-get update && apt-get -y install python3-pip fakeroot python3-bloom debhelper dpkg-dev
- name: Install dependencies
run: rosdep update && rosdep install --from-paths src --ignore-src -y
- name: Install GeographicLib datasets
run: wget -qO- https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh | bash
- name: catkin_make
run: source /opt/ros/$ROS_DISTRO/setup.bash && catkin_make
- name: Run tests
run: source devel/setup.bash && catkin_make run_tests && catkin_test_results
- name: Build Debian packages
run: |
source devel/setup.bash
for file in `find . -name "package.xml"`; do
cd $(dirname ${file})
bloom-generate rosdebian --os-name ubuntu --os-version $(lsb_release -cs) --ros-distro $ROS_DISTRO
fakeroot debian/rules binary
cd -
done
- uses: actions/upload-artifact@v3
with:
name: debian-packages
path: catkin_ws/src/clover/*.deb
retention-days: 1

View File

@@ -1,23 +0,0 @@
name: Build docs Docker image
on:
workflow_dispatch:
push:
branches: [ '*' ]
jobs:
docs-docker:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: docker build -t clover-docs:latest docs
- name: Test Docker image
run: docker run -t --rm -v `pwd`:/clover clover-docs:latest
- name: Show results
run: |
ls -lh _book
ls -lh *.pdf

View File

@@ -251,4 +251,5 @@ if (CATKIN_ENABLE_TESTING)
add_rostest(test/test_node_failure.test)
add_rostest(test/largemap.test)
add_rostest(test/crash_opencv.test)
add_rostest(test/duplicate.test)
endif()

View File

@@ -187,6 +187,8 @@ private:
array_.markers.reserve(ids.size());
aruco_pose::Marker marker;
vector<geometry_msgs::TransformStamped> transforms;
transforms.reserve(ids.size());
geometry_msgs::TransformStamped transform;
transform.header.stamp = msg->header.stamp;
transform.header.frame_id = msg->header.frame_id;
@@ -204,20 +206,33 @@ private:
snapOrientation(marker.pose.orientation, snap_to.transform.rotation, auto_flip_);
}
// TODO: check IDs are unique
if (send_tf_) {
transform.child_frame_id = getChildFrameId(ids[i]);
// check if such static transform is in the map
if (map_markers_ids_.find(ids[i]) == map_markers_ids_.end()) {
transform.transform.rotation = marker.pose.orientation;
fillTranslation(transform.transform.translation, tvecs[i]);
br_->sendTransform(transform);
// check if a markers with that id is already added
bool send = true;
for (auto &t : transforms) {
if (t.child_frame_id == transform.child_frame_id) {
send = false;
break;
}
}
if (send) {
transform.transform.rotation = marker.pose.orientation;
fillTranslation(transform.transform.translation, tvecs[i]);
transforms.push_back(transform);
}
}
}
}
array_.markers.push_back(marker);
}
if (send_tf_) {
br_->sendTransform(transforms);
}
}
markers_pub_.publish(array_);

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -0,0 +1,8 @@
import pytest
import subprocess
def test_no_tf_repeated_data():
# `/rosout` acts weirdly inside rostest, so using a subprocess
cmd = """python -c 'import rospy, tf; rospy.init_node("foo"); listener = tf.TransformListener(); rospy.sleep(2)'"""
output = str(subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT))
assert 'TF_REPEATED_DATA' not in output, 'TF_REPEATED_DATA was logged on duplicate markers'

View File

@@ -0,0 +1,21 @@
<launch>
<node pkg="image_publisher" type="image_publisher" name="main_camera" args="$(find aruco_pose)/test/duplicate.png">
<param name="frame_id" value="main_camera_optical"/>
<param name="publish_rate" value="10"/>
<param name="camera_info_url" value="file://$(find aruco_pose)/test/camera_info.yaml" />
</node>
<node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager" required="true"/>
<node pkg="nodelet" clear_params="true" type="nodelet" name="aruco_detect" args="load aruco_pose/aruco_detect nodelet_manager" required="true">
<remap from="image_raw" to="main_camera/image_raw"/>
<remap from="camera_info" to="main_camera/camera_info"/>
<param name="length" value="0.33"/>
<param name="estimate_poses" value="true"/>
<param name="send_tf" value="true"/>
<param name="cornerRefinementMethod" value="1"/>
</node>
<param name="test_module" value="$(find aruco_pose)/test/duplicate.py"/>
<test test-name="aruco_pose_test" pkg="ros_pytest" type="ros_pytest_runner"/>
</launch>

View File

@@ -0,0 +1,735 @@
catkin:
debian:
bullseye: [ros-noetic-catkin]
genmsg:
debian:
bullseye: [ros-noetic-genmsg]
gencpp:
debian:
bullseye: [ros-noetic-gencpp]
geneus:
debian:
bullseye: [ros-noetic-geneus]
genlisp:
debian:
bullseye: [ros-noetic-genlisp]
gennodejs:
debian:
bullseye: [ros-noetic-gennodejs]
genpy:
debian:
bullseye: [ros-noetic-genpy]
bond_core:
debian:
bullseye: [ros-noetic-bond-core]
cmake_modules:
debian:
bullseye: [ros-noetic-cmake-modules]
class_loader:
debian:
bullseye: [ros-noetic-class-loader]
common_msgs:
debian:
bullseye: [ros-noetic-common-msgs]
common_tutorials:
debian:
bullseye: [ros-noetic-common-tutorials]
cpp_common:
debian:
bullseye: [ros-noetic-cpp-common]
desktop:
debian:
bullseye: [ros-noetic-desktop]
diagnostics:
debian:
bullseye: [ros-noetic-diagnostics]
executive_smach:
debian:
bullseye: [ros-noetic-executive-smach]
geometry:
debian:
bullseye: [ros-noetic-geometry]
geometry_tutorials:
debian:
bullseye: [ros-noetic-geometry-tutorials]
gl_dependency:
debian:
bullseye: [ros-noetic-gl-dependency]
image_common:
debian:
bullseye: [ros-noetic-image-common]
image_pipeline:
debian:
bullseye: [ros-noetic-image-pipeline]
image_transport_plugins:
debian:
bullseye: [ros-noetic-image-transport-plugins]
laser_pipeline:
debian:
bullseye: [ros-noetic-laser-pipeline]
mavlink:
debian:
bullseye: [ros-noetic-mavlink]
media_export:
debian:
bullseye: [ros-noetic-media-export]
message_generation:
debian:
bullseye: [ros-noetic-message-generation]
message_runtime:
debian:
bullseye: [ros-noetic-message-runtime]
mk:
debian:
bullseye: [ros-noetic-mk]
nodelet_core:
debian:
bullseye: [ros-noetic-nodelet-core]
orocos_kdl:
debian:
bullseye: [ros-noetic-orocos-kdl]
perception:
debian:
bullseye: [ros-noetic-perception]
perception_pcl:
debian:
bullseye: [ros-noetic-perception-pcl]
python_orocos_kdl:
debian:
bullseye: [ros-noetic-python-orocos-kdl]
qt_dotgraph:
debian:
bullseye: [ros-noetic-qt-dotgraph]
qt_gui:
debian:
bullseye: [ros-noetic-qt-gui]
qt_gui_py_common:
debian:
bullseye: [ros-noetic-qt-gui-py-common]
qwt_dependency:
debian:
bullseye: [ros-noetic-qwt-dependency]
robot:
debian:
bullseye: [ros-noetic-robot]
ros:
debian:
bullseye: [ros-noetic-ros]
ros_base:
debian:
bullseye: [ros-noetic-ros-base]
ros_comm:
debian:
bullseye: [ros-noetic-ros-comm]
ros_core:
debian:
bullseye: [ros-noetic-ros-core]
ros_environment:
debian:
bullseye: [ros-noetic-ros-environment]
ros_tutorials:
debian:
bullseye: [ros-noetic-ros-tutorials]
rosapi:
debian:
bullseye: [ros-noetic-rosapi]
rosbag_migration_rule:
debian:
bullseye: [ros-noetic-rosbag-migration-rule]
rosbash:
debian:
bullseye: [ros-noetic-rosbash]
rosboost_cfg:
debian:
bullseye: [ros-noetic-rosboost-cfg]
rosbridge_server:
debian:
bullseye: [ros-noetic-rosbridge-server]
rosbridge_suite:
debian:
bullseye: [ros-noetic-rosbridge-suite]
rosbuild:
debian:
bullseye: [ros-noetic-rosbuild]
rosclean:
debian:
bullseye: [ros-noetic-rosclean]
roscpp_core:
debian:
bullseye: [ros-noetic-roscpp-core]
roscpp_traits:
debian:
bullseye: [ros-noetic-roscpp-traits]
roscreate:
debian:
bullseye: [ros-noetic-roscreate]
rosgraph:
debian:
bullseye: [ros-noetic-rosgraph]
roslang:
debian:
bullseye: [ros-noetic-roslang]
roslint:
debian:
bullseye: [ros-noetic-roslint]
roslisp:
debian:
bullseye: [ros-noetic-roslisp]
rosmake:
debian:
bullseye: [ros-noetic-rosmake]
rosmaster:
debian:
bullseye: [ros-noetic-rosmaster]
rospack:
debian:
bullseye: [ros-noetic-rospack]
roslib:
debian:
bullseye: [ros-noetic-roslib]
rosparam:
debian:
bullseye: [ros-noetic-rosparam]
rospy:
debian:
bullseye: [ros-noetic-rospy]
rosserial:
debian:
bullseye: [ros-noetic-rosserial]
rosserial_msgs:
debian:
bullseye: [ros-noetic-rosserial-msgs]
rosserial_python:
debian:
bullseye: [ros-noetic-rosserial-python]
rosservice:
debian:
bullseye: [ros-noetic-rosservice]
rostime:
debian:
bullseye: [ros-noetic-rostime]
roscpp_serialization:
debian:
bullseye: [ros-noetic-roscpp-serialization]
python_qt_binding:
debian:
bullseye: [ros-noetic-python-qt-binding]
roslaunch:
debian:
bullseye: [ros-noetic-roslaunch]
rosunit:
debian:
bullseye: [ros-noetic-rosunit]
angles:
debian:
bullseye: [ros-noetic-angles]
libmavconn:
debian:
bullseye: [ros-noetic-libmavconn]
rosconsole:
debian:
bullseye: [ros-noetic-rosconsole]
pluginlib:
debian:
bullseye: [ros-noetic-pluginlib]
qt_gui_cpp:
debian:
bullseye: [ros-noetic-qt-gui-cpp]
resource_retriever:
debian:
bullseye: [ros-noetic-resource-retriever]
rosconsole_bridge:
debian:
bullseye: [ros-noetic-rosconsole-bridge]
roslz4:
debian:
bullseye: [ros-noetic-roslz4]
rosserial_client:
debian:
bullseye: [ros-noetic-rosserial-client]
rostest:
debian:
bullseye: [ros-noetic-rostest]
rqt_action:
debian:
bullseye: [ros-noetic-rqt-action]
rqt_bag:
debian:
bullseye: [ros-noetic-rqt-bag]
rqt_bag_plugins:
debian:
bullseye: [ros-noetic-rqt-bag-plugins]
rqt_common_plugins:
debian:
bullseye: [ros-noetic-rqt-common-plugins]
rqt_console:
debian:
bullseye: [ros-noetic-rqt-console]
rqt_dep:
debian:
bullseye: [ros-noetic-rqt-dep]
rqt_graph:
debian:
bullseye: [ros-noetic-rqt-graph]
rqt_gui:
debian:
bullseye: [ros-noetic-rqt-gui]
rqt_logger_level:
debian:
bullseye: [ros-noetic-rqt-logger-level]
rqt_moveit:
debian:
bullseye: [ros-noetic-rqt-moveit]
rqt_msg:
debian:
bullseye: [ros-noetic-rqt-msg]
rqt_nav_view:
debian:
bullseye: [ros-noetic-rqt-nav-view]
rqt_plot:
debian:
bullseye: [ros-noetic-rqt-plot]
rqt_pose_view:
debian:
bullseye: [ros-noetic-rqt-pose-view]
rqt_publisher:
debian:
bullseye: [ros-noetic-rqt-publisher]
rqt_py_console:
debian:
bullseye: [ros-noetic-rqt-py-console]
rqt_reconfigure:
debian:
bullseye: [ros-noetic-rqt-reconfigure]
rqt_robot_dashboard:
debian:
bullseye: [ros-noetic-rqt-robot-dashboard]
rqt_robot_monitor:
debian:
bullseye: [ros-noetic-rqt-robot-monitor]
rqt_robot_plugins:
debian:
bullseye: [ros-noetic-rqt-robot-plugins]
rqt_robot_steering:
debian:
bullseye: [ros-noetic-rqt-robot-steering]
rqt_runtime_monitor:
debian:
bullseye: [ros-noetic-rqt-runtime-monitor]
rqt_service_caller:
debian:
bullseye: [ros-noetic-rqt-service-caller]
rqt_shell:
debian:
bullseye: [ros-noetic-rqt-shell]
rqt_srv:
debian:
bullseye: [ros-noetic-rqt-srv]
rqt_tf_tree:
debian:
bullseye: [ros-noetic-rqt-tf-tree]
rqt_top:
debian:
bullseye: [ros-noetic-rqt-top]
rqt_topic:
debian:
bullseye: [ros-noetic-rqt-topic]
rqt_web:
debian:
bullseye: [ros-noetic-rqt-web]
smach:
debian:
bullseye: [ros-noetic-smach]
smclib:
debian:
bullseye: [ros-noetic-smclib]
std_msgs:
debian:
bullseye: [ros-noetic-std-msgs]
actionlib_msgs:
debian:
bullseye: [ros-noetic-actionlib-msgs]
bond:
debian:
bullseye: [ros-noetic-bond]
diagnostic_msgs:
debian:
bullseye: [ros-noetic-diagnostic-msgs]
geometry_msgs:
debian:
bullseye: [ros-noetic-geometry-msgs]
eigen_conversions:
debian:
bullseye: [ros-noetic-eigen-conversions]
kdl_conversions:
debian:
bullseye: [ros-noetic-kdl-conversions]
nav_msgs:
debian:
bullseye: [ros-noetic-nav-msgs]
rosbridge_msgs:
debian:
bullseye: [ros-noetic-rosbridge-msgs]
rosgraph_msgs:
debian:
bullseye: [ros-noetic-rosgraph-msgs]
rosmsg:
debian:
bullseye: [ros-noetic-rosmsg]
rqt_py_common:
debian:
bullseye: [ros-noetic-rqt-py-common]
shape_msgs:
debian:
bullseye: [ros-noetic-shape-msgs]
smach_msgs:
debian:
bullseye: [ros-noetic-smach-msgs]
std_srvs:
debian:
bullseye: [ros-noetic-std-srvs]
tf2_msgs:
debian:
bullseye: [ros-noetic-tf2-msgs]
tf2:
debian:
bullseye: [ros-noetic-tf2]
tf2_eigen:
debian:
bullseye: [ros-noetic-tf2-eigen]
trajectory_msgs:
debian:
bullseye: [ros-noetic-trajectory-msgs]
control_msgs:
debian:
bullseye: [ros-noetic-control-msgs]
urdf_parser_plugin:
debian:
bullseye: [ros-noetic-urdf-parser-plugin]
urdfdom_py:
debian:
bullseye: [ros-noetic-urdfdom-py]
uuid_msgs:
debian:
bullseye: [ros-noetic-uuid-msgs]
geographic_msgs:
debian:
bullseye: [ros-noetic-geographic-msgs]
vision_opencv:
debian:
bullseye: [ros-noetic-vision-opencv]
visualization_msgs:
debian:
bullseye: [ros-noetic-visualization-msgs]
visualization_tutorials:
debian:
bullseye: [ros-noetic-visualization-tutorials]
viz:
debian:
bullseye: [ros-noetic-viz]
webkit_dependency:
debian:
bullseye: [ros-noetic-webkit-dependency]
xmlrpcpp:
debian:
bullseye: [ros-noetic-xmlrpcpp]
roscpp:
debian:
bullseye: [ros-noetic-roscpp]
bondcpp:
debian:
bullseye: [ros-noetic-bondcpp]
bondpy:
debian:
bullseye: [ros-noetic-bondpy]
nodelet:
debian:
bullseye: [ros-noetic-nodelet]
nodelet_tutorial_math:
debian:
bullseye: [ros-noetic-nodelet-tutorial-math]
pluginlib_tutorials:
debian:
bullseye: [ros-noetic-pluginlib-tutorials]
roscpp_tutorials:
debian:
bullseye: [ros-noetic-roscpp-tutorials]
rosout:
debian:
bullseye: [ros-noetic-rosout]
async_web_server_cpp:
debian:
bullseye: [ros-noetic-async-web-server-cpp]
camera_calibration:
debian:
bullseye: [ros-noetic-camera-calibration]
diagnostic_aggregator:
debian:
bullseye: [ros-noetic-diagnostic-aggregator]
diagnostic_updater:
debian:
bullseye: [ros-noetic-diagnostic-updater]
diagnostic_common_diagnostics:
debian:
bullseye: [ros-noetic-diagnostic-common-diagnostics]
dynamic_reconfigure:
debian:
bullseye: [ros-noetic-dynamic-reconfigure]
filters:
debian:
bullseye: [ros-noetic-filters]
joint_state_publisher:
debian:
bullseye: [ros-noetic-joint-state-publisher]
message_filters:
debian:
bullseye: [ros-noetic-message-filters]
ros_pytest:
debian:
bullseye: [ros-noetic-ros-pytest]
rosauth:
debian:
bullseye: [ros-noetic-rosauth]
rosbag_storage:
debian:
bullseye: [ros-noetic-rosbag-storage]
rosnode:
debian:
bullseye: [ros-noetic-rosnode]
rospy_tutorials:
debian:
bullseye: [ros-noetic-rospy-tutorials]
rosshow:
debian:
bullseye: [ros-noetic-rosshow]
rostopic:
debian:
bullseye: [ros-noetic-rostopic]
rqt_gui_cpp:
debian:
bullseye: [ros-noetic-rqt-gui-cpp]
rqt_gui_py:
debian:
bullseye: [ros-noetic-rqt-gui-py]
self_test:
debian:
bullseye: [ros-noetic-self-test]
smach_ros:
debian:
bullseye: [ros-noetic-smach-ros]
tf2_py:
debian:
bullseye: [ros-noetic-tf2-py]
topic_tools:
debian:
bullseye: [ros-noetic-topic-tools]
rosbag:
debian:
bullseye: [ros-noetic-rosbag]
actionlib:
debian:
bullseye: [ros-noetic-actionlib]
actionlib_tutorials:
debian:
bullseye: [ros-noetic-actionlib-tutorials]
diagnostic_analysis:
debian:
bullseye: [ros-noetic-diagnostic-analysis]
nodelet_topic_tools:
debian:
bullseye: [ros-noetic-nodelet-topic-tools]
roswtf:
debian:
bullseye: [ros-noetic-roswtf]
rqt_launch:
debian:
bullseye: [ros-noetic-rqt-launch]
sensor_msgs:
debian:
bullseye: [ros-noetic-sensor-msgs]
camera_calibration_parsers:
debian:
bullseye: [ros-noetic-camera-calibration-parsers]
cv_bridge:
debian:
bullseye: [ros-noetic-cv-bridge]
image_geometry:
debian:
bullseye: [ros-noetic-image-geometry]
image_transport:
debian:
bullseye: [ros-noetic-image-transport]
camera_info_manager:
debian:
bullseye: [ros-noetic-camera-info-manager]
compressed_depth_image_transport:
debian:
bullseye: [ros-noetic-compressed-depth-image-transport]
compressed_image_transport:
debian:
bullseye: [ros-noetic-compressed-image-transport]
cv_camera:
debian:
bullseye: [ros-noetic-cv-camera]
image_proc:
debian:
bullseye: [ros-noetic-image-proc]
image_publisher:
debian:
bullseye: [ros-noetic-image-publisher]
map_msgs:
debian:
bullseye: [ros-noetic-map-msgs]
mavros_msgs:
debian:
bullseye: [ros-noetic-mavros-msgs]
pcl_msgs:
debian:
bullseye: [ros-noetic-pcl-msgs]
pcl_conversions:
debian:
bullseye: [ros-noetic-pcl-conversions]
polled_camera:
debian:
bullseye: [ros-noetic-polled-camera]
rqt_image_view:
debian:
bullseye: [ros-noetic-rqt-image-view]
stereo_msgs:
debian:
bullseye: [ros-noetic-stereo-msgs]
image_view:
debian:
bullseye: [ros-noetic-image-view]
rosbridge_library:
debian:
bullseye: [ros-noetic-rosbridge-library]
stereo_image_proc:
debian:
bullseye: [ros-noetic-stereo-image-proc]
tf2_ros:
debian:
bullseye: [ros-noetic-tf2-ros]
depth_image_proc:
debian:
bullseye: [ros-noetic-depth-image-proc]
mavros:
debian:
bullseye: [ros-noetic-mavros]
tf:
debian:
bullseye: [ros-noetic-tf]
interactive_markers:
debian:
bullseye: [ros-noetic-interactive-markers]
interactive_marker_tutorials:
debian:
bullseye: [ros-noetic-interactive-marker-tutorials]
laser_geometry:
debian:
bullseye: [ros-noetic-laser-geometry]
laser_assembler:
debian:
bullseye: [ros-noetic-laser-assembler]
laser_filters:
debian:
bullseye: [ros-noetic-laser-filters]
pcl_ros:
debian:
bullseye: [ros-noetic-pcl-ros]
tf2_geometry_msgs:
debian:
bullseye: [ros-noetic-tf2-geometry-msgs]
image_rotate:
debian:
bullseye: [ros-noetic-image-rotate]
tf2_kdl:
debian:
bullseye: [ros-noetic-tf2-kdl]
tf2_web_republisher:
debian:
bullseye: [ros-noetic-tf2-web-republisher]
tf_conversions:
debian:
bullseye: [ros-noetic-tf-conversions]
theora_image_transport:
debian:
bullseye: [ros-noetic-theora-image-transport]
turtlesim:
debian:
bullseye: [ros-noetic-turtlesim]
turtle_actionlib:
debian:
bullseye: [ros-noetic-turtle-actionlib]
turtle_tf:
debian:
bullseye: [ros-noetic-turtle-tf]
turtle_tf2:
debian:
bullseye: [ros-noetic-turtle-tf2]
urdf:
debian:
bullseye: [ros-noetic-urdf]
kdl_parser:
debian:
bullseye: [ros-noetic-kdl-parser]
kdl_parser_py:
debian:
bullseye: [ros-noetic-kdl-parser-py]
mavros_extras:
debian:
bullseye: [ros-noetic-mavros-extras]
robot_state_publisher:
debian:
bullseye: [ros-noetic-robot-state-publisher]
rviz:
debian:
bullseye: [ros-noetic-rviz]
librviz_tutorial:
debian:
bullseye: [ros-noetic-librviz-tutorial]
rqt_rviz:
debian:
bullseye: [ros-noetic-rqt-rviz]
rviz_plugin_tutorials:
debian:
bullseye: [ros-noetic-rviz-plugin-tutorials]
rviz_python_tutorial:
debian:
bullseye: [ros-noetic-rviz-python-tutorial]
urdf_tutorial:
debian:
bullseye: [ros-noetic-urdf-tutorial]
usb_cam:
debian:
bullseye: [ros-noetic-usb-cam]
visualization_marker_tutorials:
debian:
bullseye: [ros-noetic-visualization-marker-tutorials]
vl53l1x:
debian:
bullseye: [ros-noetic-vl53l1x]
web_video_server:
debian:
bullseye: [ros-noetic-web-video-server]
xacro:
debian:
bullseye: [ros-noetic-xacro]
led_msgs:
debian:
bullseye: [ros-noetic-led-msgs]
ws281x:
debian:
bullseye: [ros-noetic-ws281x]
ddynamic_reconfigure:
debian:
bullseye: [ros-noetic-ddynamic-reconfigure]
librealsense2:
debian:
bullseye: [ros-noetic-librealsense2]
realsense2_camera:
debian:
bullseye: [ros-noetic-realsense2-camera]
realsense2_description:
debian:
bullseye: [ros-noetic-realsense2-description]

100
builder/image-build-ros.sh Executable file
View File

@@ -0,0 +1,100 @@
#! /usr/bin/env bash
#
# Script for building ROS packages from scratch
#
# Copyright (C) 2022 Copter Express Technologies
#
# Author: Oleg Kalachev <okalachev@gmail.com>
#
# Distributed under MIT License (available at https://opensource.org/licenses/MIT).
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
set -ex # exit on error, echo commands
# http://wiki.ros.org/Installation/Source
export ROS_DISTRO=noetic
. /etc/os-release # set $VERSION_CODENAME to Debian release code name
export ROS_OS_OVERRIDE=debian:11:$VERSION_CODENAME
echo "=== Building ROS from scratch"
#echo "--- Adding sources"
#echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list
#curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
apt-get update
apt-get install -y python3-distutils python3-rosdep python3-rosinstall-generator build-essential git # python3-vcstool
# install vcstool using pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py && rm get-pip.py
pip3 install -U vcstool
# sudo rosdep init
rm /etc/ros/rosdep/sources.list.d/20-default.list
rosdep init
rosdep update
# rm /etc/ros/rosdep/sources.list.d/20-default.list && rosdep init
# rosdep --os=debian:$VERSION_CODENAME update
echo "--- Create Catkin workspace to build ROS package"
mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws
echo "--- Download ROS sources"
rosinstall_generator ros_base --rosdistro $ROS_DISTRO --deps --tar > noetic.rosinstall
mkdir ./src
vcs import --input noetic.rosinstall ./src
# https://answers.ros.org/question/343367/catkin-package-dependencies-issue-when-installing-ros-melodic-on-raspberry-pi-4/
#sudo apt remove python-rospkg
#sudo apt remove python-catkin-pkg
##sudo apt --fix-broken install
#sudo apt-get autoremove
echo "--- Install catkin_pkg"
cd
git clone https://github.com/ros-infrastructure/catkin_pkg.git
cd catkin_pkg
python3 setup.py install
cd ~/ros_catkin_ws
echo "--- Resolve dependencies"
rosdep install --from-paths ./src --ignore-packages-from-source --rosdistro $ROS_DISTRO -y --os=debian:$VERSION_CODENAME --skip-keys="python3-catkin-pkg python3-catkin-pkg-modules python3-rosdep-modules"
echo "--- Build ROS"
# https://github.com/ros/catkin/issues/863#issuecomment-290392074
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
--install-space=/opt/ros/$ROS_DISTRO
# source ~/ros_catkin_ws/install_isolated/setup.bash
source /opt/ros/$ROS_DISTRO/setup.bash
echo "--- List built ROS packages"
set +x
rospack list-names | while read line; do echo $line `rosversion $line`; done
set -x
echo "--- Build Debian packages"
apt-get install -y python3-bloom debhelper dpkg-dev libtinyxml-dev
# add rosdep file to help bloom-generate resolve missing bullseye dependencies
echo "yaml file:///etc/ros/rosdep/noetic-bullseye.yaml" >> /etc/ros/rosdep/sources.list.d/20-default.list
rosdep update
pip3 install setuptools==45.2.0 # https://github.com/ros/catkin/issues/863#issuecomment-1000446018
for file in `find . -name "package.xml" -not -path "*/debian/*"`; do
cd $(dirname ${file})
rm -rf debian
bloom-generate rosdebian --os-name debian --os-version $VERSION_CODENAME --ros-distro $ROS_DISTRO --debug
debian/rules binary # fakeroot is not needed as we are root
cd -
done
ls

View File

@@ -16,7 +16,7 @@
set -e # Exit immidiately on non-zero result
# https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit
SOURCE_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-05-28/2021-05-07-raspios-buster-armhf-lite.zip"
SOURCE_IMAGE="https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2023-12-11/2023-12-11-raspios-bookworm-armhf-lite.img.xz"
export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:='noninteractive'}
export LANG=${LANG:='C.UTF-8'}
@@ -104,7 +104,7 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterf
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.socket' '/lib/systemd/system/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey.service' '/lib/systemd/system/'
# software install
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-software.sh'
# ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-software.sh'
# network setup
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-network.sh'
# avahi setup
@@ -113,13 +113,14 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/avahi-s
# If RPi then use a one thread to build a ROS package on RPi, else use all
[[ $(arch) == 'armv7l' ]] && NUMBER_THREADS=1 || NUMBER_THREADS=$(nproc --all)
# Clover
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/noetic-rosdep-clover.yaml' '/etc/ros/rosdep/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/noetic-bullseye.yaml' '/etc/ros/rosdep/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/ros_python_paths' '/etc/sudoers.d/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/pigpiod.service' '/lib/systemd/system/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/launch.nanorc' '/usr/share/nano/'
# ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/kinetic-ros-clover.rosinstall' '/home/pi/ros_catkin_ws/'
# Add rename script
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-ros.sh' ${REPO_URL} ${IMAGE_VERSION} false false ${NUMBER_THREADS}
#${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-ros.sh' ${REPO_URL} ${IMAGE_VERSION} false false ${NUMBER_THREADS}
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-build-ros.sh'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-validate.sh'
${BUILDER_DIR}/image-resize.sh ${IMAGE_PATH}

View File

@@ -12,7 +12,7 @@
<arg name="led" default="true"/>
<arg name="blocks" default="false"/>
<arg name="rc" default="false"/>
<arg name="force_init" value="true"/> <!-- force estimator to init by publishing zero pose -->
<arg name="force_init" default="true"/> <!-- force estimator to init by publishing zero pose -->
<arg name="simulator" default="false"/> <!-- flag that we are operating on a simulated drone -->

View File

@@ -1,5 +1,5 @@
<launch>
<arg name="fcu_conn" default="usb"/> <!-- options: usb, uart, tcp, udp, sitl -->
<arg name="fcu_conn" default="usb"/> <!-- options: usb, uart, tcp, udp, sitl, hitl -->
<arg name="fcu_ip" default="127.0.0.1"/>
<arg name="fcu_sys_id" default="1"/>
<arg name="gcs_bridge" default="tcp"/>
@@ -23,6 +23,9 @@
<!-- sitl since PX4 1.9.0 -->
<param name="fcu_url" value="udp://@$(arg fcu_ip):14580" if="$(eval fcu_conn == 'sitl')"/>
<!-- hitl connection (to gazebo_mavlink_interface plugin) -->
<param name="fcu_url" value="udp://$(arg fcu_ip):14540@" if="$(eval fcu_conn == 'hitl')"/>
<!-- set target_system_id -->
<param name="target_system_id" value="$(arg fcu_sys_id)" />

View File

@@ -37,6 +37,8 @@
<depend>rosbridge_server</depend>
<depend>web_video_server</depend>
<depend>tf2_web_republisher</depend>
<depend>libxml2</depend>
<depend>libxslt</depend>
<depend condition="$ROS_PYTHON_VERSION == 2">python-lxml</depend>
<depend condition="$ROS_PYTHON_VERSION == 3">python3-lxml</depend>
<depend>dynamic_reconfigure</depend>

View File

@@ -154,7 +154,7 @@ private:
img.convertTo(curr_, CV_32F);
if (prev_.empty()) {
if (prev_.empty() || (msg->header.stamp - prev_stamp_).toSec() > 0.1) { // outdated previous frame
prev_ = curr_.clone();
prev_stamp_ = msg->header.stamp;
cv::createHanningWindow(hann_, curr_.size(), CV_32F);

View File

@@ -625,6 +625,10 @@ def check_rangefinder():
@check('Boot duration')
def check_boot_duration():
if not os.path.exists('/etc/clover_version'):
info('skip check')
return # Don't check not on Clover's image
output = subprocess.check_output('systemd-analyze').decode()
r = re.compile(r'([\d\.]+)s\s*$', flags=re.MULTILINE)
duration = float(r.search(output).groups()[0])

View File

@@ -40,6 +40,7 @@ function viewTopicsList() {
let rosdistro;
function viewTopic(topic) {
let counter = 0;
let index = '<a href=topics.html>Topics</a>';
title.innerHTML = `${index}: ${topic}`;
topicMessage.style.display = 'block';
@@ -51,10 +52,11 @@ function viewTopic(topic) {
});
new ROSLIB.Topic({ ros: ros, name: topic }).subscribe(function(msg) {
counter++;
document.title = topic;
if (mouseDown) return;
if (msg.header.stamp) {
if (msg.header && msg.header.stamp) {
if (params.date || params.offset) {
let date = new Date(msg.header.stamp.secs * 1e3 + msg.header.stamp.nsecs * 1e-6);
if (params.date) msg.header.date = date.toISOString();
@@ -62,7 +64,8 @@ function viewTopic(topic) {
}
}
topicMessage.innerHTML = yamlStringify(msg); // JSON.stringify(msg, null, 4);
let txt = `<div class=counter>${counter} received</div>${yamlStringify(msg)}`; // JSON.stringify(msg, null, 4);
topicMessage.innerHTML = txt;
});
}

View File

@@ -15,6 +15,7 @@
white-space: pre;
font-family: monospace;
}
.counter { color: #b9b9b9; margin-bottom: 1em; }
#topic-type { font-family: monospace; font-size: 0.5em; vertical-align: super; font-weight: normal; }
.topic { font-family: monospace; }
body.closed { background-color: rgb(207, 207, 207); }

View File

@@ -10,7 +10,7 @@ The simulation may be configured by a set of arguments:
* `mav_id` (*integer*, default: *0*) - MAVLink identifier of the vehicle. **Note**: Multi-vehicle simulation is possible, but requires extensive changes to launch files;
* `est` (*string*, default: *lpe*, possible values: *lpe*, *ekf2*) - PX4 estimator selection. Note that this may be overriden in the startup scripts for your craft;
* `vehicle` (*string*, default: *clover*) - PX4 vehicle name. Depending on this parameter, different PX4 presets will be loaded. **Note**: The default value, *clover*, requires you to use [Clover-specific PX4 branch](https://github.com/CopterExpress/Firmware/tree/v1.10.1-clever);
* `vehicle` (*string*, default: *clover*) - PX4 vehicle name. Depending on this parameter, different PX4 presets will be loaded.
* `main_camera` (*boolean*, default: *true*) - controls whether the drone will have a vision position estimation camera;
* `rangefinder` (*boolean*, default: *true*) - controls whether the drone will have a laser rangefinder;
* `led` (*boolean*, default: *true*) - controls whether the drone will have a programmable LED strip;

View File

@@ -1,36 +0,0 @@
# Build: sudo docker build -t clover-docs:latest .
# Run: docker run -it --rm -v ~/clover:/clover clover-docs:latest
# Save image: sudo docker save clover-docs:latest | gzip > clover-docs.tar.gz
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl git
RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
RUN . $HOME/.nvm/nvm.sh && nvm install 10.15 && nvm use 10.15 && npm --version
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections \
&& apt-get update \
&& apt-get install -y calibre msttcorefonts ghostscript
RUN . $HOME/.nvm/nvm.sh && curl https://raw.githubusercontent.com/CopterExpress/clover/master/builder/assets/install_gitbook.sh | bash
# RUN . $HOME/.nvm/nvm.sh && npm install markdownlint-cli@0.28.1 -g && PUPPETEER_SKIP_DOWNLOAD=1 npm install svgexport -g
RUN . $HOME/.nvm/nvm.sh && npm install markdownlint-cli@0.28.1 -g && npm install svgexport -g --unsafe-perm
RUN . $HOME/.nvm/nvm.sh && node -v && gitbook -V && markdownlint -V
RUN curl https://raw.githubusercontent.com/CopterExpress/clover/master/book.json > book.json
RUN . $HOME/.nvm/nvm.sh && gitbook install
CMD . $HOME/.nvm/nvm.sh && export QTWEBENGINE_DISABLE_SANDBOX=1 && cp -r node_modules /clover && cd /clover && gitbook build \
&& gitbook pdf ./ _book/clover.pdf && \
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=_book/clover_ru_compressed.pdf _book/clover_ru.pdf && \
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=_book/clover_en_compressed.pdf _book/clover_en.pdf && \
rm _book/clover_ru.pdf && mv _book/clover_ru_compressed.pdf _book/clover_ru.pdf && \
rm _book/clover_en.pdf && mv _book/clover_en_compressed.pdf _book/clover_en.pdf

View File

@@ -1,7 +1,5 @@
# Working with the camera
> **Note** In the image version **0.20** `clever` package was renamed to `clover`. See [previous version of the article](https://github.com/CopterExpress/clover/blob/v0.19/docs/en/camera.md) for older images.
Make sure the camera is enabled in the `~/catkin_ws/src/clover/clover/launch/clover.launch` file:
```xml

View File

@@ -20,15 +20,14 @@ USB connection is the preferred way to connect to the flight controller.
## UART connection
> **Note** In the image version **0.20** `clever` package and service was renamed to `clover`. See [previous version of the article](https://github.com/CopterExpress/clover/blob/v0.19/docs/en/connection.md) for older images.
<!-- TODO: Connection scheme -->
UART connection is another way for the Raspberry Pi and FCU to communicate.
1. Connect Raspberry Pi to your FCU using a UART cable.
2. [Connect to the Raspberry Pi over SSH](ssh.md).
3. Change the connection type in `~/catkin_ws/src/clover/clover/launch/clover.launch` to UART:
1. Connect the TELEM 2 port on the flight controller using a UART cable to the Raspberry Pi pins following this instruction: the black cable (*GND*) to Ground, the green cable (*UART_RX*) to *GPIO14*, the yellow cable (*UART_TX*) to *GPIO15*. Do not connect the red cable (*5V*).
2. Set the PX4 parameters: `MAV_1_CONFIG` to TELEM 2, `SER_TEL2_BAUND` to 921600 8N1. In PX4 of version prior to v1.10.0 the parameter `SYS_COMPANION` should be set to 921600.
3. [Connect to the Raspberry Pi over SSH](ssh.md).
4. Change the connection type in `~/catkin_ws/src/clover/clover/launch/clover.launch` to UART:
```xml
<arg name="fcu_conn" default="uart"/>
@@ -40,15 +39,4 @@ UART connection is another way for the Raspberry Pi and FCU to communicate.
sudo systemctl restart clover
```
> **Hint** Set the `SYS_COMPANION` PX4 parameter to 921600 to enable UART on the FCU.
## SITL connection
In order to connect to a local or a remote [SITL](sitl.md) instance set the `fcu_conn` parameter to `udp` and `fcu_ip` to the IP address of the SITL instance (`127.0.0.1` if you are running the instance locally):
```xml
<arg name="fcu_conn" default="udp"/>
<arg name="fcu_ip" default="127.0.0.1"/>
```
**Next**: [Using QGroundControl over Wi-Fi](gcs_bridge.md)

View File

@@ -40,6 +40,8 @@ Messages published in the topics may be viewed with the `rostopic` utility, e.g.
`/mavros/setpoint_position/local` — set target position and yaw of the drone \(in the ENU coordinate system\).
`/mavros/setpoint_position/global` set target position in global coordinates (latitude, longitude, altitude) and yaw of the drone.
`/mavros/setpoint_position/cmd_vel` — set target linear velocity of the drone.
`/mavros/setpoint_attitude/attitude` and `/mavros/setpoint_attitude/att_throttle` — set target attitude and throttle level.
@@ -52,4 +54,4 @@ Messages published in the topics may be viewed with the `rostopic` utility, e.g.
`/mavros/setpoint_raw/attitude` — sends [SET\_ATTITUDE\_TARGET](https://mavlink.io/en/messages/common.html#SET_ATTITUDE_TARGET) message. Allows setting the target attitude /angular velocity and throttle level. The values to be set are selected using the `type_mask` field
`/mavros/setpoint_raw/global` — sends [SET\_POSITION\_TARGET\_GLOBAL\_INT](https://mavlink.io/en/messages/common.html#SET_POSITION_TARGET_GLOBAL_INT). Allows setting the target attitude in global coordinates \(latitude, longitude, altitude\) and flight speed. **Not supported in PX4** \([issue](https://github.com/PX4/Firmware/issues/7552)\).
`/mavros/setpoint_raw/global` — sends [SET\_POSITION\_TARGET\_GLOBAL\_INT](https://mavlink.io/en/messages/common.html#SET_POSITION_TARGET_GLOBAL_INT). Allows setting the target attitude in global coordinates \(latitude, longitude, altitude\) and flight speed.

View File

@@ -2,7 +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).
<!-- > **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**.
@@ -66,7 +66,7 @@ PX4 will be built along with the other packages in our workspace. You may clone
Clone PX4 sources and make the required symlinks:
```bash
git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
git clone --recursive --depth 1 --branch v1.12.3 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/

View File

@@ -97,3 +97,13 @@ PX4_SIM_SPEED_FACTOR=0.42 roslaunch clover_simulation simulator.launch
The virtual machine may benefit from several CPU cores, especially if the cores are not very performant. In our tests, a four-core machine with only a single core allocated to the VM was unable to run the simulation, with constant interface freezes and dropped ROS messages. The same machine with all four cores available to the VM was able to run the simulation at 0.25 real-time speed.
Do note that you should not allocate more resources than you have on your host hardware.
### Changing the map of ArUco-markers in the simulator
In order to change the map of ArUco-markers in the simulator, you can use the following command:
```bash
rosrun clover_simulation aruco_gen --single-model --source-world=$(catkin_find clover_simulation resources/worlds/clover.world) $(catkin_find aruco_pose map/map.txt) > $(catkin_find clover_simulation resources/worlds/clover_aruco.world)
```
In this example, `map.txt` is the name of markers name.

View File

@@ -240,6 +240,30 @@ ros_msg = mavlink.convert_to_rosmsg(msg)
mavlink_pub.publish(ros_msg)
```
<!-- markdownlint-disable MD044 -->
### # {#mavlink-receive}
<!-- markdownlint-enable MD044 -->
Subscribe to all MAVLink messages from the flight controller and decode them:
```python
from mavros_msgs.msg import Mavlink
from mavros import mavlink
from pymavlink import mavutil
link = mavutil.mavlink.MAVLink('', 255, 1)
def mavlink_cb(msg):
mav_msg = link.decode(mavlink.convert_to_bytes(msg))
print('msgid =', msg.msgid, mav_msg) # print message id and parsed message
mavlink_sub = rospy.Subscriber('mavlink/from', Mavlink, mavlink_cb)
rospy.spin()
```
### # {#rc-sub}
React to the drone's mode switching (may be used for starting an autonomous flight, see [example](https://gist.github.com/okalachev/b709f04522d2f9af97e835baedeb806b)):

View File

@@ -1,7 +1,5 @@
# Работа с камерой
> **Note** В версии образа **0.20** пакет и сервис `clever` был переименован в `clover`. Для более ранних версий см. документацию для версии [**0.19**](https://github.com/CopterExpress/clover/blob/v0.19/docs/ru/camera.md).
<!-- TODO: физическое подключение -->
Для работы с основной камерой необходимо убедиться что она включена в файле `~/catkin_ws/src/clover/clover/launch/clover.launch`:

View File

@@ -20,15 +20,14 @@
## Подключение по UART
> **Note** В версии образа **0.20** пакет и сервис `clever` был переименован в `clover`. Для более ранних версий см. документацию для версии [**0.19**](https://github.com/CopterExpress/clover/blob/v0.19/docs/ru/connection.md).
<!-- TODO схема подключения -->
Дополнительным способом подключения является подключение подключение по интерфейсу UART.
1. Подключите Raspberry Pi к полетному контроллеру по UART.
2. [Подключитесь в Raspberry Pi по SSH](ssh.md).
3. Поменяйте в launch-файле Клевера (`~/catkin_ws/src/clover/clover/launch/clover.launch`) тип подключения на UART:
1. Подключите Raspberry Pi к полетному контроллеру по UART. Для этого соедините кабелем порт TELEM 2 на полетном контроллере к пинам на Raspberry Pi следующем образом: черный провод (GND) к Ground, зеленый (*UART_RX*) к *GPIO14*, желтый (*UART_TX*) к *GPIO15*. Красный провод (*5V*) подключать не нужно.
2. Измените значения параметров PX4: `MAV_1_CONFIG` на TELEM 2, `SER_TEL2_BAUND` на 921600 8N1. В PX4 до версии v1.10.0 необходима установка параметра `SYS_COMPANION` в значение 921600.
3. [Подключитесь в Raspberry Pi по SSH](ssh.md).
4. Поменяйте в launch-файле Клевера (`~/catkin_ws/src/clover/clover/launch/clover.launch`) тип подключения на UART:
```xml
<arg name="fcu_conn" default="uart"/>
@@ -40,15 +39,4 @@
sudo systemctl restart clover
```
> **Hint** Для корректной работы подключения Raspberry Pi и полетного контроллера по UART необходимо установить значение параметра `SYS_COMPANION` на 921600.
## Подключение к SITL
Для того, чтобы подсоединиться к локально/удаленно запущенному [SITL](sitl.md), необходимо установить аргумент `fcu_conn` в `udp`, и `fcu_ip` в IP-адрес машины, где запущен SITL (`127.0.0.1` для локального):
```xml
<arg name="fcu_conn" default="udp"/>
<arg name="fcu_ip" default="127.0.0.1"/>
```
**Далее**: [Подключение QGroundControl по Wi-Fi](gcs_bridge.md).

View File

@@ -40,6 +40,8 @@ MAVROS подписывается на определенные ROS-топики
`/mavros/setpoint_position/local` — установить целевую позицию и рысканье \(yaw\) беспилотника \(в системе координат ENU\).
`/mavros/setpoint_position/global` установить целевую позицию в глобальных координатах (ширина, долгота и высота) и рысканье беспилотника.
`/mavros/setpoint_velocity/cmd_vel` — установить целевую линейную скорость беспилотника.
`/mavros/setpoint_attitude/attitude` и `/mavros/setpoint_attitude/att_throttle` — установить целевую ориентацию \(Attitude\) и уровень газа.
@@ -52,4 +54,4 @@ MAVROS подписывается на определенные ROS-топики
`/mavros/setpoint_raw/attitude` — отправка пакета [SET\_ATTITUDE\_TARGET](https://mavlink.io/en/messages/common.html#SET_ATTITUDE_TARGET). Позволяет установить целевую ориентацию / угловые скорости и уровень газа. Выбор устанавливаемых величин осуществляется с помощью поля `type_mask`
`/mavros/setpoint_raw/global` — отправка пакета [SET\_POSITION\_TARGET\_GLOBAL\_INT](https://mavlink.io/en/messages/common.html#SET_POSITION_TARGET_GLOBAL_INT). Позволяет установить целевую позицию в глобальных координатах \(ширина, долгота, высота\), а также скорости полета. **Не поддерживается в PX4** \([issue](https://github.com/PX4/Firmware/issues/7552)\).
`/mavros/setpoint_raw/global` — отправка пакета [SET\_POSITION\_TARGET\_GLOBAL\_INT](https://mavlink.io/en/messages/common.html#SET_POSITION_TARGET_GLOBAL_INT). Позволяет установить целевую позицию в глобальных координатах \(ширина, долгота, высота\), а также скорости полета.

View File

@@ -2,7 +2,7 @@
Настройка среды для симуляции с нуля требует некоторых усилий, однако это приведет к улучшению производительности и к уменьшению вероятности появления проблем с драйверами.
> **Hint** Смотрите актуальный набор команд установки необходимого ПО для запуска симулятора Клевера в скрипте сборки виртуальной машины с симулятором: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh).
<!-- > **Hint** Смотрите актуальный набор команд установки необходимого ПО для запуска симулятора Клевера в скрипте сборки виртуальной машины с симулятором: [`install_software.sh`](https://github.com/CopterExpress/clover_vm/blob/master/scripts/install_software.sh). -->
Требования для сборки: **Ubuntu 20.04**.
@@ -66,7 +66,7 @@ sudo /usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requiremen
Склонируйте исходный код PX4 и создайте необходимые симлинки:
```bash
git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
git clone --recursive --depth 1 --branch v1.12.3 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/

View File

@@ -99,3 +99,13 @@ PX4_SIM_SPEED_FACTOR=0.42 roslaunch clover_simulation simulator.launch
Выделение нескольких процессорных ядер для виртуальной машины может значительно повысить производительность симуляции. В наших испытаниях виртуальная машина, для которой было выделено одно ядро, не позволяла работать в симуляторе: окно Gazebo не реагировало на пользовательский ввод, сообщения ROS терялись. После выделения четырёх ядер для этой же виртуальной машины симуляция стала работать со скоростью 0.25 от реального времени.
При этом не следует пытаться выделить для виртуальной машины больше ресурсов, чем доступно на основной системе.
### Изменение карты ArUco-меток в симуляторе
Для того, чтобы изменить карту ArUco-меток в симуляторе, можно использовать следующую команду:
```bash
rosrun clover_simulation aruco_gen --single-model --source-world=$(catkin_find clover_simulation resources/worlds/clover.world) $(catkin_find aruco_pose map/map.txt) > $(catkin_find clover_simulation resources/worlds/clover_aruco.world)
```
В данном примере `map.txt` имя карты меток.

View File

@@ -251,6 +251,30 @@ ros_msg = mavlink.convert_to_rosmsg(msg)
mavlink_pub.publish(ros_msg)
```
<!-- markdownlint-disable MD044 -->
### # {#mavlink-receive}
<!-- markdownlint-enable MD044 -->
Подписка на все MAVLink-сообщения от полетного контроллера и их декодирование:
```python
from mavros_msgs.msg import Mavlink
from mavros import mavlink
from pymavlink import mavutil
link = mavutil.mavlink.MAVLink('', 255, 1)
def mavlink_cb(msg):
mav_msg = link.decode(mavlink.convert_to_bytes(msg))
print('msgid =', msg.msgid, mav_msg) # print message id and parsed message
mavlink_sub = rospy.Subscriber('mavlink/from', Mavlink, mavlink_cb)
rospy.spin()
```
### # {#rc-sub}
Реакция на переключение режима на пульте радиоуправления (может быть использовано для запуска автономного полета, см. [пример](https://gist.github.com/okalachev/b709f04522d2f9af97e835baedeb806b)):