Desperation with a Robotic Arm
Good day everyone.
I'm sorry to bother you guys. But I'm here with a Lynx 6 robotic arm and i can't program it in an intelligent way. I would like to see some examples of programs to give the robot some intellingence. Something like direct kinematic or indirect kinematic. Both are ok with me. I just need to give it some intellingence and i can't figure out how will be the code.
Talking about the robot:
It is 5 revolute joint in an open architecture. It is equipped with an accelerometer in the 3rd link and an ultrasound sensor in the hand (i equippped it with theese).
I'm using a BS2 to control it.
I hope someone can help me with this problem. If you need some more information dont doubt to write me.
Thanks a lot. I trust on you because you allways helped me. Thanks again!.
I'm sorry to bother you guys. But I'm here with a Lynx 6 robotic arm and i can't program it in an intelligent way. I would like to see some examples of programs to give the robot some intellingence. Something like direct kinematic or indirect kinematic. Both are ok with me. I just need to give it some intellingence and i can't figure out how will be the code.
Talking about the robot:
It is 5 revolute joint in an open architecture. It is equipped with an accelerometer in the 3rd link and an ultrasound sensor in the hand (i equippped it with theese).
I'm using a BS2 to control it.
I hope someone can help me with this problem. If you need some more information dont doubt to write me.
Thanks a lot. I trust on you because you allways helped me. Thanks again!.
Comments
Cool Arm dude.
Your working with the BS2 so lets get back to BASIC$ kinematic or what ever BLA BLa Bla bla.
What is the motor setup?
straight DC?
Servo ?
Stepper?
Is there any feedback to mark position?
This looks very interesting. I think the BS2 would do fine with a little more info?
_______$WMc%_____
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
EverQurious
Each of them turns 1,04º per step. I've got this info connecting the accelerometer directly to the servos.
The only feedback i have is the info from the accelerometer in the ubicated on one side of the last link.
I can move the arm to certain positions. For example: I can move the end-effector to a certain place in the working cell where the fingers can grab an object. But first i have to try with different positions on the servos until i get to the desired position of the arm.
What i would like to do is some code that will let me enter:
☼ The distance between the base of the arm and the position of the object
☼ The height of the object compared with the base of the arm.
☼ And the necesary degrees of the servo ubicated on the base of the arm
or
► Preferably a code that will let me enter the coordenates (x, y, z) of the object compared with the base of the robot.
And then, the servos move to the right positions.
As i told you before i have the degrees that move each servo per step. I have distances of each link. So what i tried to do is some trigonometry calculations but i cant express them on codes for the basic stamp. So i dont know if my calculations are correct or not.
Something else i want to do is: use the accelerometer to get the correct grasping angle of the object. Wich will give me a better grasp and the right position of the last link, so i just have to do the calculations for the other 2 links.
http://www.lynxmotion.com/images/html/proj51a.htm
Are You sure these are servos, And not steppers?, 1,04 degrees per step sounds like a stepper, But it could be some sort of mSec value.
The reason I ask this is that steppers move in degrees per step, And servos move with usually an out put pulse from 1 to 2 mSec.,A pulse value of 1.5 mSec is usually the centered position of a servo. 1 mSec is full rigth, 2 mSec is full left. usually,This apples to both limited rotation and full rotation servos.
Is there a controller in between the motor and the stamp?
________$WMc%_____
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
I saw the info at the linxmotion webpage. But they dont have any code examples. They have excel files to help calculate but no BS codes.
WMc:
There isn't any controller between the servos and the BS.
About the motors: they are called "standard servos", i don't know why.
The code to control them is "Pulsout", but the motors can stop in certain positions and retain the position. When i turn the shaft i can't feel any "click" as a stepper. But i send them a command and they move to a position, acting as a stepper. I mean, i dont control the velocity of turning but i control the position where the motor will stop.
Do you understand what i say? Actually my first language is spanish, not english.
THANK YOU GUYS FOR YOUR ANSWEARS
The PULSOUT command you send it represents a position that it needs to be in. Once it reaches the position, it holds it - providing it is still receiving signals telling it to be in that position.
Servos expect a pulse 50 times a second. So if it starts at 1000 and you want it to go to 500 AND you want it to take one second to get there... You send 50 pulses each 10 less than the last.
They are called standard because they are not special.
Rich H
Here is the code from the link LilDi posted the catch is it needs a controller between the BS2 and the servo motors
The controller is a SSC-32
serout 15,6,[noparse][[/noparse]"#10 P1500 #11 P1500 #12 P1500 #13 P1500 #14 P1500 #15 P1500",13]
start:
goto start 'loop
serout 15,6,[noparse][[/noparse]"#10 P1500 #11 P1500 #12 P1500 #13 P1500 #14 P1500 #15 P1500",13]
start:
serout 15,6,[noparse][[/noparse]"#10 P1400 #11 P1400 #12 P1400 #13 P1400 #14 P1400 #15 P1400 T2000",13]
pause 2000
serout 15,6,[noparse][[/noparse]"#10 P1600 #11 P1600 #12 P1600 #13 P1600 #14 P1600 #15 P1600 T2000",13]
pause 2000
goto start 'repeat
base var word 'Base rotate
shld var word 'Shoulder pivot
elbo var word 'Elbow pivot
wrst var word 'Wrist pivot
grip var word 'Gripper open/close
grpr var word 'Gripper rotate (L6 only)
ttm var word 'Amount of time to take to move
serout 15,6,[noparse][[/noparse]"#10 P1500 #11 P1500 #12 P1500 #13 P1500 #14 P1500 #15 P1500",13]
start:
'first move...
base=1400: shld=1400: elbo=1400:
wrst=1400: grip=1400: grpr=1400:
ttm=2000
gosub send_data
'second move...
base=1600: shld=1600: elbo=1600:
wrst=1600: grip=1600: grpr=1600:
ttm=2000
gosub send_data
'add more moves here...
goto start
send_data:
serout 15,6,[noparse][[/noparse]"#10P", DEC base, "#11P", DEC shld, "#12P", DEC elbo, "#13P", DEC wrst, "#14P", DEC grip, "#15P", DEC grpr, "T", DEC ttm, 13]
pause ttm
return
I like W9GFO,s idea vai ramping. I'll try to set this up on My BS2 Pro.Dev.Board later this afternoon
Sounds like FUN!
____________$WMc%______
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
If i buy the controller i have to wait almost a month to start programing it. And i have to present the project in less than that.
I need to control the motors without the controller. Any ideas?
Yeah, about the ramping is very useful. Im using it actually.
And another tip: I used constant to divide the values of the positions of the motors.
Let me explain myself.
Motors move from position 200 to position 1200. To use a variable to control this positions your variable as to be a "Word" variable. Which needs a lot of space in your memory. Now, between position 400 and position 403 (for example) there is not a lot of change. Specialy if the arm is just 40cm long.
So what i do is: i divide number into 5. For example: position 400 will be 80 in the variable, and position 1200 will be 240 in the variable. Giving as a result the usage of a "Byte" varaible using A LOT less space. considering that the arm needs 6 variables to control all the motors. After saving the new values in the variables you just change you pulsout command to look like this:
Pulsout elbow, I*5
This way you save tons of bytes in your mamory. [noparse]:)[/noparse]
You are going to have to reinvent the wheel, ie create your own inverse kinematics program, if you are not going to use the BS2 with either the Lynxmotion SSC-32 or the Parallax serial servo controller and the complex software that has already been generated for that combination.
Just a thought.
Regards,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!