HRI board firmware  v2.1
Microcontroller firmware of the board used during the HRI labs.
Functions
Main / Torque Regulator

Sets the desired motor, by controlling the current. More...

Functions

void torq_Init (void)
 Initialize the position and current controllers. More...
 
void torq_StartCurrentLoop (void)
 Start the current regulation. More...
 
void torq_SetTorque (float32_t torque)
 Sets the target motor torque. More...
 

Detailed Description

Sets the desired motor, by controlling the current.

Call torq_Init() to setup this module. Its interrupt function will be called automatically periodically. Then, call torq_StartCurrentLoop() when the current sensor is calibrated. torq_SetTorque() can now be called at any time to set the target torque.

Function Documentation

◆ torq_Init()

void torq_Init ( void  )

Initialize the position and current controllers.

◆ torq_SetTorque()

void torq_SetTorque ( float32_t  torque)

Sets the target motor torque.

Parameters
torquetarget motor torque [N.m].
Remarks
The given value will be saturated to the motor torque, if larger.

◆ torq_StartCurrentLoop()

void torq_StartCurrentLoop ( void  )

Start the current regulation.