wbc
wbc::JointIntegrator Class Reference

The JointIntegrator class implements different numerical integrators. More...

#include <JointIntegrator.hpp>

Public Member Functions

 JointIntegrator ()
 
void integrate (const base::samples::Joints &joint_state, base::commands::Joints &cmd, double cycle_time, IntegrationMethod method=RECTANGULAR, bool use_cur_state=false)
 Performs numerical from acceleration/velocity to positions.
 
void integrateRectangular (base::commands::Joints &cmd, double cycle_time, bool use_cur_state=false)
 Performs numerical from acceleration/velocity to positions using rectangular method.
 
void integrateTrapezoidal (base::commands::Joints &cmd, double cycle_time, bool use_cur_state=false)
 Trapezoidal method for numerical integration.
 
base::JointState::MODE cmdMode (const base::JointState &cmd)
 cmdType Return the control model type POSITION/VELOCITY/ACCELERATION depending on the valid fields
 
void reinit ()
 Reinitialize state of the integrator.
 

Detailed Description

The JointIntegrator class implements different numerical integrators.

Constructor & Destructor Documentation

◆ JointIntegrator()

wbc::JointIntegrator::JointIntegrator ( )
inline

Member Function Documentation

◆ cmdMode()

base::JointState::MODE wbc::JointIntegrator::cmdMode ( const base::JointState & cmd)

cmdType Return the control model type POSITION/VELOCITY/ACCELERATION depending on the valid fields

◆ integrate()

void wbc::JointIntegrator::integrate ( const base::samples::Joints & joint_state,
base::commands::Joints & cmd,
double cycle_time,
IntegrationMethod method = RECTANGULAR,
bool use_cur_state = false )

Performs numerical from acceleration/velocity to positions.

Parameters
cmdInput joint command, wil be modified by the method
cycle_timePeriod between two consecutive calls in seconds
methodIntegration method to use
use_cur_stateIntegrate from internal (interpolated) state or from current joint state. In the first case, the integrator will not be aware of the current robot state and integrated position/velocity vs. real robot position/velocity may drift apart. As a rule-of-thumb, for stiff, position-controlled robots, use_cur_state should be false, while for compliant robots that have environment contacts, e.g., walking robots, use_cur_state should be true.

◆ integrateRectangular()

void wbc::JointIntegrator::integrateRectangular ( base::commands::Joints & cmd,
double cycle_time,
bool use_cur_state = false )

Performs numerical from acceleration/velocity to positions using rectangular method.

Parameters
cmdInput joint command, wil be modified by the method
cycle_timePeriod between two consecutive calls in seconds

◆ integrateTrapezoidal()

void wbc::JointIntegrator::integrateTrapezoidal ( base::commands::Joints & cmd,
double cycle_time,
bool use_cur_state = false )

Trapezoidal method for numerical integration.

Parameters
cmdInput joint command, wil be modified by the method
cycle_timePeriod between two consecutive calls in seconds

◆ reinit()

void wbc::JointIntegrator::reinit ( )
inline

Reinitialize state of the integrator.


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