-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cables conflicts #123
Add cables conflicts #123
Conversation
Hi Khaled, at this point the issue and instructions are a little bit overwhelming.
and there are no collisions, but the motion is not smooth.
and see the html, but I don't know what to look at. If I run optimization,
I receive this error. But anyway, wasn't optimization included in the first command I run? I am lost here. So to continue I would recommend to test optimization as a standalone process, without the search. |
Hello Quim! I think you were following the right path but got confused in one step. The db_cbs search + the init_guess_cables.py generates the initial guess for the optimization. In the PR description, there isa section called: run optimization. This is basically the test optimization that takes "init_guess_cables.yaml" as an initial guess and runs the optimization. Please check test_optimization_DintegratorCables.cpp in dynoplan and you will find the test case. The script init_guess_cables.py generates a yaml file: init_guess_cable.yaml (which is the initial guess), and an html file where you can visualize it. Now I pushed the init_guess_cables.yaml that can be used as an initial guess for the problem instance: I will generate another initial guess for you to use for tuning, but for now at least with this you can try to run the optimization itself. |
If I run:
I get:
|
and using gdb:
|
(all of this is using your latest commit: cf2c020 ) |
This is all the instructions needed to run dbcbs, generate an initial guess and run the optimizer. Visualization for each step is included.
Model
This is a simplified model for the n quadrotors with payload. We are in x-y plane and using 2 double integrators connected with a cable and a point mass in between (i.e., no gravity and 2 2d double integrators instead of UAVs). The model is built with sympy and already added to dynobench along with the optimization problem in dynoplan.
The state of this system is
where p0 is the position of the payload, th1 and th2 are the angles of the cables and the rest is the derivatives of the states. The model is generated here dynomodel
Idea
The idea is we want to use dbcbs to generate the initial guess for the two-robot-cable system. This is done in two steps.
1.1 First, given the two positions of the robots and we know beforehand the lengths of the cables, we can solve a non linear optimization problem to find an estimation of where the payload could be (using the initial start state of the payload that is assumed to be known).
1.2 we check if the distances between the estimated payload position and the current position of each robots. If one of these distances is greater than the length of the cable + some slack, then this is set as a high level conflict.
1.3 Finally, after dbcbs finds a solution, we use the output of dbcbs for the two robots and the positions of the payload solved by the non linear optimization (we used nlopt) to create the initial guess of the two-robot-cable system (using
scripts/init_guess_cables.py
)build
run dbcbs and visualize solution
The last line will generate a .mp4 video for the dbcbs solution.
generate initial guess
You will find a generated html file that visualizes the initial guess
cables_integrator2_2d_window.html
.run optimization
visualize solution
problem
2.1 go to
db-CBS/dynoplan/dynobench/example/test_dintegratorCables.py
, add the state inside the script you want to investigate tostate1
2.2 build and compile dynobench as described in this PR for the python bindings, then
you will find a
test_states.html
generated with the state you want to investigate and two black and white spheres showing the point of collision.