If I use the following code to read position data:
Then I should be able to access the odometry data from
However, this does not seem possible. How can I read these values? When
I try something like:
double xposition = pp.Xpos;
It tells me that:
argument of type `double (PositionProxy::)() const' does not match `double'
This is using Player 1.5 (still) and the c++ client library.
From: Brian Gerkey <gerkey@ai...> - 2004-12-02 16:38:21
On Wed, 1 Dec 2004, Brandon Sights wrote:
> Then I should be able to access the odometry data from
> However, this does not seem possible. How can I read these values? When
> I try something like:
> double xposition = pp.Xpos;
> It tells me that:
> argument of type `double (PositionProxy::)() const' does not match `double'
PositionProxy::Xpos and friends are *methods*, hence the type error.
So you have to call them, e.g.:
double xposition = pp.Xpos();
However, I think I remember somebody saying that there was
some problem with those methods (e.g., maybe they're not actually
implemented?). So try accessing the data via the lowercase-named fields:
PositionProxy::xpos, PositionProxy::ypos, etc; those are actually doubles.
Check the manual, or better yet, read client_libs/c++/playerclient.h to
be sure of the names and types.
Brian P. Gerkey gerkey@...
Stanford AI Lab http://ai.stanford.edu/~gerkey
Get latest updates about Open Source Projects, Conferences and News.