demo project
Dependencies: AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL
Diff: RobotArm.h
- Revision:
- 5:36916b1c5a06
- Parent:
- 4:36a4eceb1b7f
- Child:
- 7:6723f6887d00
--- a/RobotArm.h Wed Dec 23 18:34:06 2015 +0000 +++ b/RobotArm.h Mon Dec 28 17:19:37 2015 +0000 @@ -56,7 +56,10 @@ // start - move all parts to specified postions - finish bool MoveArmPositionsEnd(); - + + // start - test if positions are close to expected + bool TestArmPosition(int& partix, float& diffpos); + // move one part to specified postion in ms time bool MovePartPosition(int partIx, float position, int ms, int steps); @@ -113,6 +116,11 @@ // for thread friendly moves vector<float> lastpos; vector<float> differentials; + vector<float> lastgoals; + + // allowance for difference between expected pos and actual pos + static const float allowance = 1.0f; + int numsteps; int curstep; int delayms;