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@9:d7eb815cb057, 2016-05-10 (annotated)
- Committer:
- benkatz
- Date:
- Tue May 10 01:15:57 2016 +0000
- Revision:
- 9:d7eb815cb057
- Parent:
- 4:c023f7b6f462
Fixed current scaling hack
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| benkatz | 9:d7eb815cb057 | 1 | #ifndef IMPEDANCECONTROLLER_H |
| benkatz | 9:d7eb815cb057 | 2 | #define IMPEDANCECONTROLLER_H |
| benkatz | 9:d7eb815cb057 | 3 | #include "TorqueController.h" |
| benkatz | 9:d7eb815cb057 | 4 | #include "PositionSensor.h" |
| benkatz | 3:6a0015d88d06 | 5 | |
| benkatz | 3:6a0015d88d06 | 6 | class ImpedanceController{ |
| benkatz | 3:6a0015d88d06 | 7 | public: |
| benkatz | 4:c023f7b6f462 | 8 | //CurrentRegulator(); |
| benkatz | 9:d7eb815cb057 | 9 | ImpedanceController(TorqueController *torqueController, PositionSensor *sensor_pos, PositionSensor *sensor_vel); |
| benkatz | 9:d7eb815cb057 | 10 | virtual void SetImpedance(float K, float B, float ref); |
| benkatz | 3:6a0015d88d06 | 11 | |
| benkatz | 3:6a0015d88d06 | 12 | private: |
| benkatz | 4:c023f7b6f462 | 13 | float reference, _K, _B, output; //Referene position (rad), motor stiffness (N-m/rad), motor damping (N-m*s/rad), output(N-m) |
| benkatz | 9:d7eb815cb057 | 14 | TorqueController* _torqueController; |
| benkatz | 9:d7eb815cb057 | 15 | PositionSensor* _sensor_pos; |
| benkatz | 9:d7eb815cb057 | 16 | PositionSensor* _sensor_vel; |
| benkatz | 9:d7eb815cb057 | 17 | }; |
| benkatz | 3:6a0015d88d06 | 18 | |
| benkatz | 9:d7eb815cb057 | 19 | #endif |