Configuring a crane vehicle

xadh00m

18-10-2008 10:10:08

Hi folks!

I have problems configuring a crane vehicle like this:
http://www.hedonline.com/images/crane_numbered2.jpg

I want to lift and lower the crane with a motor attached to the revolute joint (near nr. 5 in the image). It should lift and lower with nearly constant speed.
My problem is that just using a motor with the "maxForce" and "velTarget" parameters and "freeSpin=false" does not do the trick. It heavily depends
on the current angle and finally on the gravitation. A PhysX sample about motor just diabled gravitation, but unfortunately this is not an option in my case.

My feeling says that I should use a high damping value at the joint (spring) to ensure the crane does not fall down when the motor "stops", but this does
not work together with a motor (PhysX Docs).

How can I configure this situation intuitional?

I appreciate any hint!

betajaen

18-10-2008 11:34:11

Hmm, quite tricky really.

1. Create a fixed joint between the arm and the body once it's in position - to lock it into place. Remove it when you want to lower the arm again.

2. You could play around with the NX_BF_FREEZE_ROT flags to stop the arm turning; but it would still be able to move.

3. Offset the shape of the arm in the actor, so the fulcrum of the arm's shape is in the actors center. Then use setAngularVelocity to rotate the arm around.

4. Attach the arm to the body using a hinge, but use a pully to move the arm up and down.


I was going to suggest using a prismatic joint to act like a pneumatic piston but it doesn't seem to be capable of doing so.


On another note: I did spend some time making a crane (the ones used for building skyscrapres) a few months back - unfortunately I spent the majority of the time designing the crane in a modeler than actually writing any code.

xadh00m

18-10-2008 11:55:49

Puh, thanks for your suggestion. I will check it out as soon as possible.

I had hoped that I´ve missed an easy way doing something like this considering
some kind of rotation damping at the hinge...
:(

Thanks!

reptor

18-10-2008 13:23:38

I was going to suggest using a prismatic joint to act like a pneumatic piston but it doesn't seem to be capable of doing so.

Just a comment to this... you should say "hydraulic" and not pneumatic. That's what those kinds of things use. The hydraulic oil has the fantastic quality over air that it doesn't compress (well, it actually does compress a little but it's so little that it doesn't matter at all). The fact that the air compresses quite a lot makes such a cylinder unstable: if you use a pneumatic piston then you should either let it go from one mechanical stop all the way to the other mechanical stop at the other end, or otherwise lock it mechanically in place if it should not move. Even if you let it go from a mechanical stop to another mechanical stop, it will be unstable if it is not locked into place with some locking mechanism. With hydraulics the oil will keep it in place so no additional locking needs to be done (although safety valves are used for example in cranes, to prevent the crane from coming down if a hydraulic hose breaks, that thing operates based on the difference of the pressure in both sides of the valve). For devices which don't require accurate movement and stability, this isn't a problem, but for cranes it is definitely a problem so hydraulics is by far a better choice than pneumatics.

Sorry, off-topic but I just had to comment when I saw the word "pneumatic" used.

Actually, this info could be useful for some developers here if they want to simulate pneumatic or hydraulic machines. There is definitely a diffference in how a pneumatic or hydraulic cylinder behaves and any person who has some clue will spot it from your simulation right away if you get it wrong. As a rule of thumb, your pneumatics should be quite flexible while your hydraulics should not be flexible.

xadh00m

18-10-2008 17:27:30

Ahm.. thanks for making this clear reptor! :wink: