[ODE] nonholonomic vehicle path following
Ke
kxubb at yahoo.com
Mon Jun 11 15:05:57 MST 2007
Thanks.
Found one sample code on ODE FAQ section.
---------------------------------------------
How can I simulate a servo motor?
dReal Gain = 0.1;
dReal MaxForce = 100;
dReal TruePosition = dJointGetHingeAngle(joint);
dReal DesiredPosition = /* whatever */;
dReal Error = TruePosition - DesiredPosition;
dReal DesiredVelocity = -Error * Gain;
dJointSetHingeParam(joint[a], dParamFMax, MaxForce);
dJointSetHingeParam(joint[a], dParamVel,
DesiredVelocity);
------------------------------------------
seems it uses motor angular velocity (dParamVel) to
achieve the motor position control.
Question:
Can I also use the same way to do steering angles
control in order to achieve desired car-body heading
angles?
I feel it has to wait for the ODE integrator to reach
my desired steering, maybe need couples of time-steps.
But my steering control sequences are given every
time-step. Or any other way we can perform such
similar angular position control?
Ke
--- "STenyaK (Bruno González)" <stenyak at gmail.com>
wrote:
> On 6/11/07, Ke <kxubb at yahoo.com> wrote:
> > After tuning up the parameters like
> steering,linear
> > velocity, our car can reach one target position w/
> > less than 5% error. But that set of parameters may
> not
> > give us good error control for other testing
> cases.But
> > we need to find a good set of parameters good for
> > general cases. Looks we have to tune the control
> > parameters case by case.
> >
> > > You should not copy the steering values from one
> car
> > > to the other
> > > verbatim, but calculate the difference to the
> > > desired path and apply
> > > that to the car. This way you will have a
> > > self-correcting steering. I
> > > hope this is stable, which depends on how big
> the
> > > errors are from
> > > step to step.
>
> Wheels will always slide a bit, so even when the
> front wheels point to
> the correct point, there will probably exist some
> understeer that will
> prevent the car from steering enough to reach the
> target.
>
> If that's the case, try to feed it wrong data (make
> the car think it
> has to go further to the left/right than it really
> has). Then maybe
> apply some dampening to the steering wheel, so that
> it doesn't swerve
> left-right like mad when it's actually following the
> desired path
> correctly.
>
> With some luck, that'll work for most situations,
> not needing to
> fine-tune each case. Hope it helps :)
>
> --
> Saludos,
> STenyaK
>
> _______________________________________________
> Msn/Jabber: stenyak AT gmail.com
> ICQ: 153709484
> Webs: http://1ksurvivor.homeip.net 1kSurvivor
> http://motorsport-sim.org Motorsport
> http://emuletutorial.info EmuleTutorial
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://ode.org/mailman/listinfo/ode
>
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
More information about the ODE
mailing list