Этот проект предоставляет средства для управления беспилотными летательными аппаратами (БПЛА) с использованием QGroundControl через Docker. QGroundControl предоставляет мощный и гибкий интерфейс для планирования миссий, мониторинга полётов и настройки параметров БПЛА в реальном времени.
This project provides a ROS 2 interface for controlling a drone using the PX4 autopilot in offboard mode. It includes nodes for keyboard control, offboard control, visualization, and more. The setup is primarily designed for simulation with PX4 SITL (Software In The Loop) and can be extended for use with real drones.
-
Clone the Repository:
git clone https://github.com/AntonSHBK/aerial_drone_base cd aerial_drone_base/docker
-
Build the Workspace:
colcon build --packages-select px4_msgs px4_ros_com colcon build --packages-select aerial_drone_base
-
Source the Workspace:
source install/setup.bash
Launch the ROS 2 nodes required for controlling the drone:
ros2 launch aerial_drone_base aerial_drone_base.py
This launch file will start the following nodes:
- processes_node: Manages different background processes such as the PX4 SITL simulation.
- control_node: Handles the offboard control and sends commands to PX4.
- velocity_node: Manages the drone's velocity commands.
- visualizer_node: Provides visualization tools for Rviz.
Use the following keys to control the drone:
- W: Move Up
- S: Move Down
- A: Yaw Left
- D: Yaw Right
- Up Arrow: Pitch Forward
- Down Arrow: Pitch Backward
- Left Arrow: Roll Left
- Right Arrow: Roll Right
- Q: Increase linear and angular speed
- Z: Decrease linear and angular speed
- E: Increase angular speed only
- C: Decrease angular speed only
- Space: Arm or disarm the drone
- CTRL+C: Exit the teleop node
- If the drone doesn't respond to commands, ensure that the PX4 is running properly and that the nodes are correctly launched.
- Check the ROS 2 topics to ensure messages are being published correctly:
ros2 topic list
- Monitor logs for any errors or warnings.
- PX4 Documentation: https://docs.px4.io/
- ROS 2 Documentation: https://docs.ros.org/en/humble/
This project is licensed under the MIT License. See the LICENSE file for more details.