GCOP  1.0
Public Types | Public Member Functions | Public Attributes | Protected Attributes
gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz > Class Template Reference

#include <lqsensorcost.h>

Inheritance diagram for gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >:
Inheritance graph
[legend]
Collaboration diagram for gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >:
Collaboration graph
[legend]

List of all members.

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

 LqSensorCost (System< T, _nx, _nu, _np > &sys, Manifold< Tz, _nz > &Z, bool diag=true)
void UpdateGains ()
double L (double t, const Tz &z, const Vectornd &w, const Vectormd &p, double h, int sensor_index, Vectornd *Lw=0, Matrixnd *Lww=0, Vectormd *Lp=0, Matrixmd *Lpp=0, Vectorrd *Lz=0, Matrixrd *Lzz=0, Matrixmnd *Lpw=0, Matrixrnd *Lzw=0, Matrixrmd *Lzp=0)
double Lp (const Vectormd &p, Vectormd *Lp=0, Matrixmd *Lpp=0)
bool Res (Vectorgd &g, double t, const Tz &z, const Vectornd &w, const Vectormd &p, double h, int sensor_index, Matrixgxd *dgdw=0, Matrixgpd *dgdp=0, Matrixgzd *dgdz=0)
bool Resp (Vectormd &gp, const Vectormd &p, Matrixmd *dgdp=0)
void SetReference (const vector< Tz > *zs, Vectormd *mup=0)

Public Attributes

bool diag
 are the Q, Qf, and R matrices diagonal (true by default)
Matrixrd R
 inverse of measurement covariance matrix
Matrixnd S
 inverse of noise covariance matrix
Matrixmd P
 inverse of parameter covariance matrix (set to zero if nothing is known about parameters before hand)
Matrixnd Ssqrt
 S sqrt.
Matrixrd Rsqrt
 R sqrt.
Matrixmd Psqrt
 P sqrt.
const vector< Tz > * zs
 measured sensor data
Vectormdmup
 Prior for parameter data.

Protected Attributes

Vectorrd dz
 measurement error (as a tangent vector)
Vectormd dp
 parameter error

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
class gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >


Member Typedef Documentation

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nu, _nu> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixcd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nu, _nx> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixcnd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _ng, _np> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixgpd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _ng, _nu> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixgud
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _ng, _nx> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixgxd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _ng, _nz> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixgzd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _np, _np> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixmd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _np, _nx> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixmnd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nx, _nu> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixncd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nx, _nx> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixnd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nx, _np> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixnmd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nz, _nu> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixrcd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nz, _nz> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixrd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nz, _np> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixrmd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nz, _nx> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Matrixrnd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nu, 1> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Vectorcd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _ng, 1> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Vectorgd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _np, 1> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Vectormd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nx, 1> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Vectornd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
typedef Matrix<double, _nz, 1> gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Vectorrd

Constructor & Destructor Documentation

template<typename T, int _nx, int _nu, int _np, int _ng, typename Tz, int _nz>
gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::LqSensorCost ( System< T, _nx, _nu, _np > &  sys,
Manifold< Tz, _nz > &  Z,
bool  diag = true 
)

Member Function Documentation

template<typename T , int _nx, int _nu, int _np, int _ng, typename Tz, int _nz>
double gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::L ( double  t,
const Tz &  z,
const Vectornd w,
const Vectormd p,
double  h,
int  sensor_index,
Vectornd Lw = 0,
Matrixnd Lww = 0,
Vectormd Lp = 0,
Matrixmd Lpp = 0,
Vectorrd Lz = 0,
Matrixrd Lzz = 0,
Matrixmnd Lpw = 0,
Matrixrnd Lzw = 0,
Matrixrmd Lzp = 0 
)
template<typename T , int _nx, int _nu, int _np, int _ng, typename Tz , int _nz>
double gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Lp ( const Vectormd p,
Vectormd Lp = 0,
Matrixmd Lpp = 0 
) [virtual]

Part of cost function which is independent of time and only dependent on parameters The net cost for a trajectory is sum i:1->N [L_i] + Lp

Parameters:
pparameters
Lpderivative wrt p
Lppderivative wrt p,p

Reimplemented from gcop::SensorCost< T, _nx, _nu, _np, Tz, _nz >.

template<typename T , int _nx, int _nu, int _np, int _ng, typename Tz, int _nz>
bool gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Res ( Vectorgd g,
double  t,
const Tz &  z,
const Vectornd w,
const Vectormd p,
double  h,
int  sensor_index,
Matrixgxd dgdw = 0,
Matrixgpd dgdp = 0,
Matrixgzd dgdz = 0 
)

References np.

template<typename T , int _nx, int _nu, int _np, int _ng, typename Tz , int _nz>
bool gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Resp ( Vectormd gp,
const Vectormd p,
Matrixmd dgdp = 0 
) [virtual]

Residual Cost independent of time and only dependent on parameters

Parameters:
gresidual for parameters
pparameter
dgdpderivative wrt p

Reimplemented from gcop::LsSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >.

template<typename T , int _nx, int _nu, int _np, int _ng, typename Tz, int _nz>
void gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::SetReference ( const vector< Tz > *  zs,
Vectormd mup = 0 
)

Set observed measurements for the cost

Parameters:
zsobserved measurements
mupmean parameters (Prior for parameters)
template<typename T , int _nx, int _nu, int _np, int _ng, typename Tz , int _nz>
void gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::UpdateGains ( )

Updates the square root gains, i.e. sets Qsqrt = Q.sqrt(), etc...

Referenced by gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::LqSensorCost().


Member Data Documentation

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
bool gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::diag

are the Q, Qf, and R matrices diagonal (true by default)

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Vectormd gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::dp [protected]
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Vectorrd gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::dz [protected]

measurement error (as a tangent vector)

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Vectormd* gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::mup
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Matrixmd gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::P

inverse of parameter covariance matrix (set to zero if nothing is known about parameters before hand)

Referenced by gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::LqSensorCost().

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Matrixmd gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Psqrt
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Matrixrd gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::R

inverse of measurement covariance matrix

Referenced by gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::LqSensorCost().

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Matrixrd gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Rsqrt
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Matrixnd gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::S

inverse of noise covariance matrix

Referenced by gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::LqSensorCost().

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
Matrixnd gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::Ssqrt
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tz = VectorXd, int _nz = Dynamic>
const vector<Tz>* gcop::LqSensorCost< T, _nx, _nu, _np, _ng, Tz, _nz >::zs

The documentation for this class was generated from the following file: