|
Page 1 of 1
|
[ 3 posts ] |
|
Persistent storage of arm location
| Author |
Message |
|
4486
Rookie
Joined: Wed Feb 09, 2011 6:01 pm Posts: 1
|
 Persistent storage of arm location
Our robot has an arm that is driven by an encoded Tetrix motor. We want ourprogram to be aware of the position of the arm so that we can set it to a specific number of degrees. In essence, we want to be able to treat it like a servo. Our thought was to set a "zero" position once, and use the encoders to figure out how far the arm has moved, remembering the new position each time, even between runs and when the robot is off. We've been trying to set it up using files, but we can't quite get it working (the examples aren't very clear). Any help would be greatly appreciated.
|
| Wed Feb 09, 2011 6:26 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: Persistent storage of arm location
I would go with the zeroing approach. You can't rely on the arm being in the exact same position as when you switched it off. A simple push button is a great way to do detect when it has reached the zero point. I had similar issues with my giant robot arm: http://wp.me/pgwgr-5L . I zero'd all the positions between each run, it was by far the most reliable way of doing it. You can watch it move here: http://wp.me/pgwgr-5YRegards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Thu Feb 10, 2011 2:54 am |
|
 |
|
alanlevezu
Rookie
Joined: Wed Feb 24, 2010 11:43 pm Posts: 34
|
 Re: Persistent storage of arm location
We do that with servos so they don't move at the beginning of Teleop... (we already know where our motor driven arm is all the time through a different approach).
Files seem a bit more confusing than they probably are, and there appear to be some non-documented limits... for instance, we know that naming files with the extension ".dat" works, but some others don't seem to... so all of ours use that extension.
Also, we initially create the files with more space than is needed, and just read and write one value out of the front of each file... that way there's no issues with file size errors.
|
| Thu Feb 10, 2011 10:02 am |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|