Help i need somebody, help ! (Joints, move, ...)

albyland

07-07-2010 16:12:01

Hi,
Sorry for my very bad english,
i need to make a wheelchair with ogrenewt.
i used hinge joint for all bodies.
There are hinge joint fix (no move) and hinge joint for move (rotation).

[attachment=0]conception.jpg[/attachment]

1) Can you tell me if my conception is good (by picture)
2) How i can move my wheelchair ? torque joint ? or add force to the center box(motor) ? and for rotate ? how i can do ?

I hope you understand me.
Thanks.

kallaspriit

07-07-2010 16:54:02

Easy to do with powered hinge joints, OgreNewt supports it.

Take a look at my MinimalOgreNewtProject, I have setup a simple car with hinge joints, similar to a wheelchair, that include limits (center frame joint) and the oval cylinder is powered.

OgreNewt supports hinge limits, target speed, target angle and torque so you won't even have to use custom joints :wink:

To move, apply torque to rear wheel joints, to steer, apply target angle to top front wheel joints.

albyland

07-07-2010 17:32:05

Easy to do with powered hinge joints, OgreNewt supports it.

Take a look at my MinimalOgreNewtProject, I have setup a simple car with hinge joints, similar to a wheelchair, that include limits (center frame joint) and the oval cylinder is powered.

OgreNewt supports hinge limits, target speed, target angle and torque so you won't even have to use custom joints :wink:

To move, apply torque to rear wheel joints, to steer, apply target angle to top front wheel joints.


Thank for your fast reply :D

in rear i have used 2 hinge joint (wheelRight ---------- motor ---------- wheelLeft)
for fix hinge joint i set "setLimits(Ogre::Radian(0),Ogre::Radian(0))"

For moving my wheelchair
ok for addtorque but for rotate how i can set the good value ?
in real life only rear wheel are motorised
if you want turn on left => left motor off and right motor on
if you want turn on right => left motor on and right motor off
the angle of front wheel can go 0 to 360...i don't know how i can do it

Sorry for my very bad english, I hope you understand me.
Thanks.

kallaspriit

07-07-2010 18:00:16

Don't motorize the front wheels then but instead change the amount of torque going to rear wheels to turn it or perhaps lock one of the wheels (for example the left one to turn left). OgreNewt hinges support braking too or just set limits to zero :)

albyland

09-07-2010 15:11:50

Don't motorize the front wheels then but instead change the amount of torque going to rear wheels to turn it or perhaps lock one of the wheels (for example the left one to turn left). OgreNewt hinges support braking too or just set limits to zero :)

Thanks for your great help.
i have some dificultes with the front wheels. and i dont know if i can make without them ? can i make a "vehicle" with only 2 rear wheels with ogreNewt ?
thanks a lot.

albyland

09-07-2010 16:05:24

Don't motorize the front wheels then but instead change the amount of torque going to rear wheels to turn it or perhaps lock one of the wheels (for example the left one to turn left). OgreNewt hinges support braking too or just set limits to zero :)

Thanks for your great help.
i have some dificultes with the front wheels. and i dont know if i can make without them ? can i make a "vehicle" with only 2 rear wheels with ogreNewt ?
thanks a lot.


finally I used a sphere at the center in place of the cylinder.
thanks.

kallaspriit

09-07-2010 17:55:09

If you're using cylinders then you have to use lots of caster like real wheelchairs - this way the front wheels follow the path of the vehicle and don't get jammed.



albyland

09-07-2010 18:19:25

If you're using cylinders then you have to use lots of caster like real wheelchairs - this way the front wheels follow the path of the vehicle and don't get jammed.





this was one of difficultes, i don't have idea for make that, as for rear wheels... it is not really easy...i need some a lot of time... :(

albyland

12-07-2010 14:52:01

If you're using cylinders then you have to use lots of caster like real wheelchairs - this way the front wheels follow the path of the vehicle and don't get jammed.





How i can make caster ? with cylinders ?

kallaspriit

12-07-2010 21:31:22

Read the wiki article, caster isn't about shapes but they way bodies are connected.

albyland

12-07-2010 23:47:12

Read the wiki article, caster isn't about shapes but they way bodies are connected.

ok I see what you mean. thx

albyland

15-07-2010 11:12:44

Read the wiki article, caster isn't about shapes but they way bodies are connected.

Thx very much for your helps, it's really better :D
i have one more question about joints.
when i have a body "oblique" the joint is perpendicular or not ?
[attachment=1]a.jpg[/attachment] OR [attachment=0]b.jpg[/attachment]
thanks.

sorry for my bad english.

kallaspriit

15-07-2010 13:53:05

Don't quite understand the question, try to ask in a different way.

albyland

15-07-2010 16:17:59

Don't quite understand the question, try to ask in a different way.
sorry sorry sorry...
I found my answer when I reread.
thanks and sorry :oops:

albyland

21-07-2010 22:38:55

Hi,
thanks again for your helps,
i have some questions about my model, when my wheelchair is moving i can see a lag of "bodies view" is it normal ?
[attachment=0]pb.png[/attachment]

thanks

ps:sorry for my bad english

kallaspriit

22-07-2010 10:30:51

You are calling world->getDebugger().showDebugInformation(); before updating the world? Try to put it behind updating world in your game loop.

albyland

26-07-2010 21:47:42

You are calling world->getDebugger().showDebugInformation(); before updating the world? Try to put it behind updating world in your game loop.

Thanks very much, is perfect as usual :D

I have another problem, with my wheelchair when moving (addForce() just on the box between rears) if I use a sphere for my rear wheels my wheelchair rolls straight when I use cylinder my wheelchair drift to the left, where does the problem ?
[attachment=0]pb2.png[/attachment]

Thanks a lot

yan007

20-08-2010 14:57:47

albyland,

could you provide me the code how you make the wheel spin?
I also created a vehicle but can't get the tires rotating..

kallaspriit

22-08-2010 10:02:53

You are calling world->getDebugger().showDebugInformation(); before updating the world? Try to put it behind updating world in your game loop.

Thanks very much, is perfect as usual :D

I have another problem, with my wheelchair when moving (addForce() just on the box between rears) if I use a sphere for my rear wheels my wheelchair rolls straight when I use cylinder my wheelchair drift to the left, where does the problem ?
[attachment=0]pb2.png[/attachment]

Thanks a lot

Very hard to say from just this. Are you sure you are applying the force at the very center? And you should probably apply torque to the wheels instead to move it.

To make the wheels spin, hinge joint has methods:

//! sets desired rotational velocity of the joint
void setDesiredOmega(Ogre::Radian omega, Ogre::Real strength = 0.5f);

//! sets hinge torque
void setTorque(Ogre::Real torque);


You can also set desired angle and apply brake to the joint.