Compare commits

..

8 Commits

Author SHA1 Message Date
Oleg Kalachev
1228b1765f Run with QTWEBENGINE_DISABLE_SANDBOX=1 2022-08-23 02:23:18 +03:00
Oleg Kalachev
b8c2011003 Run with --no-sandbox 2022-08-23 02:05:57 +03:00
Oleg Kalachev
f6a5955cc0 Fix 2022-08-23 01:56:02 +03:00
Oleg Kalachev
9242465b1e Fix path 2022-08-23 01:45:41 +03:00
Oleg Kalachev
5bddb57314 Fix 2022-08-23 01:38:26 +03:00
Oleg Kalachev
61669359b1 Test Docker image 2022-08-23 01:32:22 +03:00
Oleg Kalachev
275384a57c Fix 2022-08-23 01:25:22 +03:00
Oleg Kalachev
3b1c08d20f Add Dockerfile and Action for image for building the docs 2022-08-22 23:25:49 +03:00
31 changed files with 119 additions and 1026 deletions

View File

@@ -16,36 +16,8 @@ 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
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
- 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

23
.github/workflows/docs-docker.yaml vendored Normal file
View File

@@ -0,0 +1,23 @@
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,5 +251,4 @@ 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,8 +187,6 @@ 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;
@@ -206,33 +204,20 @@ 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()) {
// 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);
}
transform.transform.rotation = marker.pose.orientation;
fillTranslation(transform.transform.translation, tvecs[i]);
br_->sendTransform(transform);
}
}
}
array_.markers.push_back(marker);
}
if (send_tf_) {
br_->sendTransform(transforms);
}
}
markers_pub_.publish(array_);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

View File

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

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

@@ -1,735 +0,0 @@
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]

View File

@@ -1,100 +0,0 @@
#! /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.com/raspios_lite_armhf/images/raspios_lite_armhf-2023-12-11/2023-12-11-raspios-bookworm-armhf-lite.img.xz"
SOURCE_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-05-28/2021-05-07-raspios-buster-armhf-lite.zip"
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,14 +113,13 @@ ${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-bullseye.yaml' '/etc/ros/rosdep/'
${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/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-build-ros.sh'
${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-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" default="true"/> <!-- force estimator to init by publishing zero pose -->
<arg name="force_init" value="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, hitl -->
<arg name="fcu_conn" default="usb"/> <!-- options: usb, uart, tcp, udp, sitl -->
<arg name="fcu_ip" default="127.0.0.1"/>
<arg name="fcu_sys_id" default="1"/>
<arg name="gcs_bridge" default="tcp"/>
@@ -23,9 +23,6 @@
<!-- 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,8 +37,6 @@
<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() || (msg->header.stamp - prev_stamp_).toSec() > 0.1) { // outdated previous frame
if (prev_.empty()) {
prev_ = curr_.clone();
prev_stamp_ = msg->header.stamp;
cv::createHanningWindow(hann_, curr_.size(), CV_32F);

View File

@@ -625,10 +625,6 @@ 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,7 +40,6 @@ 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';
@@ -52,11 +51,10 @@ function viewTopic(topic) {
});
new ROSLIB.Topic({ ros: ros, name: topic }).subscribe(function(msg) {
counter++;
document.title = topic;
if (mouseDown) return;
if (msg.header && msg.header.stamp) {
if (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();
@@ -64,8 +62,7 @@ function viewTopic(topic) {
}
}
let txt = `<div class=counter>${counter} received</div>${yamlStringify(msg)}`; // JSON.stringify(msg, null, 4);
topicMessage.innerHTML = txt;
topicMessage.innerHTML = yamlStringify(msg); // JSON.stringify(msg, null, 4);
});
}

View File

@@ -15,7 +15,6 @@
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.
* `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);
* `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;

36
docs/Dockerfile Normal file
View File

@@ -0,0 +1,36 @@
# 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,5 +1,7 @@
# 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,14 +20,15 @@ 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 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:
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:
```xml
<arg name="fcu_conn" default="uart"/>
@@ -39,4 +40,15 @@ 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,8 +40,6 @@ 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.
@@ -54,4 +52,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.
`/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)\).

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.3 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/

View File

@@ -97,13 +97,3 @@ 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,30 +240,6 @@ 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,5 +1,7 @@
# Работа с камерой
> **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,14 +20,15 @@
## Подключение по 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. Для этого соедините кабелем порт 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:
1. Подключите Raspberry Pi к полетному контроллеру по UART.
2. [Подключитесь в Raspberry Pi по SSH](ssh.md).
3. Поменяйте в launch-файле Клевера (`~/catkin_ws/src/clover/clover/launch/clover.launch`) тип подключения на UART:
```xml
<arg name="fcu_conn" default="uart"/>
@@ -39,4 +40,15 @@
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,8 +40,6 @@ 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\) и уровень газа.
@@ -54,4 +52,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). Позволяет установить целевую позицию в глобальных координатах \(ширина, долгота, высота\), а также скорости полета.
`/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)\).

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.3 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
git clone --recursive --depth 1 --branch v1.12.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/mavlink ~/catkin_ws/src/

View File

@@ -99,13 +99,3 @@ 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,30 +251,6 @@ 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)):