Namespaces | Classes | Typedefs | Functions | Variables
dmp Namespace Reference

Namespaces

namespace  msg
namespace  srv

Classes

struct  DMPData_
struct  DMPPoint_
struct  DMPTraj_
class  FourierApprox
 Class for linear function approximation with the univariate Fourier basis. More...
class  FunctionApprox
 Interface for univariate linear function approximation. More...
struct  GetDMPPlan
struct  GetDMPPlanRequest_
struct  GetDMPPlanResponse_
struct  LearnDMPFromDemo
struct  LearnDMPFromDemoRequest_
struct  LearnDMPFromDemoResponse_
class  RadialApprox
 Class for linear function approximation with the univariate Radial basis. More...
struct  SetActiveDMP
struct  SetActiveDMPRequest_
struct  SetActiveDMPResponse_

Typedefs

typedef ::dmp::DMPData_
< std::allocator< void > > 
DMPData
typedef boost::shared_ptr
< ::dmp::DMPData const > 
DMPDataConstPtr
typedef boost::shared_ptr
< ::dmp::DMPData
DMPDataPtr
typedef ::dmp::DMPPoint_
< std::allocator< void > > 
DMPPoint
typedef boost::shared_ptr
< ::dmp::DMPPoint const > 
DMPPointConstPtr
typedef boost::shared_ptr
< ::dmp::DMPPoint
DMPPointPtr
typedef ::dmp::DMPTraj_
< std::allocator< void > > 
DMPTraj
typedef boost::shared_ptr
< ::dmp::DMPTraj const > 
DMPTrajConstPtr
typedef boost::shared_ptr
< ::dmp::DMPTraj
DMPTrajPtr
typedef
::dmp::GetDMPPlanRequest_
< std::allocator< void > > 
GetDMPPlanRequest
typedef boost::shared_ptr
< ::dmp::GetDMPPlanRequest
const > 
GetDMPPlanRequestConstPtr
typedef boost::shared_ptr
< ::dmp::GetDMPPlanRequest
GetDMPPlanRequestPtr
typedef
::dmp::GetDMPPlanResponse_
< std::allocator< void > > 
GetDMPPlanResponse
typedef boost::shared_ptr
< ::dmp::GetDMPPlanResponse
const > 
GetDMPPlanResponseConstPtr
typedef boost::shared_ptr
< ::dmp::GetDMPPlanResponse
GetDMPPlanResponsePtr
typedef
::dmp::LearnDMPFromDemoRequest_
< std::allocator< void > > 
LearnDMPFromDemoRequest
typedef boost::shared_ptr
< ::dmp::LearnDMPFromDemoRequest
const > 
LearnDMPFromDemoRequestConstPtr
typedef boost::shared_ptr
< ::dmp::LearnDMPFromDemoRequest
LearnDMPFromDemoRequestPtr
typedef
::dmp::LearnDMPFromDemoResponse_
< std::allocator< void > > 
LearnDMPFromDemoResponse
typedef boost::shared_ptr
< ::dmp::LearnDMPFromDemoResponse
const > 
LearnDMPFromDemoResponseConstPtr
typedef boost::shared_ptr
< ::dmp::LearnDMPFromDemoResponse
LearnDMPFromDemoResponsePtr
typedef
::dmp::SetActiveDMPRequest_
< std::allocator< void > > 
SetActiveDMPRequest
typedef boost::shared_ptr
< ::dmp::SetActiveDMPRequest
const > 
SetActiveDMPRequestConstPtr
typedef boost::shared_ptr
< ::dmp::SetActiveDMPRequest
SetActiveDMPRequestPtr
typedef
::dmp::SetActiveDMPResponse_
< std::allocator< void > > 
SetActiveDMPResponse
typedef boost::shared_ptr
< ::dmp::SetActiveDMPResponse
const > 
SetActiveDMPResponseConstPtr
typedef boost::shared_ptr
< ::dmp::SetActiveDMPResponse
SetActiveDMPResponsePtr

Functions

double calcPhase (double curr_time, double tau)
 Calculate an exp-decaying 1 to 0 phase based on time and the time scaling constant tau.
void generatePlan (const std::vector< DMPData > &dmp_list, const std::vector< double > &x_0, const std::vector< double > &x_dot_0, const double &t_0, const std::vector< double > &goal, const std::vector< double > &goal_thresh, const double &seg_length, const double &tau, const double &total_dt, const int &integrate_iter, DMPTraj &plan, uint8_t &at_goal)
void generatePlan (const vector< DMPData > &dmp_list, const vector< double > &x_0, const vector< double > &x_dot_0, const double &t_0, const vector< double > &goal, const vector< double > &goal_thresh, const double &seg_length, const double &tau, const double &total_dt, const int &integrate_iter, DMPTraj &plan, uint8_t &at_goal)
 Use the current active multi-dim DMP to create a plan starting from x_0 toward a goal.
void learnFromDemo (const DMPTraj &demo, const std::vector< double > &k_gains, const std::vector< double > &d_gains, const int &num_bases, std::vector< DMPData > &dmp_list)
void learnFromDemo (const DMPTraj &demo, const vector< double > &k_gains, const vector< double > &d_gains, const int &num_bases, vector< DMPData > &dmp_list)
 Given a single demo trajectory, produces a multi-dim DMP.
template<typename ContainerAllocator >
std::ostream & operator<< (std::ostream &s, const ::dmp::DMPPoint_< ContainerAllocator > &v)
template<typename ContainerAllocator >
std::ostream & operator<< (std::ostream &s, const ::dmp::DMPTraj_< ContainerAllocator > &v)
template<typename ContainerAllocator >
std::ostream & operator<< (std::ostream &s, const ::dmp::DMPData_< ContainerAllocator > &v)

Variables

double alpha = -log(0.01)
const double PI = 3.14159265359

Detailed Description

Author:
Scott Niekum

Typedef Documentation

typedef ::dmp::DMPData_<std::allocator<void> > dmp::DMPData

Definition at line 52 of file DMPData.h.

typedef boost::shared_ptr< ::dmp::DMPData const> dmp::DMPDataConstPtr

Definition at line 55 of file DMPData.h.

typedef boost::shared_ptr< ::dmp::DMPData> dmp::DMPDataPtr

Definition at line 54 of file DMPData.h.

typedef ::dmp::DMPPoint_<std::allocator<void> > dmp::DMPPoint

Definition at line 47 of file DMPPoint.h.

typedef boost::shared_ptr< ::dmp::DMPPoint const> dmp::DMPPointConstPtr

Definition at line 50 of file DMPPoint.h.

typedef boost::shared_ptr< ::dmp::DMPPoint> dmp::DMPPointPtr

Definition at line 49 of file DMPPoint.h.

typedef ::dmp::DMPTraj_<std::allocator<void> > dmp::DMPTraj

Definition at line 48 of file DMPTraj.h.

typedef boost::shared_ptr< ::dmp::DMPTraj const> dmp::DMPTrajConstPtr

Definition at line 51 of file DMPTraj.h.

typedef boost::shared_ptr< ::dmp::DMPTraj> dmp::DMPTrajPtr

Definition at line 50 of file DMPTraj.h.

typedef ::dmp::GetDMPPlanRequest_<std::allocator<void> > dmp::GetDMPPlanRequest

Definition at line 87 of file GetDMPPlan.h.

typedef boost::shared_ptr< ::dmp::GetDMPPlanRequest const> dmp::GetDMPPlanRequestConstPtr

Definition at line 90 of file GetDMPPlan.h.

typedef boost::shared_ptr< ::dmp::GetDMPPlanRequest> dmp::GetDMPPlanRequestPtr

Definition at line 89 of file GetDMPPlan.h.

typedef ::dmp::GetDMPPlanResponse_<std::allocator<void> > dmp::GetDMPPlanResponse

Definition at line 120 of file GetDMPPlan.h.

typedef boost::shared_ptr< ::dmp::GetDMPPlanResponse const> dmp::GetDMPPlanResponseConstPtr

Definition at line 123 of file GetDMPPlan.h.

typedef boost::shared_ptr< ::dmp::GetDMPPlanResponse> dmp::GetDMPPlanResponsePtr

Definition at line 122 of file GetDMPPlan.h.

Definition at line 63 of file LearnDMPFromDemo.h.

Definition at line 66 of file LearnDMPFromDemo.h.

Definition at line 65 of file LearnDMPFromDemo.h.

Definition at line 96 of file LearnDMPFromDemo.h.

Definition at line 99 of file LearnDMPFromDemo.h.

Definition at line 98 of file LearnDMPFromDemo.h.

typedef ::dmp::SetActiveDMPRequest_<std::allocator<void> > dmp::SetActiveDMPRequest

Definition at line 47 of file SetActiveDMP.h.

typedef boost::shared_ptr< ::dmp::SetActiveDMPRequest const> dmp::SetActiveDMPRequestConstPtr

Definition at line 50 of file SetActiveDMP.h.

Definition at line 49 of file SetActiveDMP.h.

typedef ::dmp::SetActiveDMPResponse_<std::allocator<void> > dmp::SetActiveDMPResponse

Definition at line 75 of file SetActiveDMP.h.

typedef boost::shared_ptr< ::dmp::SetActiveDMPResponse const> dmp::SetActiveDMPResponseConstPtr

Definition at line 78 of file SetActiveDMP.h.

Definition at line 77 of file SetActiveDMP.h.


Function Documentation

double dmp::calcPhase ( double  curr_time,
double  tau 
)

Calculate an exp-decaying 1 to 0 phase based on time and the time scaling constant tau.

Parameters:
[in]curr_timeThe current time in seconds from the start of DMP execution / trajectory
[in]tauThe DMP time scaling constant
Returns:
A zero to one phase

Definition at line 57 of file dmp.cpp.

void dmp::generatePlan ( const std::vector< DMPData > &  dmp_list,
const std::vector< double > &  x_0,
const std::vector< double > &  x_dot_0,
const double &  t_0,
const std::vector< double > &  goal,
const std::vector< double > &  goal_thresh,
const double &  seg_length,
const double &  tau,
const double &  total_dt,
const int &  integrate_iter,
DMPTraj &  plan,
uint8_t &  at_goal 
)
void dmp::generatePlan ( const vector< DMPData > &  dmp_list,
const vector< double > &  x_0,
const vector< double > &  x_dot_0,
const double &  t_0,
const vector< double > &  goal,
const vector< double > &  goal_thresh,
const double &  seg_length,
const double &  tau,
const double &  total_dt,
const int &  integrate_iter,
DMPTraj &  plan,
uint8_t &  at_goal 
)

Use the current active multi-dim DMP to create a plan starting from x_0 toward a goal.

Parameters:
[in]dmp_listAn n-dim list of DMPs that are all linked by a single canonical (phase) system
[in]x_0The (n-dim) starting state for planning
[in]x_dot_0The (n-dim) starting instantaneous change in state for planning
[in]t_0The time in seconds at which to begin the planning segment. Should only be nonzero when doing a partial segment plan that does not start at beginning of DMP
[in]goalThe (n-dim) goal point for planning
[in]goal_threshPlanning will continue until system is within the specified threshold of goal in each dimension
[in]seg_lengthThe length of the requested plan segment in seconds. Set to -1 if plan until goal is desired.
[in]tauThe time scaling constant (in this implementation, it is the desired length of the TOTAL (not just this segment) DMP execution in seconds)
[in]total_dtThe desired time resolution of the plan
[in]integrate_iterThe number of loops used when numerically integrating accelerations
[out]planAn n-dim plan starting from x_0
[out]at_goalTrue if the final time is greater than tau AND the planned position is within goal_thresh of the goal

Definition at line 156 of file dmp.cpp.

void dmp::learnFromDemo ( const DMPTraj &  demo,
const std::vector< double > &  k_gains,
const std::vector< double > &  d_gains,
const int &  num_bases,
std::vector< DMPData > &  dmp_list 
)
void dmp::learnFromDemo ( const DMPTraj &  demo,
const vector< double > &  k_gains,
const vector< double > &  d_gains,
const int &  num_bases,
vector< DMPData > &  dmp_list 
)

Given a single demo trajectory, produces a multi-dim DMP.

Parameters:
[in]demoAn n-dim demonstration trajectory
[in]k_gainsA proportional gain for each demo dimension
[in]d_gainsA vector of differential gains for each demo dimension
[in]num_basesThe number of basis functions to use for the fxn approx (i.e. the order of the Fourier series)
[out]dmp_listAn n-dim list of DMPs that are all linked by a single canonical (phase) system

Definition at line 71 of file dmp.cpp.

template<typename ContainerAllocator >
std::ostream& dmp::operator<< ( std::ostream &  s,
const ::dmp::DMPPoint_< ContainerAllocator > &  v 
)

Definition at line 54 of file DMPPoint.h.

template<typename ContainerAllocator >
std::ostream& dmp::operator<< ( std::ostream &  s,
const ::dmp::DMPTraj_< ContainerAllocator > &  v 
)

Definition at line 55 of file DMPTraj.h.

template<typename ContainerAllocator >
std::ostream& dmp::operator<< ( std::ostream &  s,
const ::dmp::DMPData_< ContainerAllocator > &  v 
)

Definition at line 59 of file DMPData.h.


Variable Documentation

double dmp::alpha = -log(0.01)

Definition at line 49 of file dmp.cpp.

const double dmp::PI = 3.14159265359

Definition at line 52 of file fourier_approx.h.



dmp
Author(s): Scott Niekum
autogenerated on Fri Jan 3 2014 11:19:23