PDA

View Full Version : [Just For Fun] ax-12a_tester



PhilW
11-25-2013, 05:11 AM
I made a program to test dynamixels it plots the projected acceleration of different functions and records the actual position/time, it can also read or write to any of the control registers.

the video:
http://www.youtube.com/watch?v=IxDfpqhFat8


http://www.youtube.com/watch?v=IxDfpqhFat8


the code:
https://github.com/philwilliammee/ax12a_test_acceleration

kgranat
11-26-2013, 10:04 AM
That's neat! What hardware are you using between the PC and the DYNAMIXEL?

PhilW
11-27-2013, 04:55 AM
Thanks, setup is:
PC(Debian7.1Wheezy,CPU.DUO)--> USB2DYNAMIXEL--> DYNAMIXEL(AX-12A) <--12V_PS

Software: PYTHON 2.7
Modules: matplotlib, serial, wx, threading

I just realized that it may look like its getting an analog signal and converting it to digital, and then moving to the corresponding position. It isn't what it is doing is:
The PLOT button calculate the speeds and position, based on the selected FUNCTION. I just used analog functions because I am familiar with them. The only function I was interested in was the sine wave, because I want to use it to accelerate and decelerate my robot so it moves smoother, but any function could be used.
The START button sets the (30)GOAL POSITION and (32)MOVING SPEED registers every SAMPLE(0.25s) and gets the (36)PRESENT POSITION every 0.1s and graphs it in real time.

Overall it worked well and had a good damping effect on end positioning. I cant wait to try it out on my robot.

PhilW
12-10-2013, 12:16 PM
I have wanted to make a virtual robot with openGL for a while, but I haven't had time. I thought I would do it over Christmas break, because I have never used openGL before and it would take me a long time to learn. I was surprised when I had most of what I wanted done in about an hour an a half. I was really amazed at how easy openGL is to work with. I think I might write a tutorial about my experiences because it was so fast, easy, and cool. Thanks to all of the great documentation from the guys at Trossen and OpenGL tutorials from the CplusPlusGuy. It saved me days. Here is my video of the virtual PhantomX arm.
https://www.youtube.com/watch?v=yzX6IuOB2X0

https://www.youtube.com/watch?v=yzX6IuOB2X0
Maybe over Christmas I will write a game around it, or maybe just enjoy my break :P

KevinO
12-10-2013, 12:35 PM
:( Can't view it. Says it's blocked due to copyright grounds.

PhilW
12-10-2013, 12:44 PM
hmm? works on all of my devices even mobile. I used copyrighted music YouTube wont let you view it on some devices but you can go directly to the link.

Should be able to see it soon I removed the music.

KevinO
12-10-2013, 01:11 PM
Nevermind. Seems to work now. :)

kgranat
12-13-2013, 03:15 PM
That's pretty rad! Have you thought of doing anything to interface the model and the actual arm? Either control the arm from the model, or maybe the model from the arm? Something along the lines of
http://forums.trossenrobotics.com/robots.php?project_id=15#ad-image-0

PhilW
12-15-2013, 02:27 AM
Thanks it was neat. If I did it again I could do the whole project in about 20 minutes. I will post a tutorial on how to do it next week.

I have made some interface's with the arm being represented by joints and lines in 3d. I am planning on adding this model to it so it looks nicer. I made the model so I can test different simulations with it like they did in the vimphin project. Hopefully I will add some collision detection to the robot, but first I will add a camera.

Here is a old video of one of my interfaces.

http://www.youtube.com/watch?v=k4LDzT4AvXo
I have made a lot of improvements on that program since I made the video the robot runs much smoother in live mode now.

PhilW
12-24-2013, 06:44 AM
I made a tutorial on how to convert a .stp file into a .obj file, add normals + materials and load it into pygame using opengl

http://youtu.be/ic6u_CewYww

PhilW
01-05-2014, 02:36 PM
I have the IK working by the end of Christmas break, unfortunately I have to get back to work, before I have it connected to my robot and camera. :P hopfully I will have it done in a few weeks.
The source code for what I have so far is ok so I put it on github here:
https://github.com/philwilliammee/pincher_gl
and a updated video here:

http://www.youtube.com/watch?v=0inQPjXeNZk&feature=youtu.be

kgranat
01-08-2014, 05:25 PM
That looks awesome! Hopefully next week I'll get a chance to try it out.

PhilW
01-09-2014, 05:19 AM
Its a little addictive I can spend about 5 minutes just watching it move. Let me know how it works for you, I have only tested it on one computer using windows so there are no guarantees but I will fix any problems you find.
First trial at the camera look good now I have to make the hardware. Eventually I will have a sort of funnel that the robot drops the ball into the ball then rolls down a chute. Then the camera locates it and the robot picks it up and drops it off over and over.

http://www.youtube.com/watch?v=HwoSuB54fN4&amp;feature=youtu.be