Open FedeClaudi opened 2 years ago
Adding some more info.
I can make the dubin car escape problem almost work if I pass infeasible=true
to the solver (although the solution is always identical to the initial guess, even when I change it, which makes me think it's not actually solving anything).
However for the bicycle model toy problem infeasible=true
remains stuck at the start:
I've tried playing around with most of the parameters but it didn't affect the results in any significant way.
Thanks, Fede
For reference, solving with ipopt gives a solution that goes around the obstacle, even though it's not great and it's very slow.
using Ipopt
using MathOptInterface
const MOI = MathOptInterface
# Copy problem to avoid modifying the original problem
prob_nlp = copy(prob)
# Add the dynamics and initial conditions as explicit constraints
TrajectoryOptimization.add_dynamics_constraints!(prob_nlp)
# Reset our initial guess
initial_controls!(prob_nlp, U₀)
rollout!(prob_nlp)
# Create the NLP
nlp = TrajOptNLP(prob_nlp, remove_bounds=false, jac_type=:vector);
optimizer = Ipopt.Optimizer()
optimizer.options = Dict("max_iter" => 20000, "print_level" => 4)
TrajectoryOptimization.build_MOI!(nlp, optimizer)
MOI.optimize!(optimizer)
MOI.get(optimizer, MOI.TerminationStatus())
X = hcat(Vector(states(nlp))...,)
U = hcat(Vector(controls(nlp))...,)
# plot stuff
plt = plot(X[1, :], X[2, :], xlabel="x position", ylabel="y position", markershape=:circle, label="bike traj")
plot!(plt, prob.constraints, label="goal")
display(
plt
)
I have some questions about solving the minimum time problem with Altro. Does Altro's "problem" structure provide an interface for delta_h? I don't seem to have found it. Have you solved your minimum time problem?
Hi,
Thanks for making all these packages freely available, they're amazing.
I've starting looking through the code to get an idea of how to use it. The idea is to eventually solve a minimum time maneuvering problem with a bicycle model going through the a race track. For now, I've started looking at the various examples/problems scripts changing things to get an idea of how the different pieces fit together. However, I'm having an issue were a set of
CircleConstraint
items get ignored and the solver's solution goes right through the obstacle.I use this function to generate the obstacles
and this to generate the optimization problem:
and then to solve and plot the results:
Everything works fine, the solver converges and find a solution that matches the goal and start states, but it ignores the boundaries completely:
Am I missing something in how to add this kind of constraints to the problem, or is there some option in the solver that I should be changing?
Any help would be greatly appreciated!