RoboticExplorationLab / TrajectoryOptimization.jl

A fast trajectory optimization library written in Julia
https://roboticexplorationlab.org
MIT License
322 stars 62 forks source link

Defining LQR problem with quaternion #38

Closed PepMS closed 3 years ago

PepMS commented 3 years ago

Hi everyone!

I'm using the quadrotor example as the baseline to implement some modifications.

I wanted to consider the state error lying in the tangent space of the quaternion. I've seen there is a cost function called QuatLQRCost. I've tried to use it but when added to the problem I get the following error: MethodError: no method matching copy(::TrajectoryOptimization.QuadraticQuatCost{Float64,13,4,52})

Probably I'm doing something wrong since I'm not familiar with Julia. Is there any already available cost function that considers the error on the tangent space?

Any help will be much appreciated! Thank you very much!

bjack205 commented 3 years ago

So sorry for a SUPER delayed response. The quaternion cost stuff has undergone some changes, and should work now, but should still be considered experimental. Check out DiagonalQuatCost.