Re: [Bayes++] Bayes++ to predict robots location
Brought to you by:
mistevens
|
From: Nicola B. <nb...@es...> - 2006-11-13 17:40:44
|
Vinh,
I didn't have time to look at the entire code, but for sure the following
doesn't look very correct:
const Vec& PVpredict::f(const Vec& x) const
{
// Functional part of addative model
// Note: Reference return value as a speed optimisation, MUST be copied by
caller.
Vec* v = new Vec(2);
(*v)[0] = x[0] + 0.1;
(*v)[1] = x[1] + 0.2;
return *v;
}
Everytime this member returns a reference to a _new_ location, allocated with
a _local_ pointer. Well, I guess that's not what you want...
Regards
Nicola
On Monday 13 Nov 2006 14:04, Vinh wrote:
> This is what I have so far. I've tried changing the observation to be
> a 2D position and the state itself the same. It compiles and runs,
> however the results a far from what I expected.
> Somehow the values of the filter stay very close to the one of the
> initial estimate which would mean that the initial estimate's
> covariance should be very small or the observations covariance very
> big - none of this intended. Anyone can help?
>
> here's some sample output. The file, derived from the PV example, is
> attached.
>
> ----
> True [2](7.180000e+01,1.436000e+02)
> Direct
> [2](1.435908e+02,2.871707e+02),[2,2]((8.571428e-05,0.000000e+00),(0.000000e
>+00,8.571429e-05)) True [2](7.190000e+01,1.438000e+02)
> Direct
> [2](1.437973e+02,2.875657e+02),[2,2]((8.571428e-05,0.000000e+00),(0.000000e
>+00,8.571429e-05)) True [2](7.200000e+01,1.440000e+02)
> Direct
> [2](1.439857e+02,2.879593e+02),[2,2]((8.571428e-05,0.000000e+00),(0.000000e
>+00,8.571429e-05)) True [2](7.210000e+01,1.442000e+02)
> Direct
> [2](1.441731e+02,2.883677e+02),[2,2]((8.571428e-05,0.000000e+00),(0.000000e
>+00,8.571429e-05)) ------
>
> On 11/13/06, Vinh <arb...@go...> wrote:
> > Have been fiddeling arround for an hour. Could it be that I need to
> > replace the linear prediction model with an "Unscented_predict_model"?
> > I would derive from the mentioned model and then overwrite the
> > function "f" to insert my own state transition function? Same with the
> > noise i.e. covariance matrix Q?
> >
> > Vinh
> >
> > On 11/13/06, Vinh <arb...@go...> wrote:
> > > Hi,
> > > I'm just started playing around with the bayes++ library to accomplish
> > > following task:
> > >
> > > A vision system provides me with the position of our robot on the
> > > ground (2d). In addition, I want to merge this information with the
> > > internal wheelencoders (giving me the speed and rotation of the robot)
> > > to get an estimate of the position of the robot.
> > > Since the robot is rotating as well the system model is not linear.
> > > First I thought of using a particle filter to get the estimate, but
> > > that probably would be overkill, making the system slower than needed
> > > since the underlying probability distribution could simply be one
> > > gaussian.
> > > I had a look at the PV example, but got stucked and would like to ask
> > > for advice.
> > >
> > > In the state prediction (Linear_predict_model), there is something
> > > looking like this:
> > >
> > > q[0] = dt*sqr((1-Fvv)*V_NOISE);
> > > G(0,0) = 0.;
> > > G(1,0) = 1.;
> > >
> > > Can I leave it like that if I assume that the noise is always constant?
> > >
> > > Since the motion/prediction model is not linear due to the rotation,
> > > what would I need to change to modify it so that the filter can deal
> > > with non-linearities?
> > >
> > > Thanks very much for your help!!
> > >
> > > Vinh
--
------------------------------------------
Nicola Bellotto
University of Essex
Department of Computer Science
Wivenhoe Park
Colchester CO4 3SQ
United Kingdom
Room: 1N1.2.8
Tel. +44 (0)1206 874094
URL: http://privatewww.essex.ac.uk/~nbello
------------------------------------------
|