GCOP  1.0
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types
gcop::Body3d< c > Class Template Reference

#include <body3d.h>

Inheritance diagram for gcop::Body3d< c >:
Inheritance graph
[legend]
Collaboration diagram for gcop::Body3d< c >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Body3d ()
 Body3d (const Vector3d &ds, double m)
 Body3d (const Vector3d &ds, double m, const Vector3d &J)
virtual ~Body3d ()
virtual double Step (Body3dState &xb, double t, const Body3dState &xa, const Vectorcd &u, double h, const VectorXd *p=0, Matrix12d *A=0, Matrix12xcd *B=0, Matrix12Xd *C=0)
virtual bool NoiseMatrix (Matrix12d &Q, double t, const Body3dState &x, const Vectorcd &u, double h, const VectorXd *p=0)
double SympStep (double t, Body3dState &xb, const Body3dState &xa, const Vectorcd &u, double h, const VectorXd *p=0, Matrix12d *A=0, Matrix12xcd *B=0, Matrix12Xd *C=0)
double EulerStep (double t, Body3dState &xb, const Body3dState &xa, const Vectorcd &u, double h, const VectorXd *p=0, Matrix12d *A=0, Matrix12xcd *B=0, Matrix12Xd *C=0)
void ID (Vector6d &f, double t, const Body3dState &xb, const Body3dState &xa, const Vectorcd &u, double h)
void StateAndControlsToFlat (VectorXd &y, const Body3dState &x, const Vectorcd &u)
void FlatToStateAndControls (Body3dState &x, Vectorcd &u, const std::vector< VectorXd > &y)

Static Public Member Functions

static void Compute (Vector3d &J, double m, const Vector3d &ds)
static void Compute (Vector6d &I, double m, const Vector3d &ds)

Public Attributes

Vector3d ds
 body dimensions
double m
 mass
Vector3d J
 3x1 principal moments of inertia
Vector6d I
 6x1 spatial inertia matrix
Vector6d Ii
 6x1 spatial inertia matrix inverse
Vector3d Dw
 linear rotational damping terms
Vector3d Dv
 linear translational damping terms
Vector3d fp
 constant position force in spatial frame (e.g. due to gravity)
Matrix6xcd Bu
 control input transformation
bool symp
 symplectic?
string name
 Unique name of the body.
double sw
 process noise: standard deviation in torque (zero by default)
double sv
 process noise: standard deviation in force (zero by default)

Protected Types

typedef Matrix< double, c, 1 > Vectorcd
typedef Matrix< double, c, c > Matrixcd
typedef Matrix< double, 6, c > Matrix6xcd
typedef Matrix< double, 12, c > Matrix12xcd
typedef Matrix< double,
12, Dynamic > 
Matrix12Xd

Detailed Description

template<int c = 6>
class gcop::Body3d< c >

A single rigid body system

Note: damping is currently supported only by Euler's method

Author: Marin Kobilarov marin(at)jhu.edu


Member Typedef Documentation

template<int c = 6>
typedef Matrix<double, 12, c> gcop::Body3d< c >::Matrix12xcd [protected]
template<int c = 6>
typedef Matrix<double, 12, Dynamic> gcop::Body3d< c >::Matrix12Xd [protected]
template<int c = 6>
typedef Matrix<double, 6, c> gcop::Body3d< c >::Matrix6xcd [protected]
template<int c = 6>
typedef Matrix<double, c, c> gcop::Body3d< c >::Matrixcd [protected]
template<int c = 6>
typedef Matrix<double, c, 1> gcop::Body3d< c >::Vectorcd [protected]

Constructor & Destructor Documentation

template<int c>
gcop::Body3d< c >::Body3d ( )
template<int c>
gcop::Body3d< c >::Body3d ( const Vector3d &  ds,
double  m 
)
template<int c>
gcop::Body3d< c >::Body3d ( const Vector3d &  ds,
double  m,
const Vector3d &  J 
)
template<int c>
gcop::Body3d< c >::~Body3d ( ) [virtual]

Member Function Documentation

template<int c>
void gcop::Body3d< c >::Compute ( Vector3d &  J,
double  m,
const Vector3d &  ds 
) [static]

Compute moments of inertia J given mass m and dimensions ds

Parameters:
Jmoments of inertia (3x1 vector)
mmass
dsdimensions (assume a rectangular body)

Referenced by gcop::Body3d< c >::Body3d().

template<int c>
void gcop::Body3d< c >::Compute ( Vector6d I,
double  m,
const Vector3d &  ds 
) [static]

Compute moments of inertia tensor I given mass m and dimensions ds

Parameters:
Jmoments of inertia (6x1 vector)
mmass
dsdimensions (assume a rectangular body)
template<int c>
double gcop::Body3d< c >::EulerStep ( double  t,
Body3dState xb,
const Body3dState xa,
const Vectorcd u,
double  h,
const VectorXd *  p = 0,
Matrix12d A = 0,
Matrix12xcd B = 0,
Matrix12Xd C = 0 
)
template<int c>
void gcop::Body3d< c >::FlatToStateAndControls ( Body3dState x,
Vectorcd u,
const std::vector< VectorXd > &  y 
)

References gcop::SO3::Instance().

template<int c>
void gcop::Body3d< c >::ID ( Vector6d f,
double  t,
const Body3dState xb,
const Body3dState xa,
const Vectorcd u,
double  h 
)

Inverse dynamics

Parameters:
finverse dynamics vector
ttime
xbend state
xastart state
ucontrol
htime-step
template<int c>
bool gcop::Body3d< c >::NoiseMatrix ( Matrix12d Q,
double  t,
const Body3dState x,
const Vectorcd u,
double  h,
const VectorXd *  p = 0 
) [virtual]
template<int c>
void gcop::Body3d< c >::StateAndControlsToFlat ( VectorXd &  y,
const Body3dState x,
const Vectorcd u 
)
template<int c>
double gcop::Body3d< c >::Step ( Body3dState xb,
double  t,
const Body3dState xa,
const Vectorcd u,
double  h,
const VectorXd *  p = 0,
Matrix12d A = 0,
Matrix12xcd B = 0,
Matrix12Xd C = 0 
) [virtual]
template<int c>
double gcop::Body3d< c >::SympStep ( double  t,
Body3dState xb,
const Body3dState xa,
const Vectorcd u,
double  h,
const VectorXd *  p = 0,
Matrix12d A = 0,
Matrix12xcd B = 0,
Matrix12Xd C = 0 
)

Member Data Documentation

template<int c = 6>
Matrix6xcd gcop::Body3d< c >::Bu

control input transformation

template<int c = 6>
Vector3d gcop::Body3d< c >::ds

body dimensions

Referenced by gcop::Body3d< c >::Body3d().

template<int c = 6>
Vector3d gcop::Body3d< c >::Dv

linear translational damping terms

template<int c = 6>
Vector3d gcop::Body3d< c >::Dw

linear rotational damping terms

template<int c = 6>
Vector3d gcop::Body3d< c >::fp

constant position force in spatial frame (e.g. due to gravity)

template<int c = 6>
Vector6d gcop::Body3d< c >::I

6x1 spatial inertia matrix

Referenced by gcop::Body3d< c >::Body3d().

template<int c = 6>
Vector6d gcop::Body3d< c >::Ii

6x1 spatial inertia matrix inverse

template<int c = 6>
Vector3d gcop::Body3d< c >::J

3x1 principal moments of inertia

Referenced by gcop::Body3d< c >::Body3d().

template<int c = 6>
double gcop::Body3d< c >::m

mass

Referenced by gcop::Body3d< c >::Body3d().

template<int c = 6>
string gcop::Body3d< c >::name

Unique name of the body.

template<int c = 6>
double gcop::Body3d< c >::sv

process noise: standard deviation in force (zero by default)

template<int c = 6>
double gcop::Body3d< c >::sw

process noise: standard deviation in torque (zero by default)

template<int c = 6>
bool gcop::Body3d< c >::symp

symplectic?


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