How to find a flat landing spot for UAV?
Hello ROS Enthusiasts, for my project i am trying to autonomously control px4 (UAV) over a mountainious terrain. I have written a code for this with bunch of different waypoints which enables the UAV to travel over this region.
Now my next task is to find a flat landing spot for the UAV over this mountain ranges using well equipped sensors. After thinking, searching a lot, i am coming up short every single time and hence i need your help. My first thought was using rtabmap_ros package to create point clouds and get the 3D Mapping of the given terrain. But what next?
Any Idea how i can implement this in gazebo simulation?
Thanks.
(commenting mostly to follow the discussion) wow that's a really interesting problem. I'm not going to be able to give you a good "here's how to do it" answer but I can ask some questions and hopefully help you figure out some options.
What sensors do you have access to? Do you have any prior knowledge of the areas you're flying in? Do you have any specific landing areas in mind that you're targeting and needing to check specific spots within it to land?
Hey thanks for joining the discussion.
It is mostly simulation hence, i can use any sensor i want (provided it is compatible with px4 and gazebo). I was thinking of using a VeloDyne Sensor.
I sort of had a collada file of the images of the region which i imported in gazebo by writing a sdf script. So, to answer the question, no and yes. It is kinda tricky to have knowledge of the entire area. But i was hoping that the UAV will do this task for me by creating a map out of the 3D world from gazebo (this mostly includes mountainious terrains, gradients etc.)
I do not really know how to really start looking for the landing area because i do not know how to find a flat surface in that region.
I can describe I suppose one way you could approach this from a very high level. I dont know off the top of my head the best tools for each step but I know they all exist out there:
If you have a 3D lidar on a drone, you can pretty "easily" (meaning largely solved to the degree you need) create a 3D map of your environment made of points. Something like LOAM or some 3D SLAM if you dont have really accurate GPS/INS.
If you have a 3D map of points, you can determine the normals of the ground regions in the area you're generally wanting to land in.
With a set of normals, you should be able to find a clustered region of normals large enough for you to successfully land, both in size and having a ground gradient sufficient for your purposes (flat).
How to ...(more)
That's not going to cover things like making sure you don't land in a tree or a river, but its a start
I have created a model out of the images. Also this might sound a bit dumb but what exactly do you mean by 'determine normals of the ground regions'? Also, Can i use LOAM with ROS Kinetic? Last i checked, i thought that is used with Indigo. Please, correct me if i am wrong.
If you have a set of points from a pointcloud in some map, you can use those 3D points and their neighbors to determine the normal vector of a point and region. The you could conceivably cluster sections of normals that you could land on until you found one large enough to work.
Indigo and Kinetic really weren't that far apart. My guess is it'll compile out of the box and if not with very little effort. I just used that as one example of a 3D slam implementation. If you're working in simulation and you just "assume" prefect knowledge for this demonstration, you could just buffer these points into a grid/raw data as your "map"
Okay i will try to do that. If i have some doubts i will continue this discussion here. Thank you so much!