Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1338/client_libs/libplayerc++
Modified Files:
clientproxy.cc clientproxy.h localizeproxy.cc playerc++.cc
playerc++.h position2dproxy.cc
Log Message:
applied patch 1749747 to transition to 3d pose structures
Index: clientproxy.h
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc++/clientproxy.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** clientproxy.h 29 Apr 2007 07:18:43 -0000 1.4
--- clientproxy.h 9 Jul 2007 17:17:58 -0000 1.5
***************
*** 232,236 ****
/// @brief Set a string property
! int SetStrProp(char *aProperty, const char *aValue);
/// Connect a signal to this proxy
--- 232,236 ----
/// @brief Set a string property
! int SetStrProp(char *aProperty, char *aValue);
/// Connect a signal to this proxy
Index: position2dproxy.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc++/position2dproxy.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** position2dproxy.cc 19 May 2006 09:51:37 -0000 1.11
--- position2dproxy.cc 9 Jul 2007 17:17:58 -0000 1.12
***************
*** 85,89 ****
! void Position2dProxy::GoTo(player_pose_t pos, player_pose_t vel)
{
scoped_lock_t lock(mPc->mMutex);
--- 85,89 ----
! void Position2dProxy::GoTo(player_pose2d_t pos, player_pose2d_t vel)
{
scoped_lock_t lock(mPc->mMutex);
Index: playerc++.h
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerc++.h,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -d -r1.89 -r1.90
*** playerc++.h 9 Jul 2007 17:01:48 -0000 1.89
--- playerc++.h 9 Jul 2007 17:17:58 -0000 1.90
***************
*** 600,612 ****
/// The pose of the sensor
! player_pose_t GetSensorPose() const
{ return GetVar(mDevice->fiducial_geom.pose);};
/// The size of the sensor
! player_bbox_t GetSensorSize() const
{ return GetVar(mDevice->fiducial_geom.size);};
/// The size of the most recently detected fiducial
! player_bbox_t GetFiducialSize() const
{ return GetVar(mDevice->fiducial_geom.fiducial_size);};
--- 600,612 ----
/// The pose of the sensor
! player_pose3d_t GetSensorPose() const
{ return GetVar(mDevice->fiducial_geom.pose);};
/// The size of the sensor
! player_bbox3d_t GetSensorSize() const
{ return GetVar(mDevice->fiducial_geom.size);};
/// The size of the most recently detected fiducial
! player_bbox2d_t GetFiducialSize() const
{ return GetVar(mDevice->fiducial_geom.fiducial_size);};
***************
*** 947,951 ****
uint GetPoseCount() const { return GetVar(mDevice->poses.poses_count); };
/// get a particular pose
! player_pose_t GetPose(uint aIndex) const
{return GetVar(mDevice->poses.poses[aIndex]);};
--- 947,951 ----
uint GetPoseCount() const { return GetVar(mDevice->poses.poses_count); };
/// get a particular pose
! player_pose3d_t GetPose(uint aIndex) const
{return GetVar(mDevice->poses.poses[aIndex]);};
***************
*** 1070,1081 ****
/// Accessor for the pose of the laser with respect to its parent
/// object (e.g., a robot). Fill it in by calling RequestGeom.
! player_pose_t GetPose()
{
! player_pose_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->pose[0];
p.py = mDevice->pose[1];
! p.pa = mDevice->pose[2];
return(p);
}
--- 1070,1081 ----
/// Accessor for the pose of the laser with respect to its parent
/// object (e.g., a robot). Fill it in by calling RequestGeom.
! player_pose3d_t GetPose()
{
! player_pose3d_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->pose[0];
p.py = mDevice->pose[1];
! p.pyaw = mDevice->pose[2];
return(p);
}
***************
*** 1083,1101 ****
/// Accessor for the pose of the laser's parent object (e.g., a robot).
/// Filled in by some (but not all) laser data messages.
! player_pose_t GetRobotPose()
{
! player_pose_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->robot_pose[0];
p.py = mDevice->robot_pose[1];
! p.pa = mDevice->robot_pose[2];
return(p);
}
/// Accessor for the size (fill it in by calling RequestGeom)
! player_bbox_t GetSize()
{
! player_bbox_t b;
scoped_lock_t lock(mPc->mMutex);
--- 1083,1101 ----
/// Accessor for the pose of the laser's parent object (e.g., a robot).
/// Filled in by some (but not all) laser data messages.
! player_pose3d_t GetRobotPose()
{
! player_pose3d_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->robot_pose[0];
p.py = mDevice->robot_pose[1];
! p.pyaw = mDevice->robot_pose[2];
return(p);
}
/// Accessor for the size (fill it in by calling RequestGeom)
! player_bbox3d_t GetSize()
{
! player_bbox3d_t b;
scoped_lock_t lock(mPc->mMutex);
***************
*** 1232,1236 ****
/// Get the Pose of a particle
! player_pose_t GetParticlePose(int index) const;
/// Set the current pose hypothesis (m, m, radians).
--- 1232,1236 ----
/// Get the Pose of a particle
! player_pose2d_t GetParticlePose(int index) const;
/// Set the current pose hypothesis (m, m, radians).
***************
*** 1430,1436 ****
/// Get the current pose
! player_pose_t GetPose() const
{
! player_pose_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->px;
--- 1430,1436 ----
/// Get the current pose
! player_pose2d_t GetPose() const
{
! player_pose2d_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->px;
***************
*** 1451,1457 ****
/// Get the goal
! player_pose_t GetGoal() const
{
! player_pose_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->gx;
--- 1451,1457 ----
/// Get the goal
! player_pose2d_t GetGoal() const
{
! player_pose2d_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->gx;
***************
*** 1472,1478 ****
/// Get the current waypoint
! player_pose_t GetCurrentWaypoint() const
{
! player_pose_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->wx;
--- 1472,1478 ----
/// Get the current waypoint
! player_pose2d_t GetCurrentWaypoint() const
{
! player_pose2d_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->wx;
***************
*** 1493,1500 ****
/// Get the waypoint
! player_pose_t GetWaypoint(uint aIndex) const
{
assert(aIndex < GetWaypointCount());
! player_pose_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->waypoints[aIndex][0];
--- 1493,1500 ----
/// Get the waypoint
! player_pose2d_t GetWaypoint(uint aIndex) const
{
assert(aIndex < GetWaypointCount());
! player_pose2d_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->waypoints[aIndex][0];
***************
*** 1518,1522 ****
/// For example, given a @p PlannerProxy named @p pp, the following
/// expressions are equivalent: @p pp.GetWaypoint(0) and @p pp[0].
! player_pose_t operator [](uint aIndex) const
{ return GetWaypoint(aIndex); }
--- 1518,1522 ----
/// For example, given a @p PlannerProxy named @p pp, the following
/// expressions are equivalent: @p pp.GetWaypoint(0) and @p pp[0].
! player_pose2d_t operator [](uint aIndex) const
{ return GetWaypoint(aIndex); }
***************
*** 1594,1611 ****
/// Accessor for the pose (fill it in by calling RequestGeom)
! player_pose_t GetPose() const
{
! player_pose_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->pose[0];
p.py = mDevice->pose[1];
! p.pa = mDevice->pose[2];
return(p);
}
/// Accessor for the size (fill it in by calling RequestGeom)
! player_bbox_t GetSize() const
{
! player_bbox_t b;
scoped_lock_t lock(mPc->mMutex);
b.sl = mDevice->size[0];
--- 1594,1611 ----
/// Accessor for the pose (fill it in by calling RequestGeom)
! player_pose3d_t GetPose() const
{
! player_pose3d_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->pose[0];
p.py = mDevice->pose[1];
! p.pyaw = mDevice->pose[2];
return(p);
}
/// Accessor for the size (fill it in by calling RequestGeom)
! player_bbox3d_t GetSize() const
{
! player_bbox3d_t b;
scoped_lock_t lock(mPc->mMutex);
b.sl = mDevice->size[0];
***************
*** 1713,1718 ****
{ return SetSpeed(aXSpeed, 0, aYawSpeed);}
! /// Overloaded SetSpeed that takes player_pose_t as an argument
! void SetSpeed(player_pose_t vel)
{ return SetSpeed(vel.px, vel.py, vel.pa);}
--- 1713,1718 ----
{ return SetSpeed(aXSpeed, 0, aYawSpeed);}
! /// Overloaded SetSpeed that takes player_pose2d_t as an argument
! void SetSpeed(player_pose2d_t vel)
{ return SetSpeed(vel.px, vel.py, vel.pa);}
***************
*** 1720,1733 ****
/// desired pose of the robot as a player_pose_t.
/// desired motion speed as a player_pose_t.
! void GoTo(player_pose_t pos, player_pose_t vel);
/// Same as the previous GoTo(), but doesn't take speed
! void GoTo(player_pose_t pos)
! {GoTo(pos,(player_pose_t) {0,0,0}); }
/// Same as the previous GoTo(), but only takes position arguments,
/// no motion speed setting
void GoTo(double aX, double aY, double aYaw)
! {GoTo((player_pose_t) {aX,aY,aYaw},(player_pose_t) {0,0,0}); }
/// Sets command for carlike robot
--- 1720,1733 ----
/// desired pose of the robot as a player_pose_t.
/// desired motion speed as a player_pose_t.
! void GoTo(player_pose2d_t pos, player_pose2d_t vel);
/// Same as the previous GoTo(), but doesn't take speed
! void GoTo(player_pose2d_t pos)
! {GoTo(pos,(player_pose2d_t) {0,0,0}); }
/// Same as the previous GoTo(), but only takes position arguments,
/// no motion speed setting
void GoTo(double aX, double aY, double aYaw)
! {GoTo((player_pose2d_t) {aX,aY,aYaw},(player_pose2d_t) {0,0,0}); }
/// Sets command for carlike robot
***************
*** 1739,1756 ****
/// Accessor for the pose (fill it in by calling RequestGeom)
! player_pose_t GetPose()
{
! player_pose_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->pose[0];
p.py = mDevice->pose[1];
! p.pa = mDevice->pose[2];
return(p);
}
/// Accessor for the size (fill it in by calling RequestGeom)
! player_bbox_t GetSize()
{
! player_bbox_t b;
scoped_lock_t lock(mPc->mMutex);
b.sl = mDevice->size[0];
--- 1739,1756 ----
/// Accessor for the pose (fill it in by calling RequestGeom)
! player_pose3d_t GetPose()
{
! player_pose3d_t p;
scoped_lock_t lock(mPc->mMutex);
p.px = mDevice->pose[0];
p.py = mDevice->pose[1];
! p.pyaw = mDevice->pose[2];
return(p);
}
/// Accessor for the size (fill it in by calling RequestGeom)
! player_bbox3d_t GetSize()
{
! player_bbox3d_t b;
scoped_lock_t lock(mPc->mMutex);
b.sl = mDevice->size[0];
***************
*** 2256,2260 ****
/// Sonar poses (m,m,radians)
! player_pose_t GetPose(uint aIndex) const
{ return GetVar(mDevice->poses[aIndex]); };
--- 2256,2260 ----
/// Sonar poses (m,m,radians)
! player_pose3d_t GetPose(uint aIndex) const
{ return GetVar(mDevice->poses[aIndex]); };
***************
*** 2490,2496 ****
{
std::ostream& operator << (std::ostream& os, const player_point_2d_t& c);
! std::ostream& operator << (std::ostream& os, const player_pose_t& c);
std::ostream& operator << (std::ostream& os, const player_pose3d_t& c);
! std::ostream& operator << (std::ostream& os, const player_bbox_t& c);
std::ostream& operator << (std::ostream& os, const player_segment_t& c);
std::ostream& operator << (std::ostream& os, const playerc_device_info_t&
c);
--- 2490,2497 ----
{
std::ostream& operator << (std::ostream& os, const player_point_2d_t& c);
! std::ostream& operator << (std::ostream& os, const player_pose2d_t& c);
std::ostream& operator << (std::ostream& os, const player_pose3d_t& c);
! std::ostream& operator << (std::ostream& os, const player_bbox2d_t& c);
! std::ostream& operator << (std::ostream& os, const player_bbox3d_t& c);
std::ostream& operator << (std::ostream& os, const player_segment_t& c);
std::ostream& operator << (std::ostream& os, const playerc_device_info_t&
c);
Index: playerc++.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerc++.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** playerc++.cc 14 Mar 2007 16:41:51 -0000 1.15
--- playerc++.cc 9 Jul 2007 17:17:58 -0000 1.16
***************
*** 141,145 ****
std::ostream&
! std::operator << (std::ostream& os, const player_pose_t& c)
{
os << "pose: " << c.px << "," << c.py << "," << c.pa;
--- 141,145 ----
std::ostream&
! std::operator << (std::ostream& os, const player_pose2d_t& c)
{
os << "pose: " << c.px << "," << c.py << "," << c.pa;
***************
*** 156,160 ****
std::ostream&
! std::operator << (std::ostream& os, const player_bbox_t& c)
{
os << "bbox: " << c.sw << "," << c.sl;
--- 156,160 ----
std::ostream&
! std::operator << (std::ostream& os, const player_bbox2d_t& c)
{
os << "bbox: " << c.sw << "," << c.sl;
***************
*** 163,166 ****
--- 163,174 ----
std::ostream&
+ std::operator << (std::ostream& os, const player_bbox3d_t& c)
+ {
+ os << "bbox: " << c.sw << "," << c.sl << "," << c.sh;
+ return os;
+ }
+
+
+ std::ostream&
std::operator << (std::ostream& os, const player_segment_t& c)
{
Index: localizeproxy.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc++/localizeproxy.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** localizeproxy.cc 8 Mar 2006 15:25:49 -0000 1.7
--- localizeproxy.cc 9 Jul 2007 17:17:58 -0000 1.8
***************
*** 89,95 ****
! player_pose_t LocalizeProxy::GetParticlePose(int index) const
{
! player_pose_t pose;
assert(index>=0 && index < this->mDevice->num_particles);
--- 89,95 ----
! player_pose2d_t LocalizeProxy::GetParticlePose(int index) const
{
! player_pose2d_t pose;
assert(index>=0 && index < this->mDevice->num_particles);
Index: clientproxy.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/client_libs/libplayerc++/clientproxy.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** clientproxy.cc 29 Apr 2007 07:18:43 -0000 1.15
--- clientproxy.cc 9 Jul 2007 17:17:58 -0000 1.16
***************
*** 124,128 ****
}
! int ClientProxy::SetStrProp(char *aProperty, const char *aValue)
{
scoped_lock_t lock(mPc->mMutex);
--- 124,128 ----
}
! int ClientProxy::SetStrProp(char *aProperty, char *aValue)
{
scoped_lock_t lock(mPc->mMutex);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit