Drake
CartesianSetpoint< Scalar > Class Template Reference

This is used to compute target spatial acceleration, which is the input to the inverse dynamics controller. More...

#include <drake/systems/controllers/setpoint.h>

Public Member Functions

 CartesianSetpoint ()
 
 CartesianSetpoint (const Isometry3< Scalar > &pose_d, const Vector6< Scalar > &vel_d, const Vector6< Scalar > &acc_d, const Vector6< Scalar > &Kp, const Vector6< Scalar > &Kd)
 
Vector6< Scalar > ComputeTargetAcceleration (const Isometry3< Scalar > &pose, const Vector6< Scalar > &vel) const
 Computes target acceleration using PD feedback + feedfoward acceleration. More...
 
bool is_valid () const
 
const Isometry3< Scalar > & desired_pose () const
 
const Vector6< Scalar > & desired_velocity () const
 
const Vector6< Scalar > & desired_acceleration () const
 
const Vector6< Scalar > & Kp () const
 
const Vector6< Scalar > & Kd () const
 
Isometry3< Scalar > & mutable_desired_pose ()
 
Vector6< Scalar > & mutable_desired_velocity ()
 
Vector6< Scalar > & mutable_desired_acceleration ()
 
Vector6< Scalar > & mutable_Kp ()
 
Vector6< Scalar > & mutable_Kd ()
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 CartesianSetpoint (const CartesianSetpoint &)=default
 
CartesianSetpointoperator= (const CartesianSetpoint &)=default
 
 CartesianSetpoint (CartesianSetpoint &&)=default
 
CartesianSetpointoperator= (CartesianSetpoint &&)=default
 

Detailed Description

template<typename Scalar>
class drake::systems::controllers::CartesianSetpoint< Scalar >

This is used to compute target spatial acceleration, which is the input to the inverse dynamics controller.

The target acceleration is computed by: acceleration_d = Kp*(x* - x) + Kd*(xd* - xd) + xdd*, where x is pose, xd is velocity, and xdd is acceleration. Variables with superscript * are the set points, and Kp and Kd are the position and velocity gains.

Pose "difference" is computed as: H^w_d = E * H^w_m, E = H^w_d * H^w_m.inverse(), where H^w_d = desired orientation in the world frame, H^w_m = measured orientation in the world frame, E = a small rotation in the world frame from measured to desired.

The first terms 3 are angular accelerations, and the last 3 are linear accelerations.

Constructor & Destructor Documentation

◆ CartesianSetpoint() [1/4]

CartesianSetpoint ( const CartesianSetpoint< Scalar > &  )
default

◆ CartesianSetpoint() [2/4]

CartesianSetpoint ( CartesianSetpoint< Scalar > &&  )
default

◆ CartesianSetpoint() [3/4]

CartesianSetpoint ( )
inline

◆ CartesianSetpoint() [4/4]

CartesianSetpoint ( const Isometry3< Scalar > &  pose_d,
const Vector6< Scalar > &  vel_d,
const Vector6< Scalar > &  acc_d,
const Vector6< Scalar > &  Kp,
const Vector6< Scalar > &  Kd 
)
inline
Parameters
pose_dDesired pose
vel_dDesired velocity
acc_dDesired feedforward acceleration
KpPosition gain
KdVelocity gain

Member Function Documentation

◆ ComputeTargetAcceleration()

Vector6<Scalar> ComputeTargetAcceleration ( const Isometry3< Scalar > &  pose,
const Vector6< Scalar > &  vel 
) const
inline

Computes target acceleration using PD feedback + feedfoward acceleration.

Parameters
poseMeasured pose
velMeasured velocity
Returns
Computed spatial acceleration.

◆ desired_acceleration()

const Vector6<Scalar>& desired_acceleration ( ) const
inline

◆ desired_pose()

const Isometry3<Scalar>& desired_pose ( ) const
inline

◆ desired_velocity()

const Vector6<Scalar>& desired_velocity ( ) const
inline

◆ is_valid()

bool is_valid ( ) const
inline

◆ Kd()

const Vector6<Scalar>& Kd ( ) const
inline

◆ Kp()

const Vector6<Scalar>& Kp ( ) const
inline

◆ mutable_desired_acceleration()

Vector6<Scalar>& mutable_desired_acceleration ( )
inline

◆ mutable_desired_pose()

Isometry3<Scalar>& mutable_desired_pose ( )
inline

◆ mutable_desired_velocity()

Vector6<Scalar>& mutable_desired_velocity ( )
inline

◆ mutable_Kd()

Vector6<Scalar>& mutable_Kd ( )
inline

◆ mutable_Kp()

Vector6<Scalar>& mutable_Kp ( )
inline

◆ operator=() [1/2]

CartesianSetpoint& operator= ( const CartesianSetpoint< Scalar > &  )
default

◆ operator=() [2/2]

CartesianSetpoint& operator= ( CartesianSetpoint< Scalar > &&  )
default

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