|
blmc_drivers
|
Simple PD control on the leg. More...
Public Member Functions | |
| LegController (std::shared_ptr< blmc_drivers::Leg > leg, std::shared_ptr< blmc_drivers::AnalogSensor > analog_sensor) | |
| Construct a new LegController object. More... | |
| ~LegController () | |
| Destroy the LegController object. | |
| void | start_loop () |
| helper to strat the real time thread. | |
Static Public Member Functions | |
| static THREAD_FUNCTION_RETURN_TYPE | loop (void *instance_pointer) |
| this function is just a wrapper around the actual loop function, such that it can be spawned as a posix thread. | |
Private Member Functions | |
| void | loop () |
| this is a simple control loop which runs at a kilohertz. More... | |
Private Attributes | |
| std::shared_ptr< blmc_drivers::Leg > | leg_ |
| is the leg to control | |
| std::shared_ptr< blmc_drivers::AnalogSensor > | analog_sensor_ |
| is the list of sliders | |
| real_time_tools::RealTimeThread | rt_thread_ |
| is the real time thread object. | |
| bool | stop_loop_ |
| manages the shutdown of the controller | |
Simple PD control on the leg.
|
inline |
Construct a new LegController object.
| leg | |
| analog_sensor |
|
inlineprivate |
this is a simple control loop which runs at a kilohertz.
it reads the measurement from the analog sensor, in this case the slider. then it scales it and sends it as the current target to the motor.