HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
Loading...
Searching...
No Matches
Public Attributes | List of all members
MotorMechanics Struct Reference

Mechanical mapping between the motor (rotor) frame and the load (output-shaft) frame. More...

#include <MotorController.h>

Public Attributes

double gear_ratio_motor_to_output {1.0}
 
bool invert_output {false}
 

Detailed Description

Mechanical mapping between the motor (rotor) frame and the load (output-shaft) frame.

Vortex talks to the silicon in the motor frame: every set/get on velocityControl, positionControl, the Diagnostics snapshot, and the commutation engine uses motor-shaft units. When the motor drives a gearbox, the user typically wants to think in the output-shaft frame.

gear_ratio_motor_to_output is the number of motor-shaft revolutions per one output-shaft revolution — e.g. a 10:1 reducer has gear_ratio = 10.

motor_value = load_value * gear_ratio_motor_to_output
load_value  = motor_value / gear_ratio_motor_to_output

Defaults to 1.0 (direct drive) so motor-frame and load-frame APIs are interchangeable until the user configures a gearbox.

Member Data Documentation

◆ gear_ratio_motor_to_output

double MotorMechanics::gear_ratio_motor_to_output {1.0}

Motor-shaft revolutions per one output-shaft revolution. Must be > 0. 1.0 = direct drive. Reducers (typical) are > 1.0; step-up gearing is < 1.0 (e.g. 0.5 for 1:2 step-up).

◆ invert_output

bool MotorMechanics::invert_output {false}

If true, sign of any load-frame command/feedback is inverted before being mapped to/from the motor frame. Useful when the gearbox or coupling reverses rotation direction.


The documentation for this struct was generated from the following file: