PX4/avoidance GlobalPlanner fly through wall (ROS)

Hello everyone,

I encountered a problem using the global planner in our simulation. Therefore I used a modified launch-file to launch the global_planner_node and the octomap_server. The PX4-SITL and our gazebo-world with our drone (and its sensor: a velodyne lidar) is launched beforehand. Normal flights perform as expected, the drone can be controlled by a gamepad in position mode and when I change to offboard mode it navigates around objects (based on the global-planner) when a rviz navigation point is set.

But after I tested for a while - especially with changes to the octomap-server for the voxel size (here 0.75m) and hit/miss evaluation - I encountered the following problems:


As you can see on the pictures (a1) and (a2) which show the same flight path from different views the drone could fly through a wall even though it is a massive wall with no way around. I expected the drone to stop before it or increase its height to reach the upper ending or fly as far as it can to the left /right side (even so this wouldn’t have worked because this wall is a big box surrounding the whole simulation area). So I would guess an internal cost term for flying around the wall is bigger than just passing through the object - maybe someone can help me to find the corresponding functions/parameters in the global_planner source code?

Something similar happened on the picture (b) the drone moved around the scaffold/framework of the gazebo water-tower model and I tried out what would happen it the target position was between/inside of the structure so the drone navigated to one of the holes and passed to the inside. I tested it multiple times and here the same happened as before, some of the paths went through the object instead of around. I would prefer to have a minimum distance which is kept at all times between an object and the drone - to even disable flying through such a narrow framework.

I was curious which data are used to determine the distance to an object - is it the octomap data or the current sensor-data?
I just hope someone can give me some information about how everything works and where to change the code to run it with no issues.

Cheers

1 Like

Hi,
It looks like you were able to get the global_planner_node working while having a static Octomap.

In my case, I’ve already have a static/generated octomap that is being published by octomap_server.

After integrating the global_planner with my simulation, it does not work as expected. It does not generate any path when I give the goal.

Here is the log:
[ INFO] [1702931733.249894348]: OctoMap memory usage: 766.893 MB
[ INFO] [1702931733.249929620]: Goal position is occupied
[ INFO] [1702931733.249938131]: Failed to find a path
Total time: 236.26 ms
[ INFO] [1702931733.249959963]: Received empty path

[ INFO] [1702931733.249969555]: Received empty path

[ WARN] [1702931733.314201158]: Planner abort: missing required data

[ WARN] [1702931733.414188977]: Planner abort: missing required data

[ WARN] [1702931733.514150086]: Planner abort: missing required data

[ WARN] [1702931733.614131802]: Planner abort: missing required data

[ WARN] [1702931733.714133999]: Planner abort: missing required data

[ WARN] [1702931733.814132379]: Planner abort: missing required data

[ WARN] [1702931733.914110681]: Planner abort: missing required data

I was wondering if you could share the launch file or somehow let meknow how to solve the problem.