go away spammer

Author Topic: Need some C Programming suggestions: Robot motions  (Read 1645 times)

0 Members and 1 Guest are viewing this topic.

Offline klimsTopic starter

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Need some C Programming suggestions: Robot motions
« on: June 26, 2010, 04:18:51 AM »
Hey guys,

I've been using the SoR Biped Engine for a while to run my robot but have run into a few issues in doing so. I was hoping to get some opinions on the best way to overcome these problems.

My main problem is that when I create a new motion I have to also create a specialised method for playing the motion. While this works, it seems a bit wasteful.
I have been thinking of ways that I might overcome the need for specialised methods and come up with a generic solution for playing motions. First of all I think motions would need to be stored in a different way.

Admin: is there any particular reason you have defined motions as individual servos? I have been thinking that it would be more useful to define a motion as a sequence of stances, with each stance being composed of servo positions.


Assuming I am going to store motions as a sequence of stances, with each stance containing servo positions, here are the ideas I have come up with on how to play the motions:

1. Store motions in a 2D array and pass that array(motion) to a "play motion" method.
2. Store motions as a sequence of 1D array (stance) then use a "play stance" method and cycle through the stances in the motion.
3. Use some kind of polymorphism and structs to define stances, then pass and array of stances to some "play motion" method.

It would be great if I only had to give a stance as much info as it needs, as in if I was only moving an arm I wouldn't need to define position for the rest of the servos.

Ideally I envision some kind of buffer to which I can add stances. This buffer would somehow be interrupt driven so I could just add a queue of stances(motion) and they would be completed in the background leaving me free to do other things like processing inputs and what not.


I'd love some suggestions on how to do go about creating this generic motion player.
I am by no means an experienced programmer so I'm sure there will be better ways to do it.

thanks for your input!

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Need some C Programming suggestions: Robot motions
« Reply #1 on: June 26, 2010, 08:12:37 AM »
Thats what the gait designer will do. Ie the GUI you've played is for working in interactive design mode. The idea is to then output a text file that you can include in your project and the code will then play whichever animation you want - with no connection to the PC.
Thats the piece that I'm currently work on.

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline klimsTopic starter

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: Need some C Programming suggestions: Robot motions
« Reply #2 on: June 26, 2010, 08:15:12 PM »
Oh yeah? Awesome! I'll be looking forward to it  ;D

 


Get Your Ad Here