Inverse Kinematics and Robot Arms

Towards the very end of my college undergraduate career, one of the courses I chose was “Introduction to Automation and Robotics,” better described as “Playing with robot arms (and matrix math).”

Early into the semester I was one of the half dozen or so students who volunteered an evening of our 3-day weekend to help the professor build the robot arms for the class.

After that I wanted to be able to use the robot in the Linux version of Matlab (Ubuntu’s nicer on my laptop than Windows XP in many ways, like battery life). So after a few questions to the professor and a little trying…

(copypasting from my review on the USB to serial adapter I bought):

The Karmic RC of Ubuntu I’m using supports this adapter very well; I plugged it in and by the time I could type “sudo chmod a+wrx /dev/tty” and press the tab button, ttyUSB0 already existed and was ready to use (so yes, I ran the command “sudo chmod a+wrx /dev/ttyUSB0” to give the “other” group read/write access.)

From there it was just a matter of changing the baud to match the jumpers on the robot arm’s controller (sudo stty -F /dev/ttyUSB0 115200), then using “man stty” to read up on the rest of the possible flags and change them until “sudo stty -a -F /dev/ttyUSB0” would give an output including the following: “-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke”

(It’s possible it’ll work even if not all the flags match the above exactly; I just know that this is how I have mine set.)

I have to thank my professor for pointing out the stty command’s usefulness, and I won’t post any of his matlab code. But the point is that this thing works, and didn’t require any crazy linux know-how or compiling anything.

I’m assuming it would work just as well in Windows or Mac.

By the end of the semester we were doing pick & place manipulation with both forward & inverse kinematics coded in Matlab; the professor coded up the basics of serial communications with the controller and our assignments continued to build upon themselves. The material for the course and coding was based on the professor’s notes and the textbook A Mathematical Introduction to Robotic Manipulation by Richard Murray, Zexiang Li and Shankar Sastry.

And on a less serious note, our professor made a Facebook page for the robot arm






Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.