Lars-Ki / px4_rrt_avoidance

A UAV collision avoidance package for px4 applications
MIT License
9 stars 7 forks source link

Reduce map inflation #7

Closed mjmyt closed 2 years ago

mjmyt commented 2 years ago

Hi Lars-Ki,Thank you for your reply,because I'm new to ROS,

So I have a few questions

  1. I want to pass through a column with a spacing of 2 meters, but your code regards this column as a whole. As shown in the figure below, I think the safety distance is set too large. When I change it to 1 meter, it will not work. How should I modify it。 PATH_test_RRT

  2. How can I change the flight speed? I want him to slow down.

  3. What does this string of numbers mean. msg.point_1.type_mask = 3064 msg.point_1.yaw_rate = -0.0 msg.header.stamp = rospy.get_rostime() msg.point_valid = [1, 0, 0, 0, 0] msg.command = [65535, 65535, 65535, 65535, 65535]

Look forward to your reply

Lars-Ki commented 2 years ago

Hi mjmyt,

I hard-coded some parameters for my application back then. One of which is the local map resolution: Try the following:

1) adjust pixel_size in Line 664 local_map_publisher.py (I would suggest 0.1m maybe) 2) Change the safety distance radius in Line 238 in local_map_publisher.py (radius is in meters so maybe set it to 0.3 or 0.4) 3) adjust the global map resolution in the launch file Line 33

For the speed: This is a PX4 parameter: In the Ground Control Station go to parameters and change the autonomous mission speed (should be this one here MPC_XY_CRUISE)

The last question: This is the message you send via MAVROS to the flight controller. Essentially you tell the flight controller which point of the msg is valid and the msg.command is a type (if I remember correctly) that is only excepted in mission or auto mode. But I noticed that px4 changed some of its code when I finished this research project. This might be not valid anymore or changed.

Lars-Ki commented 2 years ago

FYI: I believe the minimum altitude for the collision avoidance to work is 5m. I saw in your picture, that this might not be the case.