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

#include <MotorData.h>

Public Member Functions

 MotorData (config_defs::joint_id id, uint8_t *config_to_send)
 
void reconfigure (uint8_t *config_to_send)
 reconfigures the the motor data if the configuration changes after constructor called.
 

Public Attributes

config_defs::joint_id id
 
uint8_t motor_type
 
float last_command
 
float p
 
float v
 
float i
 
float p_des = 0
 
float v_des = 0
 
float kp = 0
 
float kd = 0
 
float t_ff = 0
 
bool do_zero
 
bool enabled
 
bool is_on
 
bool is_left
 
bool flip_direction
 
float gearing
 

Constructor & Destructor Documentation

◆ MotorData()

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

Member Function Documentation

◆ reconfigure()

void MotorData::reconfigure ( uint8_t *  config_to_send)

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

Parameters
configurationarray

Member Data Documentation

◆ do_zero

bool MotorData::do_zero

Flag to zero the position of the motor

◆ enabled

bool MotorData::enabled

Motor enable state

◆ flip_direction

bool MotorData::flip_direction

Should the motor direction be flipped, if true torque commands and position/velocity information will be inverted

◆ gearing

float MotorData::gearing

Motor gearing used to convert motor position, velocity, and torque between the motor and joint frames.

◆ i

float MotorData::i

Read current.

◆ id

config_defs::joint_id MotorData::id

motor id, should be the same as the joint id.

◆ is_left

bool MotorData::is_left

Motor side information 1 if on the left, 0 otherwise

◆ is_on

bool MotorData::is_on

Motor power state

◆ kd

float MotorData::kd = 0

Derivative gain

◆ kp

float MotorData::kp = 0

Proportional gain

◆ last_command

float MotorData::last_command

Last command sent to the motor.

◆ motor_type

uint8_t MotorData::motor_type

Type of motor being used.

◆ p

float MotorData::p

Read position.

◆ p_des

float MotorData::p_des = 0

Desired position, not currently used but available for position control

◆ t_ff

float MotorData::t_ff = 0

Torque command

◆ v

float MotorData::v

Read velocity.

◆ v_des

float MotorData::v_des = 0

Desired velocity, not currently used but available for velocity control


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