Im trying to programme a Lynxmotion robot arm (AL5D) using a botboarduino. I've been told that for my application I dont need to do reverse kinematics but just recording the positions of where the arm needs to be will do. Are there any examples out there of how to do this or it simply a case of plugging in the numbers manually until I have the arm in the right position, getting the code to tell me what that is(ie the angle for each servo) and then recording it under a name( like position_one, position_two etc)? Everything will be programmed via Arduino so its not like flowbotics studio where I can move it by clicking around.
Well you can use the Knob example. Use a potentiometer to manually move the servo to where you want it to go, track the position of it with the serial monitor then write down the values of where you think the servo should be.
This method does take some time, especially if you have to move multiple servos, but it works out in the end.
Once you have all the servo(s) positions, write the code that moves the servos when needed.
I can't find the code I had to do something similar. I found an empty .ino file with a promising name so perhaps I didn't save it.
But iirc, what I did was use a 2-axis joystick with a push button. The code for each axis was just knob, doubled up for two pots. I wrote the servo values to eeprom every time I hit the button. Sorry I can't find the code but that may give you some ideas.....
I'll keep looking!
Search the forum btw, there are threads about this.....
I tried searching the threads but couldnt find another way that didnt involve IK or moving a knob and guessing, I was just wondering if anyone had come up with an intermediate method. I have actually found an excel someone has done where you put in the values for your particular robot arm and it works out the IK for you. I know this is incredibly lazy on my part but im running low on time and so when the arm gets here Im going to see if the angle values produced by this excel are indeed correct. I found it here (incase it helps anyone else):
Rather than collect lots of data points for the servos in every position wouldn't it be sufficient to do a quick test to determine the value for servo.writeMicroseconds() for the extreme positions of each servo and then use a calculator or spreadsheet to figure out the set of intermediate values that are required for the movement?
That may be an option, I've just plugged my arm in and it's not happy so Im going to have to figure out how to make it work before I even consider how to position it
I was going to do a separate thread for it but here goes:
It is AL5D kit with a base, shoulder, elbow, wrist, wrist rotate and gripper servos (all Hitech of different sizes). The controller is a BotBoarduino which as part of the assembly was wired to a power supply cable to the mains. The power adapter itself was provided with the kit and is a 'switching power adaptor 6V 2000mA'. I tried turning it on without the USB computer cable plugged in and vice versa and both times the arm did weird things as the servos started jerking in about 5-10 degree motions. I have tried changing the jumpers next to where the servos plug in to Vl as appose to 5v and its stopped jerking but now the board just clicks. I'm trying to find a schematic of how the board should be rigged up but all I can find it how the Botboarduino looks when it first arrives after shipping (obviously not much help to me).
I tired to send it a programme from arduino to get it to stop but the serial port selection is always greyed out and un clickable.