TeensyNanoExoCode
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ControllerData Class Reference

class to store information related to controllers. More...

#include <ControllerData.h>

Public Member Functions

 ControllerData (config_defs::joint_id id, uint8_t *config_to_send)
 
void reconfigure (uint8_t *config_to_send)
 reconfigures the the controller data if the configuration changes after constructor called.
 
uint8_t get_parameter_length ()
 Get the parameter length for the current controller.
 

Public Attributes

uint8_t controller
 
config_defs::JointType joint
 
float setpoint
 
float ff_setpoint
 
float parameters [controller_defs::max_parameters]
 
uint8_t parameter_set
 
float filtered_torque_reading
 
float filtered_cmd
 
float filtered_setpoint = 0
 
float kf = 1
 
float prev_max_measured = 0
 
float prev_max_setpoint = 0
 
float max_measured = 0
 
float max_setpoint = 0
 
float reference_angle = 0
 
float reference_angle_offset = 0
 
bool reference_angle_updated = false
 
float filtered_squelched_supportive_term = 0
 
float neutral_angle = 0.0f
 
bool prev_calibrate_trq_sensor = false
 
const float cal_neutral_angle_alpha = 0.01f
 
float level_entrance_angle = 0.0f
 
float prev_calibrate_level_entrance = false
 
const float cal_level_entrance_angle_alpha = 0.01f
 
float fsr_toe_min_elbow = 0
 
float fsr_toe_max_elbow = 0
 
float fsr_heel_min_elbow = 0
 
float fsr_heel_max_elbow = 0
 
float fsr_toe_sum_elbow = 0
 
float fsr_heel_sum_elbow = 0
 
int i_elbow = 0
 
int fsr_toe_array_elbow [50] = {0}
 
int fsr_heel_array_elbow [50] = {0}
 
bool is_first_run_elbow = true
 
float output_limit_elbow = 5
 
float fsr_min_max_elbow = 0
 
bool is_first_fsr_reading_elbow = true
 
float fsr_toe_previous_elbow = 0
 
float fsr_heel_previous_elbow = 0
 
float elbow_cmd = 0
 
bool isPerturbing = false
 
bool ptbDetermined = false
 
float time_current_ptb = 0
 
float time_previous_ptb = 0
 
bool ptbApplied = false
 
bool ptbRandomIsFirstRun = true
 
uint16_t ptb_iStep = 0
 
bool ptb_newIsSwing = true
 
bool ptb_oldIsSwing = true
 
uint8_t ptb_frequency = 0
 
uint16_t ptb_iiStep = 0
 
uint16_t ptb_setpoint = 0
 
bool ptb_fsrGotHigh = false
 
bool calibrComplete = false
 
uint16_t iCalibr = 0
 
int PIDMLTPLR = 0
 
bool calibrStart = false
 
float calibrSum = 0
 
float previous_cmd = 0
 

Detailed Description

class to store information related to controllers.

Constructor & Destructor Documentation

◆ ControllerData()

ControllerData::ControllerData ( config_defs::joint_id  id,
uint8_t *  config_to_send 
)

Member Function Documentation

◆ get_parameter_length()

uint8_t ControllerData::get_parameter_length ( )

Get the parameter length for the current controller.

Returns
uint8_t parameter length

◆ reconfigure()

void ControllerData::reconfigure ( uint8_t *  config_to_send)

reconfigures the the controller data if the configuration changes after constructor called.

Parameters
configurationarray

Member Data Documentation

◆ cal_level_entrance_angle_alpha

const float ControllerData::cal_level_entrance_angle_alpha = 0.01f

alpha for the low pass on the level entrance calibration

◆ cal_neutral_angle_alpha

const float ControllerData::cal_neutral_angle_alpha = 0.01f

alpha for the low pass on the neutral angle calibration

◆ calibrComplete

bool ControllerData::calibrComplete = false

◆ calibrStart

bool ControllerData::calibrStart = false

◆ calibrSum

float ControllerData::calibrSum = 0

◆ controller

uint8_t ControllerData::controller

id of the current controller

◆ elbow_cmd

float ControllerData::elbow_cmd = 0

◆ ff_setpoint

float ControllerData::ff_setpoint

feed forwared setpoint, only updated in closed loop controllers

◆ filtered_cmd

float ControllerData::filtered_cmd

filtered command, used for filtering motor commands

◆ filtered_setpoint

float ControllerData::filtered_setpoint = 0

filtered setpoint for the controller

◆ filtered_squelched_supportive_term

float ControllerData::filtered_squelched_supportive_term = 0

low pass on final spring output

◆ filtered_torque_reading

float ControllerData::filtered_torque_reading

filtered torque reading, used for filtering torque signal

◆ fsr_heel_array_elbow

int ControllerData::fsr_heel_array_elbow[50] = {0}

◆ fsr_heel_max_elbow

float ControllerData::fsr_heel_max_elbow = 0

◆ fsr_heel_min_elbow

float ControllerData::fsr_heel_min_elbow = 0

◆ fsr_heel_previous_elbow

float ControllerData::fsr_heel_previous_elbow = 0

◆ fsr_heel_sum_elbow

float ControllerData::fsr_heel_sum_elbow = 0

◆ fsr_min_max_elbow

float ControllerData::fsr_min_max_elbow = 0

◆ fsr_toe_array_elbow

int ControllerData::fsr_toe_array_elbow[50] = {0}

◆ fsr_toe_max_elbow

float ControllerData::fsr_toe_max_elbow = 0

◆ fsr_toe_min_elbow

float ControllerData::fsr_toe_min_elbow = 0

◆ fsr_toe_previous_elbow

float ControllerData::fsr_toe_previous_elbow = 0

◆ fsr_toe_sum_elbow

float ControllerData::fsr_toe_sum_elbow = 0

◆ i_elbow

int ControllerData::i_elbow = 0

◆ iCalibr

uint16_t ControllerData::iCalibr = 0

◆ is_first_fsr_reading_elbow

bool ControllerData::is_first_fsr_reading_elbow = true

◆ is_first_run_elbow

bool ControllerData::is_first_run_elbow = true

◆ isPerturbing

bool ControllerData::isPerturbing = false

◆ joint

config_defs::JointType ControllerData::joint

id of the current joint

◆ kf

float ControllerData::kf = 1

gain for the controller

◆ level_entrance_angle

float ControllerData::level_entrance_angle = 0.0f

level entrance angle for the spring term

◆ max_measured

float ControllerData::max_measured = 0

max measured value

◆ max_setpoint

float ControllerData::max_setpoint = 0

max setpoint value

◆ neutral_angle

float ControllerData::neutral_angle = 0.0f

neutral angle for the spring term

◆ output_limit_elbow

float ControllerData::output_limit_elbow = 5

◆ parameter_set

uint8_t ControllerData::parameter_set

temporary value used to store the parameter set while we are pulling from the sd card.

◆ parameters

float ControllerData::parameters[controller_defs::max_parameters]

Parameter list for the controller see the controller_defs namespace for the specific controller.

◆ PIDMLTPLR

int ControllerData::PIDMLTPLR = 0

◆ prev_calibrate_level_entrance

float ControllerData::prev_calibrate_level_entrance = false

previous value of the calibrate level entrance flag

◆ prev_calibrate_trq_sensor

bool ControllerData::prev_calibrate_trq_sensor = false

previous value of the calibrate torque sensor flag

◆ prev_max_measured

float ControllerData::prev_max_measured = 0

previous max measured value

◆ prev_max_setpoint

float ControllerData::prev_max_setpoint = 0

previous max setpoint value

◆ previous_cmd

float ControllerData::previous_cmd = 0

◆ ptb_frequency

uint8_t ControllerData::ptb_frequency = 0

◆ ptb_fsrGotHigh

bool ControllerData::ptb_fsrGotHigh = false

◆ ptb_iiStep

uint16_t ControllerData::ptb_iiStep = 0

◆ ptb_iStep

uint16_t ControllerData::ptb_iStep = 0

◆ ptb_newIsSwing

bool ControllerData::ptb_newIsSwing = true

◆ ptb_oldIsSwing

bool ControllerData::ptb_oldIsSwing = true

◆ ptb_setpoint

uint16_t ControllerData::ptb_setpoint = 0

◆ ptbApplied

bool ControllerData::ptbApplied = false

◆ ptbDetermined

bool ControllerData::ptbDetermined = false

◆ ptbRandomIsFirstRun

bool ControllerData::ptbRandomIsFirstRun = true

◆ reference_angle

float ControllerData::reference_angle = 0

reference angle for the spring term

◆ reference_angle_offset

float ControllerData::reference_angle_offset = 0

offset for the reference angle

◆ reference_angle_updated

bool ControllerData::reference_angle_updated = false

flag to indicate if the reference angle was updated this step

◆ setpoint

float ControllerData::setpoint

controller setpoint, basically the motor command.

◆ time_current_ptb

float ControllerData::time_current_ptb = 0

◆ time_previous_ptb

float ControllerData::time_previous_ptb = 0

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