I am trying to initialize the position of a set of landmarks using only bearing observations. Each robot pose, described by position (x,y) and orientation (theta), observes a small set of landmarks. Each observation, bearing angle, is expressed in the robot frame. My idea was to consider pair of consecutive robot poses, retrieve the equation of the lines passing though them and make the intersection to obtain the position of the landmark observed by both poses. Using the robot position and the bearing observation, I can retrieve the equation of a line as y-y1=m(x-x1) where the slope m can be computed as m=tan(bearing).
To check if this is the right way to proceed I tested the method on the data from the ground truth dataset. For instance, two consecutives poses R1=(1.0384, 0.037015, 0.0057897) and R2=(2.0171, 0.019962, 0.0017791) both observe the landmark L1 in position (2.8116, -4.2695), respectively with bearing values of B1=-1.1860 and B2=-1.3894. Evaluating the lines passing through R1-L1 and R2-L1 their equation is y1=-2.4287x + 2.5589 and y2=-5.3989x+10.9102. If now I try to retrieve the slope of the two lines using the method mentioned before I obtain different values m1=-2.4692 and m2=-5.4522.
Some final notes:
- I'm almost completely sure that the bearing observation provided is the actual "mathematical" angle measurement, hence no transformation of it is required.
- I think that I should use also the theta angle of the robot pose in some way, but I'm not sure how.
What am I missing?