PlayerCc::LaserProxy Class Reference
[Proxies]
#include <playerc++.h>
Inherits PlayerCc::ClientProxy.
Detailed Description
TheLaserProxy class is used to control a laser device.
The latest scan data is held in two arrays: ranges and intensity. The laser scan range, resolution and so on can be configured using the Configure() method.
Public Member Functions | |
| LaserProxy (PlayerClient *aPc, uint aIndex=0) | |
| constructor | |
| ~LaserProxy () | |
| destructor | |
| uint | GetCount () const |
| Number of points in scan. | |
| double | GetMaxRange () const |
| Max range for the latest set of data (meters). | |
| double | GetScanRes () const |
| Angular resolution of scan (radians). | |
| double | GetRangeRes () const |
| Range resolution of scan (mm). | |
| double | GetMinAngle () const |
| Scan range for the latest set of data (radians). | |
| double | GetMaxAngle () const |
| Scan range for the latest set of data (radians). | |
| bool | IntensityOn () const |
| Whether or not reflectance (i.e., intensity) values are being returned. | |
| player_point_2d_t | GetPoint (uint aIndex) const |
| Scan data (Cartesian): x,y (m). | |
| double | GetRange (uint aIndex) const |
| get the range | |
| double | GetBearing (uint aIndex) const |
| get the bearing | |
| int | GetIntensity (uint aIndex) const |
| get the intensity | |
| void | Configure (double aMinAngle, double aMaxAngle, uint aScanRes, uint aRangeRes, bool aIntensity) |
| Configure the laser scan pattern. | |
| void | RequestConfigure () |
| Get the current laser configuration; it is read into the relevant class attributes. | |
| void | RequestGeom () |
| Get the laser's geometry; it is read into the relevant class attributes. | |
| player_pose_t | GetPose () |
| Accessor for the pose of the laser with respect to its parent object (e.g., a robot). | |
| player_pose_t | GetRobotPose () |
| Accessor for the pose of the laser's parent object (e.g., a robot). | |
| player_bbox_t | GetSize () |
| Accessor for the size (fill it in by calling RequestGeom). | |
| double | MinLeft () |
| Min left. | |
| double | MinRight () |
| Min right. | |
| double | operator[] (uint index) const |
| Range access operator. | |
Member Function Documentation
| void PlayerCc::LaserProxy::Configure | ( | double | aMinAngle, | |
| double | aMaxAngle, | |||
| uint | aScanRes, | |||
| uint | aRangeRes, | |||
| bool | aIntensity | |||
| ) |
Configure the laser scan pattern.
Angles min_angle and max_angle are measured in radians. scan_res is measured in units of 0.01 degrees; valid values are: 25 (0.25 deg), 50 (0.5 deg) and 100 (1 deg). range_res is measured in mm; valid values are: 1, 10, 100. Set intensity to true to enable intensity measurements, or false to disable.
| void PlayerCc::LaserProxy::RequestConfigure | ( | ) |
Get the current laser configuration; it is read into the relevant class attributes.
| void PlayerCc::LaserProxy::RequestGeom | ( | ) |
Get the laser's geometry; it is read into the relevant class attributes.
| player_pose_t PlayerCc::LaserProxy::GetPose | ( | ) | [inline] |
Accessor for the pose of the laser with respect to its parent object (e.g., a robot).
Fill it in by calling RequestGeom.
References PlayerCc::PlayerClient::mMutex, player_pose::pa, playerc_laser_t::pose, player_pose::px, and player_pose::py.
| player_pose_t PlayerCc::LaserProxy::GetRobotPose | ( | ) | [inline] |
Accessor for the pose of the laser's parent object (e.g., a robot).
Filled in by some (but not all) laser data messages.
References PlayerCc::PlayerClient::mMutex, player_pose::pa, player_pose::px, player_pose::py, and playerc_laser_t::robot_pose.
| double PlayerCc::LaserProxy::operator[] | ( | uint | index | ) | const [inline] |
Range access operator.
This operator provides an alternate way of access the range data. For example, given an LaserProxy named lp, the following expressions are equivalent: lp.ranges[0], lp.Ranges(0), and lp[0].
References GetRange().
The documentation for this class was generated from the following file:
