robotic arm simulator

hi!
here is a project i’m working on… a robotic arm to be controlled using BGE.
the model is finished, i guess. armature has already been put in place together with some vertex grouping.
i’ll be needing python to introduce the movements. it will be controlled by the mouse, keyboard, and some pulses to be put through the parallel port…which is supposed to simulate data coming from an electronic hardware.

my problem: my first time to use python, and even BGE! :spin: :smiley:

so i’ll be needing a lot of your help guys… :wink:

any starting point will be very much appreciated.
thanks in advance!

by the way, i’m supposed to finish the project by end of august, or first weeks of july.

Attachments




i’m hoping to make something similar to this… it’s also made with blender. i found it around a year ago, but can’t find again the site where i found it (the page no longer exist?)
and looked for ways to contact the author, but found none.

hmmm looks cool… but using armatures might not be the best solution… I would use emptys… with the different bits parented (that’s how the original guy did it)… and rather rotate them… if you use armatures you would have to blend all the animations together… because the bones don’t work in realtime…

If you were to make an animation or a game, this is the way you would do it. But if you want precise control of each individual part it would be much easier to use an IPO on each object. Select vertices and hit P to separate them in to individual objects. Place a vertice in each object at the axis of the object you want to be the child and parent. Then find yourself a good IPO tut and it should be cake. If you already knew all that already sorry, but sometimes stating the obvious can prevent some other bloke from having to ask the same question :slight_smile: Dude, now you got me wanting to try this…

thanks for the replies…

. I would use emptys… with the different bits parented (that’s how the original guy did it)…
…because the bones don’t work in realtime…

i saw the blend file of the work i posted above, and the author used bones, with scripts for the movements.
i’d be very glad to update everyone with any accomplishments i may have.

. But if you want precise control of each individual part it would be much easier to use an IPO on each object.

i think it’s easier to just introduce translations/rotations to a single bone (where a number of vertices/faces are parented) than move/rotate multiple vertices and faces.

by the way, the arm pieces were modeled separately. the arm was originally made up of a number of objects. i just combined them (CTRL+J) to form a single object to make the application of armatures easier for me.

The way I described it to you you’re not moving/rotating multiple vertices and faces. You’re moving individual objects. Good for you that you modeled it separately, it’ll make it easier to break down. I made a rough demo so you can see exactly what I mean. It took about half an hour, and that just because I wasn’t paying attention and screwed up parenting and a couple other things and then started having fun playing with it. It’s done exclusively with logic bricks, no scripting necesary. Turns out vertex parenting is unnecesary too, normal parenting works fine just so long as the object centers are at the pivot point or whatever you would call it. Were you the one asking about this earlier? Something like you were getting a venetian blind effect? I think it would have been becase of the object centers. So that’s my two cents worth, take it or leave it. Just try not to be so snippy next time, makes people not want to help you. Looking forward to hearing about your “accomplisments”.

@asaj: after seeing your demo, i would agree your method is simpler… i’ll give it a try… thanks very much for the info.

Just try not to be so snippy next time, makes people not want to help you.
ooops…sorry… didn’t mean to sound like it… i was coming from a point where i saw it implemented before, so i had basically an idea how to do it… but seeing yours now, i agree with you :smiley: yours is simpler.

and… oh please, don’t be tired of helping me :frowning: i’m in dire need of your help ‘masters’… i just basically started learning the GE… (yep! yep! i’d be glad to call you guys masters)

and by “accomplishments”, i meant progress… sorry… wrong choice of words… sometimes its a pain to not have english as your native language :frowning:

EDIT: @asaj: i’m still looking at your blend, and am amazed at how simpler really it is…all makes sense. am gonna try it. just need to study it more… am not familiar with how you used the actuator (the IPO?)

take a look at the blend file of the robot arm i posted above. i’m supposed to give a link to the page where i found it, but can’ really find it…
here is the blend file: denso.blend (that’s the original file name, in case you want to look for the page where it can be found now)
almost all movements were implemented using python…

Very cool. I understand about language, I live in Colombia and am learning spanish as a second language and my wife is learning english as a second language.
If you´d like, I´ll write it out step by step. But it might be just as easy looking at the blend.

wow! thank you very much…
i think i’m getting the idea slowly, i’ll be posting as soon as i can (possibly tonight) when i get to setup my draft logic bricks…

what i plan to do first thing is to have this:

always(sensor) ----- AND(controller) ----- IPO/Action (actuator)

and the IPO/Action actuator will execute frames based on a “property” value. that “property” is the one to be incremented/decremented by keypresses…

is it possible to do the incrementing/decrementing continuously with a single press of a button using purely logicbricks? or would you recommend python?
with your setup, i have to repeatedly press a button to continuously rotate a segment of the arm.

@asaJ: here is what i did to your logic bricks… to prevent the prop from going beyond a value of 1 to 50, i changed the controller to Expression,

and to enable continuous rotation of arm parts, i enabled pulse mode… What’s it for? the description in many pages i read doesn’t make sense…:smiley:

Attachments


i changed the controller to Expression,
by doing this, i’m now having a problem with how the property is changing its value. instead of changing its value once every press, it changes its value twice: upon pressing, and after releasing the key.
(e.g. pressing “+” increases the value of “delta” from 0.1 to 0.3… it should only increment to 0.2.

how can i activate the actuator only once for every key press?

Attachments


wheeee! :smiley: solved the above problem by using a combination of expressions… see figure…

Attachments


am trying to learn how to limit the rotation of a certain segment using python… like for example limit the rotation of my JOINT 2 to 180degrees… Right now, all segments rotate around their axis without any limit :spin:
found out about “getOrientation”.
still learning about the Orientation Matrix :spin:

Attachments


That looks like a mighty fine rig you got there =D

Although using constraints and IPOs for animation will be a pain in the GE.

@killer: thanks for the tip… i’m trying actually a number of ways how to do it easier (for me). i’ve tried using IPOs, actions, and lately, i’ve tried python… so far, so good.

need to finish basic movement this weekends, and next week, i’ll research on how to incorporate inputs from the parallel port (it’s the easiest to recognize, right?) while doing some texturing…

and have to decide what environment i will be using (e.g. classroom/laboratory, sci-fi room, etc) plus i plan to have some sort of GUI. any ideas are most welcome… :slight_smile:

thanks!

arrrggghh… am running out of time, and will need more of it to fully understand the orientation matrix. i only need it to limit the rotation of a segment up to a certain degree…
my resort: use IPOs, that way, i’ll have control of the rotation without putting much python.

will there be any speed difference between two methods doing the same thing if one is done in python and one using purely logic bricks and IPOs? thanks!

here is my current logic bricks and some other screenshots…

Attachments



here is what i have so far…
blend file (2mb)
recommendations and comments are very much welcome.
my next task will be the camera, and textures…
thanks!

hey cool.
i was right about to start a robotic arm game.

what are you doing for the controls?
i was thinking about using the different number keys for different parts of the arm.
then while you are holding down a number, use the up or down arrow keys for which direction you want that part to move

i was thinking about using the different number keys for different parts of the arm.
then while you are holding down a number, use the up or down arrow keys for which direction you want that part to move

hmmmm… that would be a good idea, it can be incorporated, but i need a simultaneous movement of the segments…so i’ll not remove the current controlls and add your suggestion.