Technical column|Amu UAV indoor obstacle avoidance

Before, Amu Lab provided a series of indoor positioning solutions and introduced their respective characteristics. In this issue, we adopted the T265 visual positioning solution, and Matlab ROS Toolbox conducted a VFH indoor obstacle avoidance test.

Matlab ROS Toolbox

As we all know, Matlab is a powerful data processing tool that is widely used in scientific research, teaching, and business fields. No matter which industry you are working in, you will have used or heard of this tool more or less. Matlab has a toolbox that can provide rich and powerful extension functions. Among them is a ROS Toolbox, a toolbox launched by matlab r2019b. This toolbox provides some tools that robots need to use, including ROS-related tools.

ROS Toolbox provides an interface for MATLAB and Simulink to connect with the Robot Operating System (ROS) to create a ROS node network. The toolbox contains various functions of MATLAB and Simulink modules for importing, analyzing and replaying ROS data recorded in rosbag files. You can also connect to the real-time ROS network to access ROS messages.

This toolbox can also be connected to external robot simulators such as Gazebo to verify ROS nodes through desktop simulation. The ROS toolbox supports C++ code generation, which facilitates the automatic generation of ROS nodes from Simulink models, and then deploys them to simulated hardware or physical hardware.

For more reference materials about Matlab ROS Toolbox, please check the official website:

https://ww2.mathworks.cn/products/ros.html

MATLAB ROS Toolbox obstacle avoidance simulation test

The entire obstacle avoidance system consists of four key nodes, mavros, lidar, matlab node, and obstacle avoidance node. The system uses a distributed communication system, mavros nodes, lidar nodes, obstacle avoidance nodes run on the onboard computer, and matlab nodes run on a personal PC. The main benefit of this approach is to ease the processing pressure on the onboard computer. For some onboard computers with poor processing performance, or when the onboard computers need to run some computationally intensive algorithms, transferring the pressure of the processor to the personal PC is an effective measure.

The process of obstacle avoidance calculation is completed on a personal PC. The following is the subscription and publication of the entire system's news.

 

The subscribed message is also the input of the system is the UAV's pose information/local_position/pose in the local coordinate system, and the lidar data information/2Dlidar_scan, the published message is the output cmd_vel, the UAV's speed control information.

Compared with the VFH obstacle avoidance algorithm we used before, MATLAB VFH obstacle avoidance does not require the waypoint planning of the ground station. The ground station only needs to complete the task of checking the current flight status of the aircraft and does not rely on a certain positioning method. This method only needs to have positioning information, and we can arbitrarily set the target point based on the local coordinate system.

Simulation test

 

 We can see that the UAV we set to fly is a straight course. From the screenshot of the ground station, we can clearly see that the UAV's flight trajectory has obvious interpolation. This is when the UAV encountered obstacles and avoided obstacles during the flight of the designated position on the matlab end.

Indoor obstacle avoidance test

Amu UAV indoor obstacle avoidance real machine test

 

The application of T265 visual positioning in other directions has been released on our open source autonomous drone software platform-Prometheus (Prometheus). Customers and readers are welcome to provide valuable suggestions and opinions. Project website: https://github.com/amov-lab/Prometheus If you have any questions, you can ask questions and exchange in our forum~ Forum website: https://bbs.amovlab.com/

 

Note: The drones and their accessories involved in this article are all sold in our Taobao store (Amu Lab), and interested friends can go to learn about it~

2.0 Override content ¥UmMgc4xFSNU¥da Open.. Treasure or click to connect https://m.tb.cn/h.VyKjKdX?sm=ba5a38 to visit lan 嘂.. [Amu Lab]

 

Guess you like

Origin blog.csdn.net/msq19895070/article/details/109290311