@@ -91,32 +91,10 @@ class BraccioClass
9191 MotorsWrapper move (int const id);
9292 inline MotorsWrapper get (int const id) { return move (id); }
9393
94- void moveTo (float a1, float a2, float a3, float a4, float a5, float a6) {
95- servos.setPositionMode (PositionMode::SYNC);
96- servos.setPosition (1 , a1, runTime);
97- servos.setPosition (2 , a2, runTime);
98- servos.setPosition (3 , a3, runTime);
99- servos.setPosition (4 , a4, runTime);
100- servos.setPosition (5 , a5, runTime);
101- servos.setPosition (6 , a6, runTime);
102- servos.synchronize ();
103- servos.setPositionMode (PositionMode::IMMEDIATE);
104- }
105- // getters
106- void positions (float * buffer) {
107- for (int i = 1 ; i < 7 ; i++) {
108- *buffer++ = servos.getPosition (i);
109- }
110- }
111- void positions (float & a1, float & a2, float & a3, float & a4, float & a5, float & a6) {
112- // TODO: add check if motors are actually connected
113- a1 = servos.getPosition (1 );
114- a2 = servos.getPosition (2 );
115- a3 = servos.getPosition (3 );
116- a4 = servos.getPosition (4 );
117- a5 = servos.getPosition (5 );
118- a6 = servos.getPosition (6 );
119- }
94+ void moveTo (float const a1, float const a2, float const a3, float const a4, float const a5, float const a6);
95+ void positions (float * buffer);
96+ void positions (float & a1, float & a2, float & a3, float & a4, float & a5, float & a6);
97+
12098 float position (int joint_index);
12199 bool connected (int joint_index) {
122100 return _connected[joint_index];
0 commit comments