Author Topic: Storing arm positions for latter playback  (Read 3780 times)

0 Members and 1 Guest are viewing this topic.

Offline Ro-Bot-XTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
    • Ro-Bot-X Designs
Storing arm positions for latter playback
« on: March 10, 2009, 02:58:43 PM »
Ok, so I'm building a robot that will have an arm capable of grabbing stuff. I was thinking of haveing some stored sequences of arm movements and play them at the proper time. Any ideas on how to do this? I mean write arrays for each servo, or for each specific movement or what? How would you do it?
Check out the uBotino robot controller!

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: Storing arm positions for latter playback
« Reply #1 on: March 10, 2009, 06:13:23 PM »
eeprom

Offline Ro-Bot-XTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
    • Ro-Bot-X Designs
Re: Storing arm positions for latter playback
« Reply #2 on: March 10, 2009, 06:44:12 PM »
eeprom

Yeah, that tells me where to store not how to do it  :-\
I know how to work with the eeprom. The question is what is the best and economical way to store servo positions and play them at the apropriate time.

Come on, no one has built robots with arms before?
Check out the uBotino robot controller!

Offline householdutensils

  • Full Member
  • ***
  • Posts: 72
  • Helpful? 2
Re: Storing arm positions for latter playback
« Reply #3 on: March 10, 2009, 07:03:15 PM »
I don't know if it's any help but for my initial design for my robotic arm, I was thinking of using a movement function and just passing it arguments stored in eeprom.

Basically, my idea was to pass the order, and angles of my servos to the function and get it to do the grunt work.

So you pull the movement you want out of eeprom and pass it to the function so that you end up with something like

arm_move('a', 'b', 'c', '30', '50', '20')

which moves servo A 30 degrees, servo B 50 degrees, and servo C 20 degrees in that order.

I wanted to be able to generate custom movements at runtime so that's why I set it up as a function that takes all those arguments as opposed to static functions like arm_move(1) and store the pattens in the function or eeprom and call them from within the function. It adds an extra step before you call the function, but it seemed the best option for me.

I never got around to actually prototyping or even writing it out in pseudocode, so the ideas probably full of faults and holes.
« Last Edit: March 10, 2009, 07:05:10 PM by householdutensils »

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Storing arm positions for latter playback
« Reply #4 on: March 10, 2009, 08:44:34 PM »
just write up subroutines a.k.a. macros.

Then just call them in your code when you need them.
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Ro-Bot-XTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
    • Ro-Bot-X Designs
Re: Storing arm positions for latter playback
« Reply #5 on: March 10, 2009, 09:53:10 PM »
Thanks, I think I like the function idea better than the subroutines. I'll see what I can do, if I still cant get it to work, I'll ask for more help.
Check out the uBotino robot controller!

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Storing arm positions for latter playback
« Reply #6 on: March 10, 2009, 10:01:36 PM »
Thanks, I think I like the function idea better than the subroutines. I'll see what I can do, if I still cant get it to work, I'll ask for more help.
what I was referring to , is what you call functions.

I've been using VB6, but I dunno if the syntax stands for all languages. Functions involves returning a variable to the main code, subroutines take in variables(or no variables at all).

So Arm(30,50,60); is a subroutine
but variable = Add(4,5); is a function
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline householdutensils

  • Full Member
  • ***
  • Posts: 72
  • Helpful? 2
Re: Storing arm positions for latter playback
« Reply #7 on: March 10, 2009, 10:08:54 PM »
I think technically a function is a subroutine, since the term subroutine is used to describe a programming structure that spans multiple languages, that is, a method within a class is a subroutine, a function is a subroutine, a procedure is a subroutine etc. In the wider view of things, whether or not it returns a value is really irrelevant.

That being said, I believe your right about that terminology when applied to VB6.
« Last Edit: March 11, 2009, 02:42:02 AM by householdutensils »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: Storing arm positions for latter playback
« Reply #8 on: April 07, 2009, 11:02:45 PM »
Just use my biped engine. This is what I use to control the arms on my ERP and a biped for a customer of mine. I'll be uploading video of my ERP doing arm stuff when I get more time.

http://www.societyofrobots.com/sor_biped_engine.shtml

 

SMF spam blocked by CleanTalk