#261 "gsm" localization conflict with SetOdometry method

closed-invalid
stage (111)
5
2009-01-01
2008-12-30
Anonymous
No

I'm using player2.1.1 and stage3.0.1. I'm trying to load a single robot with pose[21 2 0]. I'm using
localization "gps"
localization_origin [0 0 0]
So I expected to get 21, 2, 0 from
std::cout << pp << std::endl;
where pp is a Position2dProxy. Instead i get always 0, 0, 0. If the robot moves values change starting from [0 0 0].
Using pp.SetOdometry(21, 2, 0) doesn't works, the values are immediately rewritten, I suppose by the gps.
Using localization_origin [a b c] with random values I always get the same results!
Using "odm" instead of "gps" i can use pp.SetOdometry() without any problem, but I want "gps"!
I found in raw 174 from libstage/model_position.cc:
if( wf->PropertyExists( wf_entity, keyword ) )
and I think keyword should be "localization_origin" but I'm not sure about this.
My sample project as attachment.
Thank you.
Alessandro Lombardi

Discussion

  • Nobody/Anonymous

    myPlayer sample project

     
  • Toby Collett

    Toby Collett - 2009-01-01

    If I am reading your report correctly then this is not an error. GPS odometry reporting is designed to be absolute, so the set odom request is ignored as it does not have an appropriate meaning.

    please clarify if I have mis understood the request.

     
  • Toby Collett

    Toby Collett - 2009-01-01
    • status: open --> closed-invalid
     
  • Nobody/Anonymous

    Sorry for "gsm" instead of "gps".
    I think it's right that "SetOdometry" request is ignored, but if I put my robot in (21, 2) with pose[21 2 0 0] in the .world file, after those few instructions:
    PlayerClient robot("localhost");
    SonarProxy sp(&robot,0);
    Position2dProxy pp(&robot,0);
    robot.Read();
    std::cout << pp << std::endl;
    cout prints 0 0 0 as xpos, ypos and theta.
    I expect 21 2 0.

    Thank you for the fast reply!

    siel

     
  • Richard Vaughan

    Richard Vaughan - 2009-01-05

    The behaviour you are seeing is correct, though it is a little tricky.

    The following is copy-pasted from the ** documentation of the position model ** :

    - localization_origin [x y theta]
    - set the origin of the localization coordinate system. By default, this is copied from the model's initial pose, so the robot reports its position relative to the place it started out. Tip: If localization_origin is set to [0 0 0] and localization is "gps", the model will return its true global position. This is unrealistic, but useful if you want to abstract away the details of localization. Be prepared to justify the use of this mode in your research!

     
  • Nobody/Anonymous

    Sorry, but I realy don't understand. I'm using:
    localization "gps"
    localization_origin [0 0 0]
    [quote]Tip: If localization_origin is set to
    [0 0 0] and localization is "gps", the model will return its true global position.[/quote]
    <<FALSE!!!>>
    In fact my robot is in [21 2 0] and "std::cout << pp << std::endl;" prints 0 0 0.
    if I use localization_origin [0 0 0] i get the same result!
    if I use localization_origin [312 123 5] i still get the same result!
    It works exactly as if localization_origin line were not there!!!

    So my question is: how can I get the real global position (21 2 0) ???
    because
    localization "gps"
    localization_origin [0 0 0]
    doesn't work.

    Thank you for patience.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks