- 3.0.2 rigid body dynamics module.
ct::rbd::JointPositionPIDController< NJOINTS > Class Template Reference

A joint position controller using a PID controller for all joints. More...

#include <JointPositionPIDController.h>

Inheritance diagram for ct::rbd::JointPositionPIDController< NJOINTS >:
ct::core::Controller< 2 *NJOINTS, NJOINTS >

Public Types

typedef std::shared_ptr< JointPositionPIDController< NJOINTS > > Ptr
 
typedef ct::core::PIDController< double > PIDController
 

Public Member Functions

virtual JointPositionPIDController< NJOINTS > * clone () const override
 
 JointPositionPIDController (const Eigen::Matrix< double, NJOINTS, 1 > &desiredPosition=Eigen::Matrix< double, NJOINTS, 1 >::Zero(), const Eigen::Matrix< double, NJOINTS, 1 > &desiredVelocity=Eigen::Matrix< double, NJOINTS, 1 >::Zero(), const std::vector< PIDController::parameters_t > &parameters=std::vector< PIDController::parameters_t >(NJOINTS, PIDController::parameters_t()))
 
 JointPositionPIDController (const Eigen::Matrix< double, NJOINTS, 1 > &desiredPosition, const Eigen::Matrix< double, NJOINTS, 1 > &desiredVelocity, const PIDController::parameters_t &parameters)
 
virtual ~JointPositionPIDController ()
 
void computeControl (const core::StateVector< STATE_DIM > &state, const core::Time &t, core::ControlVector< NJOINTS > &control) override
 
void setDesiredPosition (const Eigen::Matrix< double, NJOINTS, 1 > &desiredPosition)
 
void setDesiredPosition (double desiredPosition, int jointId)
 
void setAllPIDGains (double kp, double ki, double kd)
 
void reset ()
 
- Public Member Functions inherited from ct::core::Controller< 2 *NJOINTS, NJOINTS >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Controller ()
 
 Controller (const Controller &other)
 
virtual ~Controller ()
 
virtual void computeControl (const StateVector< 2 *NJOINTS, SCALAR > &state, const SCALAR &t, ControlVector< NJOINTS, SCALAR > &controlAction)=0
 
virtual ControlMatrix< NJOINTS, SCALARgetDerivativeU0 (const StateVector< 2 *NJOINTS, SCALAR > &state, const SCALAR time)
 
virtual ControlMatrix< NJOINTS, SCALARgetDerivativeUf (const StateVector< 2 *NJOINTS, SCALAR > &state, const SCALAR time)
 

Static Public Attributes

static const size_t STATE_DIM = 2 * NJOINTS
 
static const size_t CONTROL_DIM = NJOINTS
 

Protected Attributes

std::vector< PIDControllerjointControllers_
 

Detailed Description

template<size_t NJOINTS>
class ct::rbd::JointPositionPIDController< NJOINTS >

A joint position controller using a PID controller for all joints.

Template Parameters
NJOINTSnumber of joints of the robot

Member Typedef Documentation

◆ Ptr

template<size_t NJOINTS>
typedef std::shared_ptr<JointPositionPIDController<NJOINTS> > ct::rbd::JointPositionPIDController< NJOINTS >::Ptr

◆ PIDController

template<size_t NJOINTS>
typedef ct::core::PIDController<double> ct::rbd::JointPositionPIDController< NJOINTS >::PIDController

Constructor & Destructor Documentation

◆ JointPositionPIDController() [1/2]

template<size_t NJOINTS>
ct::rbd::JointPositionPIDController< NJOINTS >::JointPositionPIDController ( const Eigen::Matrix< double, NJOINTS, 1 > &  desiredPosition = Eigen::Matrix<double, NJOINTS, 1>::Zero(),
const Eigen::Matrix< double, NJOINTS, 1 > &  desiredVelocity = Eigen::Matrix<double, NJOINTS, 1>::Zero(),
const std::vector< PIDController::parameters_t > &  parameters = std::vector<PIDController::parameters_t>(NJOINTS,            PIDController::parameters_t()) 
)

References i.

◆ JointPositionPIDController() [2/2]

template<size_t NJOINTS>
ct::rbd::JointPositionPIDController< NJOINTS >::JointPositionPIDController ( const Eigen::Matrix< double, NJOINTS, 1 > &  desiredPosition,
const Eigen::Matrix< double, NJOINTS, 1 > &  desiredVelocity,
const PIDController::parameters_t &  parameters 
)

References i.

◆ ~JointPositionPIDController()

template<size_t NJOINTS>
ct::rbd::JointPositionPIDController< NJOINTS >::~JointPositionPIDController ( )
virtual

Member Function Documentation

◆ clone()

template<size_t NJOINTS>
JointPositionPIDController< NJOINTS > * ct::rbd::JointPositionPIDController< NJOINTS >::clone ( ) const
overridevirtual

◆ computeControl()

template<size_t NJOINTS>
void ct::rbd::JointPositionPIDController< NJOINTS >::computeControl ( const core::StateVector< STATE_DIM > &  state,
const core::Time t,
core::ControlVector< NJOINTS > &  control 
)
override

◆ setDesiredPosition() [1/2]

template<size_t NJOINTS>
void ct::rbd::JointPositionPIDController< NJOINTS >::setDesiredPosition ( const Eigen::Matrix< double, NJOINTS, 1 > &  desiredPosition)

References i.

◆ setDesiredPosition() [2/2]

template<size_t NJOINTS>
void ct::rbd::JointPositionPIDController< NJOINTS >::setDesiredPosition ( double  desiredPosition,
int  jointId 
)

◆ setAllPIDGains()

template<size_t NJOINTS>
void ct::rbd::JointPositionPIDController< NJOINTS >::setAllPIDGains ( double  kp,
double  ki,
double  kd 
)

References i.

◆ reset()

template<size_t NJOINTS>
void ct::rbd::JointPositionPIDController< NJOINTS >::reset ( )

References i.

Member Data Documentation

◆ STATE_DIM

template<size_t NJOINTS>
const size_t ct::rbd::JointPositionPIDController< NJOINTS >::STATE_DIM = 2 * NJOINTS
static

◆ CONTROL_DIM

template<size_t NJOINTS>
const size_t ct::rbd::JointPositionPIDController< NJOINTS >::CONTROL_DIM = NJOINTS
static

◆ jointControllers_

template<size_t NJOINTS>
std::vector<PIDController> ct::rbd::JointPositionPIDController< NJOINTS >::jointControllers_
protected

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