Hello Rasko,
Well, you're not doing anything wrong. The robot just isn't returning
a Z value. I assume you're using the Pioneer2DX or Pioneer2AT model,
both of which only estimate a 2D pose (x,y,yaw). A Z value is not
returned because the Pioneer does not come equipped with an IMU.
However, you can get the absolute Z value of the robot with a single
line change. For example, in the Pioneer2DX model, look in the
PutPositionData function, and add this line:
this->position_iface->data->pos[2] = this->GetPose().pos.z;
I haven't actually tested this line, but it should work.
-nate
On 12/6/06, Rasko Pjesivac <[EMAIL PROTECTED]> wrote:
> Hi Nate and everybody,
>
> I am using libgazebo to control the robot in the world that is DEM (its
> not flat! created by gzbuilder )
>
> this is part of my .c code that is supposed to get the coordinates of the
> robot:
>
> printf("%0.3f %0.3f %0.3f\n",
> position->data->pos[0], position->data->pos[1],
> position->data->pos[2]);
>
> So when I run wxgazebo and my code I can see that my robot is moving on
> the terrain and X and Y coordinates are fine, but the Z coordinate is
> always 0.000
>
> -3.594 5.788 0.000
> -3.603 5.752 0.000
> -3.603 5.752 0.000
> -3.611 5.719 0.000
> -3.611 5.719 0.000
> -3.618 5.685 0.000
> -3.618 5.685 0.000
>
> I am not sure if its important but the model of my robot is Pioneer2DX.
> So what I am doing wrong?
>
> Thank you,
>
> Rasko
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
> _______________________________________________
> Playerstage-gazebo mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo