Public Types |
typedef Matrix< double, _ng, 1 > | Vectorgd |
typedef Matrix< double, _ng, _nx > | Matrixgxd |
typedef Matrix< double, _ng, _nu > | Matrixgud |
typedef Matrix< double, _ng, _np > | Matrixgpd |
typedef Matrix< double, _ng, _nz > | Matrixgzd |
typedef Matrix< double, _nx, 1 > | Vectornd |
typedef Matrix< double, _nu, 1 > | Vectorcd |
typedef Matrix< double, _np, 1 > | Vectormd |
typedef Matrix< double, _nx, _nx > | Matrixnd |
typedef Matrix< double, _nx, _nu > | Matrixncd |
typedef Matrix< double, _nu, _nx > | Matrixcnd |
typedef Matrix< double, _nu, _nu > | Matrixcd |
typedef Matrix< double, _np, _np > | Matrixmd |
typedef Matrix< double, _nx, _np > | Matrixnmd |
typedef Matrix< double, _np, _nx > | Matrixmnd |
typedef Matrix< double, _nz, 1 > | Vectorrd |
typedef Matrix< double, _nz, _nz > | Matrixrd |
typedef Matrix< double, _nz, _nx > | Matrixrnd |
typedef Matrix< double, _nz, _nu > | Matrixrcd |
typedef Matrix< double, _nz, _np > | Matrixrmd |
Public Member Functions |
| LsSensorCost (System< T, _nx, _nu, _np > &sys, Manifold< Tz, _nz > &Z, int ng=0) |
virtual bool | Res (Vectorgd &g, double t, const Tz &z, const Vectornd &w, const Vectormd &p, double h, Matrixgxd *dgdw=0, Matrixgpd *dgdp=0, Matrixgzd *dgdz=0) |
virtual bool | Resp (Vectormd &gp, const Vectormd &p, Matrixmd *dgdp=0) |
Public Attributes |
int | ng |
| number of residuals per time-step
|
Vectorgd | g |
| residuals per time-step
|
Vectormd | gp |
| residual dependent on parameters
|
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
class gcop::LsSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >
Cost interface for optimal control on sensor manifold. Defines a cost function and means to compute difference between two states on a sensor manifold.
Subclasses should provide implementation of either a regular const function L or a parameter-dependent cost function Lp (e.g. for sys id / adaptive control / optimal design problems)
This defines cost only for a single sensor. Multiple sensors will and multiple systems based cost functions should be adapted somehow
Author1: Marin Kobilarov marin(at)jhu.edu
Author2: Gowtham Garimella ggarime1(at)jhu.edu
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T, int _nx, int _nu, int _np, int _ng, typename Tz, int _nz>
gcop::LsSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::LsSensorCost |
( |
System< T, _nx, _nu, _np > & |
sys, |
|
|
Manifold< Tz, _nz > & |
Z, |
|
|
int |
ng = 0 |
|
) |
| |
create a cost interface for optimal estimation problem
- Parameters:
-
sys | provides the state manifold which is used to perform addition/subtraction of states |
sensor | provides the sensor manifold and measurement model for computing the cost |
ng | number of residuals per time-step |
References gcop::LsSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::g, gcop::LsSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::gp, np, and gcop::System< T, _nx, _nu, _np >::P.
template<typename T , int _nx, int _nu, int _np, int _ng, typename Tz, int _nz>
bool gcop::LsSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Res |
( |
Vectorgd & |
g, |
|
|
double |
t, |
|
|
const Tz & |
z, |
|
|
const Vectornd & |
w, |
|
|
const Vectormd & |
p, |
|
|
double |
h, |
|
|
Matrixgxd * |
dgdw = 0 , |
|
|
Matrixgpd * |
dgdp = 0 , |
|
|
Matrixgzd * |
dgdz = 0 |
|
) |
| [virtual] |
Residual cost with noise as input (For estimation problems) #TODO Modify this to directly accept z sensor estimation instead of x, u
- Parameters:
-
g | residual |
t | time |
z | sensor measurement |
w | noise |
h | time-step |
p | parameter (optional) |
dgdw | derivative wrt w (optional) |
dgdp | derivative wrt p (optional) |
dgdz | derivative wrt p (optional) |
template<typename T , int _nx, int _nu, int _np, int _ng, typename Tz , int _nz>
Residual Cost independent of time and only dependent on parameters
- Parameters:
-
g | residual for parameters |
p | parameter |
dgdp | derivative wrt p |
Reimplemented in gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >, and gcop::LqSensorCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng, Matrix< double, _nz, 1 >, _nz >.
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
number of residuals per time-step