motor_controller
Public Member Functions | List of all members
motor_controller::IRSpeedFromPositionFilter Class Reference

#include <IRSpeedFromPositionFilter.hpp>

Public Member Functions

 IRSpeedFromPositionFilter (float factor, size_t size=0)
 
bool update (base::samples::Joints &joints, bool force=false)
 

Detailed Description

This simple class applies a IR filter on a JointState to estimate the velocity. It will work only on the JointState objects that do not have the velocity set

Constructor & Destructor Documentation

◆ IRSpeedFromPositionFilter()

IRSpeedFromPositionFilter::IRSpeedFromPositionFilter ( float  factor,
size_t  size = 0 
)
Parameters
factorthe IR filter factor. A velocity update is factor * new + (1-factor)*old

Member Function Documentation

◆ update()

bool IRSpeedFromPositionFilter::update ( base::samples::Joints &  joints,
bool  force = false 
)

Update the velocities in the given structure, modifying it, if possible

Parameters
forceif true, all velocities are updated. Otherwise, only the ones that are currently unset will be computed
Returns
true if the velocities have been updated (there was enough information to compute it) and false otherwise.

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