kamaroman68
USA
Asked
— Edited
OK guys new question...
Is it possible to have the same servo perform 2 different speeds in the same script, yes dynamixels.
I need to run the arm up command just lower than full speed (8).
However when arm is going down with it having its own weight it really races to the ground.
I tried to set servo speed before each movement up/down but it did not work. Im sure Im doing something wrong but again appreciate the help.
At least with regular servos, servo speed is weird. You need to set it after a movement, which of course, in a situation like this is not helpful.
I think the best solution is to do a small movement, set the speed, then do the larger movement.
Alan
Incorrect - you only need to set the servospeed AFTER initializing the port as documentation...
[feature] ServoSpeed (servoPort, speed) Set the speed of servo or PWM. This is the speed to move between positions. The servo speed is a number between 0 (fastest) and 10 (slowest) *Note: To initialize the ServoSpeed() at first use, set a Servo() position before using the ServoSpeed() command. If there is no previous position (such as during power-on), the software assumes the position is 0 and will cause issues with your robot. *Note: Once the ServoSpeed() has been initialized the first time, specify the ServoSpeed() before specifying the Servo() position. Example: ServoSpeed(D14, 25) [/feature]
You can set the servo speed for going down, but again as you mentioned, the weight of the arm may still force the gears.
So you could do this...
This is what I was referring too, although I believe you may have updated this documentation since the last time I looked at it, since it is much clearer now and actually makes sense
Alan
DJ I swear that's what I tried, will try again.
Start 3: :right elbow 4: ServoSpeed( v5, 10 ) 5: Servo( v5, 51 ) 6: sleep(3000) 7: ServoSpeed (v5, 4 ) > Error on line 7: Missing String Quotes or Invalid Expression at index 0: ServoSpeed (v Done (00:00:03.0110043)
Get rid of the space between ServoSpeed and the opening brace... so...
WOW thanks again, that helps. Chris