[ODE] Nothing but problems with anything involving joints/wheels

Jon Watte (ODE) hplus-ode at mindcontrol.org
Thu Mar 30 11:33:54 MST 2006


It sounds like your problem is actually with modeling, rather than with 
the simulation as such. I have no idea where to find good references for 
how to model various physical phenomenon -- it seems to be a black art 
that I've never found to be particularly challenging, but a lot of 
questions on the list relate to this area. Some kind of cook-book might 
be useful..


You can move without wheels. The main question is what your contact 
joints do. You can model a cart as a simple box that's dragged on the 
ground if you want -- just set the contact joint parameters correctly.

For a horse dragging a cart, you could model the cart as a simple box. 
Turn on mu and mu2 in your contacts for the cart. Set mu to something 
small (0.01?) and mu2 to something bigger (0.3?). Set fdir to forward in 
the box's direction for contacts generated at the rear end of the box, 
and to the direction from the contact to the center of the horse for 
contacts generated at the front of the box, and an interpolation between 
the two for contacts generated between the two.

Now, applying a force to the box will make the box try to go forward, 
and turn towards the horse.


Now, once you have the cart working with forces added to the cart, you 
can couple it to the horse. This is likely a universal joint, where the 
joint connection point is the hinge (I'm assuming perfectly rigid tack 
here -- unlikely in the real world :-). Don't change anything else in 
the cart. Now, model the horse using whatever method you prefer. I'd 
probably model it as another box, taller, and try to keep it upright 
with an amotor.

For contact joints you create for the horse, do the similar kind of 
fdir/mu/mu2 model, except aim the front of the horse towards wherever 
the user is steering. To make the horse (and the cart) move, apply force 
forward on the horse body. Make sure the mu of the contacts is low 
enough that you can glide forward -- but when the user is not pressing 
forward, you may wish to set the mu higher (and the same front and 
sideways) so that the horse comes to a rest.


Cheers,

			/ h+

Sponge wrote:

> I have spent *weeks* to get objects connected to each other like a
> 'car and trailer' (horse and wagon). I have read every single post
> using the GMane search



More information about the ODE mailing list