jmodares / UB-ANC-Planner

A multi-agent energy efficient coverage path planner for UB-ANC Agents
18 stars 6 forks source link

How to run mission using Planner #1

Closed rajat2004 closed 4 years ago

rajat2004 commented 5 years ago

I was able to successfully build the Planner after a few modifications to the generated Makefile.

But I'm not able to figure out how to create a mission and run the Planner. Any help would be great.

rajat2004 commented 5 years ago

I figured out the format of the mission file by looking through the code and found this page

While trying to run a mission, I'm getting the following error

Parallel mode: deterministic, using up to 4 threads for concurrent optimization.
Infeasibility row 'c1':  0  = 1.
Presolve time = 0.00 sec. (0.18 ticks)
Unable to divide the area beween agents!
Unable to divide the area between agents!

The mission file is as follows

QGC WPL 110
0   1   0   16  0   0   0   0   43.00529539617688   -78.78537389    177 1
1   0   0   22  0.000000    0.000000    0.000000    0.000000    43.00529539617688   -78.78537389    50  1
2   0   0   16  0.000000    0.000000    0.000000    0.000000    43.0050256  -78.78537389    00.000000   1
3   0   0   16  0.000000    0.000000    0.000000    0.000000    43.00486213 -78.7943376 00.000000   1
4   0   0   16  0.000000    0.000000    0.000000    0.000000    43.00036656 -78.79690824    00.000000   1
5   0   0   16  0.000000    0.000000    0.000000    0.000000    42.99662272 -78.79462819    00.000000   1
6   0   0   16  0.000000    0.000000    0.000000    0.000000    42.99632844 -78.78595508    00.000000   1
7   0   0   16  0.000000    0.000000    0.000000    0.000000    42.99699875 -78.77866787    00.000000   1
8   0   0   16  0.000000    0.000000    0.000000    0.000000    42.99945106 -78.77544898    00.000000   1
9   0   0   16  0.000000    0.000000    0.000000    0.000000    43.00245909 -78.77551604    00.000000   1
10  0   0   16  0.000000    0.000000    0.000000    0.000000    43.00208309 -78.78152911    00.000000   1
11  0   0   16  0.000000    0.000000    0.000000    0.000000    43.00469866 -78.78515036    00.000000   1
12  0   0   21  0.000000    0.000000    0.000000    0.000000    43.0050256  -78.78537389    00.000000   1

I tried several different missions but nothing's happening. What's the problem here? Also, how do we add obstacles to the map?

jmodares commented 5 years ago

Hi Rajat,

There is no need to manipulate makefile directly as long as you config the project correctly via cplex.pri. Mission File format: It contains areas and agents' positions. Each area starts with "Takeoff" waypoint and end with "Land" waypoint. The first area is the main area to search and the other areas shows the obstacles (or jamming area). Each agent's position is specified by a "Return to Home" waypoint. We can put this on the planner wiki page.

Let's take a look at startPlanner, where the areas and position get set: https://github.com/jmodares/UB-ANC-Planner/blob/master/UBPlanner.cpp#L100

Everything is ignored except TAKEOFF, LAND, RETURN TO LAUNCH. The first sequence of takeoff-land is the polygon for the area, and other sequences are obstacles. RETURN TO LAUNCH are positions of agents (drones). So you can ignore HOME, as it should be in every mission file.

I attached two mission files, one without obstacles, one with obstacles.

area1.txt area2.txt

Please try them and let me know if you still have issues

Thanks, Jalil

rajat2004 commented 5 years ago

Hi, Thanks a lot for the reply and for the mission files. The planner works perfectly now.

Regarding the changes in the Makefile, I added the flag -std=c++11 to CXXFLAGS and linked the libdl library by adding -ldl to LIBS. The changes might be required only for my system, I'm not sure.

Just to clarify, we modify the number of drones by adding more RTL commands to the mission, right?

Thanks, Rajat

jmodares commented 5 years ago

Hi Rajat,

I'm glad to hear your planner is working. That's correct, we can add more drones (agents) using RTL waypoints. Indeed RTL waypoints show the position of agents in the network.

Hope that helps.

Regardsm Jalil