class mrpt::nav::VelocityFilter

Overview

Handles velocity command generation with speed limits and filtering.

Extracted from CAbstractPTGBasedReactive to reduce its complexity.

#include <mrpt/nav/reactive/VelocityFilter.h>

class VelocityFilter
{
public:
    // methods

    double generateVelCmd(
        const TCandidateMovementPTG& in_movement,
        mrpt::kinematics::CVehicleVelCmd::Ptr& new_vel_cmd,
        double speedfilter_tau,
        const mrpt::kinematics::CVehicleVelCmd::TVelCmdParams& robot_absolute_speed_limits,
        double meanExecutionPeriod,
        mrpt::system::CTimeLogger& timelogger
        );

    mrpt::kinematics::CVehicleVelCmd::Ptr getLastVelCmd() const;
    void resetLastVelCmd();
};

Methods

double generateVelCmd(
    const TCandidateMovementPTG& in_movement,
    mrpt::kinematics::CVehicleVelCmd::Ptr& new_vel_cmd,
    double speedfilter_tau,
    const mrpt::kinematics::CVehicleVelCmd::TVelCmdParams& robot_absolute_speed_limits,
    double meanExecutionPeriod,
    mrpt::system::CTimeLogger& timelogger
    )

Generates a velocity command from the selected candidate movement, applying speed limits and filtering.

Returns:

The [0,1] velocity scale of the raw PTG cmd_vel

mrpt::kinematics::CVehicleVelCmd::Ptr getLastVelCmd() const

Access to the last velocity command (for hysteresis comparisons)

void resetLastVelCmd()

Reset the last velocity command state.