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.
Dependencies: mbed QEI biquadFilter
robot.h
- Committer:
- ronvbree
- Date:
- 2016-11-03
- Revision:
- 25:bdb854127c11
- Parent:
- 12:8295c02d740f
File content as of revision 25:bdb854127c11:
#include "arm.h"
#include "PID_controller.h"
#include "geometry.h"
class Robot {
private:
// Arms
Arm upperArm;
Arm lowerArm;
// Safety first! (If this flag is set, the robot will not move)
volatile bool killed;
public:
// Constructor
Robot();
// Update arm instance variables
void update();
// Get upper arm length
float getUpperArmLength();
// Get lower arm length
float getLowerArmLength();
// Get upper arm velocity estimation by the encoder (rad/s)
float getUpperArmEncoderVelocity();
// Get lower arm velocity estimation by the encoder (rad/s)
float getLowerArmEncoderVelocity();
// Set upper arm reference velocity
void setUpperArmVelocity(float referenceVelocity);
// Set lower arm reference velocity
void setLowerArmVelocity(float referenceVelocity);
// Safety shutdown
void kill();
bool isKilled();
};