Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ImpedanceController/ImpedanceController.h
- Committer:
- benkatz
- Date:
- 2017-02-14
- Revision:
- 19:bd10a04eedc2
- Parent:
- 9:d7eb815cb057
File content as of revision 19:bd10a04eedc2:
#ifndef IMPEDANCECONTROLLER_H
#define IMPEDANCECONTROLLER_H
#include "TorqueController.h"
#include "PositionSensor.h"
class ImpedanceController{
public:
//CurrentRegulator();
ImpedanceController(TorqueController *torqueController, PositionSensor *sensor_pos, PositionSensor *sensor_vel);
virtual void SetImpedance(float K, float B, float ref);
private:
float reference, _K, _B, output; //Referene position (rad), motor stiffness (N-m/rad), motor damping (N-m*s/rad), output(N-m)
TorqueController* _torqueController;
PositionSensor* _sensor_pos;
PositionSensor* _sensor_vel;
};
#endif