nasa-jpl / fastcat

C++ EtherCAT Device Command & Control Library
Other
47 stars 11 forks source link

Hold position after profile position command in actuator driver #43

Closed d-loret closed 2 years ago

d-loret commented 2 years ago

Summary: Implements an optional hold position functionality in the actuator driver. For profile position commands, after reaching the desired position, the driver actively holds the position until other commands are issued. The functionality can be activated through an optional parameter prof_pos_hold in the configuration yaml file. Set to true to activate it. This functionality is useful for actuators without the brakes. It mimics the engagement of the brakes after a position profile is achieved.

Test Plan: Tested on an Elmo Gold Whistle connected to a DC motor and manually attempting to rotate the shaft after the profile position is achieved.

Reviewers: alex-brinkman, JosephBowkett

JosephBowkett commented 2 years ago

Quite an elegant solution! It worked okay?

d-loret commented 2 years ago

@JosephBowkett, it works as expected on the motor I have.

We should add an interface to c0_mech and fcat for the actuator driver's halt command, so that we can easily deactivate the holding without having to send another motion command or the fault command.