Many thank another time jonnin!!
I don´t know the rate of change for those motors (you say the maximun change that can have the position of the motor (the encoder) in one sampling time?). In the other side, the amount of time between positions is of 20ms (i put that value):
1 2 3 4 5 6 7 8 9 10 11 12 13
|
regData1 = dxlGetPosition(SERVO_ID[0]); //read and save the actual position
regData2 = dxlGetPosition(SERVO_ID[1]);
regData3 = dxlGetPosition(SERVO_ID[2]);
regData4 = dxlGetPosition(SERVO_ID[3]);
positionn1[i] = regData1; //Creation movements vector
positionn2[i] = regData2;
positionn3[i] = regData3;
positionn4[i] = regData4;
delay(20);
|
The thing is that if i increase the sampling time the robot takes the data slower and, why you are losing resolution, maybe the robot will reproduce the sequence at stoppages like trembling, because because he is not taking all the positions.
Other information is that the comunication between the ArbotiX-M and the computer is this:
1 2
|
dxlInit(1000000); //start dynamixel library at 1mbps to communicate with the servos
Serial.begin(9600); //start serial at 9600 for reporting data.
|
What I understand from what you tell me is that, for example, knowing that I am in the position 3000 of the encoder, it is impossible that in a one sampling time the position of the encoder could be farther than 2900-3100 for example, but not I understand how I can do that in order to save bytes.
Respect to the Problem 1 (I can't split the data into chunks to feed the motor program), yes, i think that this is the main problem... and i don´t know how i can solucionate. One solution that i have seen in some webs could be to obtain a external ram module, but i can´t do that.
Perharps, what the program does is take all the positions you want, but the moment you put in the program more than 400 positions in each engine, the program does not go. that is, it continues to collect data but without doing anything else. Then, it occurred to me, but I do not know how and if I could do that, to put more than 400 positions, so the program will be colecting data (more than 2000 positions). My idea is to be able to tell it to save the first 2000 dates. And once the sequence is done, throw the sequence that would take the next 2000 ... I dont know. The problem is that the program takes data without stopping, I mean it does not stop, I do not know if you understand me. Other problem could be that between one sequence and other the robot would stop few time, and this is not a god idea.
About the second problem, i don´t know how can i do that, but i thing that passing to other format it will lose time isn´t? Maybe i can pass al the vector to a excel for example? and be reportin the datas from 2000 in 2000 to the program?
And yes you can send the split data in other vectors, but always with the limit of those positions or bytes. That is, I can make two vectors of the positions, but then each motor can only have 200 positions. There would be two vectors each of 1000 data.
Sorry but I don´t understand the last paragraph, do you want me to tell to you de name of the compilator???
Finally, if you are curious and if you want to see how it is and how the robot moves, I leave this link of youtube of a video that i had uploaded.
https://www.youtube.com/watch?v=pJGe6f-Kouw&feature=youtu.be
Urko.