laser
The laser proxy provides an interface to scanning laser range finders such as the sicklms200. More...
Detailed Description
The laser proxy provides an interface to scanning laser range finders such as the sicklms200.
Data is returned in the playerc_laser_t structure.
This proxy wraps the low-level laser interface.
Classes | |
struct | playerc_laser_t |
Laser proxy data. More... | |
Functions | |
PLAYERC_EXPORT playerc_laser_t * | playerc_laser_create (playerc_client_t *client, int index) |
Create a laser proxy. More... | |
PLAYERC_EXPORT void | playerc_laser_destroy (playerc_laser_t *device) |
Destroy a laser proxy. More... | |
PLAYERC_EXPORT int | playerc_laser_subscribe (playerc_laser_t *device, int access) |
Subscribe to the laser device. More... | |
PLAYERC_EXPORT int | playerc_laser_unsubscribe (playerc_laser_t *device) |
Un-subscribe from the laser device. More... | |
PLAYERC_EXPORT int | playerc_laser_set_config (playerc_laser_t *device, double min_angle, double max_angle, double resolution, double range_res, unsigned char intensity, double scanning_frequency) |
Configure the laser. More... | |
PLAYERC_EXPORT int | playerc_laser_get_config (playerc_laser_t *device, double *min_angle, double *max_angle, double *resolution, double *range_res, unsigned char *intensity, double *scanning_frequency) |
Get the laser configuration. More... | |
PLAYERC_EXPORT int | playerc_laser_get_geom (playerc_laser_t *device) |
Get the laser geometry. More... | |
PLAYERC_EXPORT int | playerc_laser_get_id (playerc_laser_t *device) |
Get the laser IDentification information. More... | |
PLAYERC_EXPORT void | playerc_laser_printout (playerc_laser_t *device, const char *prefix) |
Print a human-readable summary of the laser state on stdout. More... | |
Function Documentation
◆ playerc_laser_create()
PLAYERC_EXPORT playerc_laser_t* playerc_laser_create | ( | playerc_client_t * | client, |
int | index | ||
) |
Create a laser proxy.
◆ playerc_laser_destroy()
PLAYERC_EXPORT void playerc_laser_destroy | ( | playerc_laser_t * | device | ) |
Destroy a laser proxy.
◆ playerc_laser_get_config()
PLAYERC_EXPORT int playerc_laser_get_config | ( | playerc_laser_t * | device, |
double * | min_angle, | ||
double * | max_angle, | ||
double * | resolution, | ||
double * | range_res, | ||
unsigned char * | intensity, | ||
double * | scanning_frequency | ||
) |
Get the laser configuration.
- Parameters
-
device Pointer to proxy object. min_angle,max_angle Start and end angles for the scan (radians). resolution Angular resolution in radians. Valid values depend on the underlyling driver. range_res Range resolution in m. Valid values depend on the underlyling driver. intensity Intensity flag; set to 1 to enable reflection intensity data. scanning_frequency Scanning frequency in Hz. Valid values depend on the underlyling driver.
- Returns
- Returns 0 on success, non-zero otherwise. Use playerc_error_str() to get a descriptive error message.
◆ playerc_laser_get_geom()
PLAYERC_EXPORT int playerc_laser_get_geom | ( | playerc_laser_t * | device | ) |
Get the laser geometry.
This writes the result into the proxy rather than returning it to the caller.
◆ playerc_laser_get_id()
PLAYERC_EXPORT int playerc_laser_get_id | ( | playerc_laser_t * | device | ) |
Get the laser IDentification information.
This writes the result into the proxy rather than returning it to the caller.
◆ playerc_laser_printout()
PLAYERC_EXPORT void playerc_laser_printout | ( | playerc_laser_t * | device, |
const char * | prefix | ||
) |
Print a human-readable summary of the laser state on stdout.
◆ playerc_laser_set_config()
PLAYERC_EXPORT int playerc_laser_set_config | ( | playerc_laser_t * | device, |
double | min_angle, | ||
double | max_angle, | ||
double | resolution, | ||
double | range_res, | ||
unsigned char | intensity, | ||
double | scanning_frequency | ||
) |
Configure the laser.
- Parameters
-
device Pointer to proxy object. min_angle,max_angle Start and end angles for the scan (radians). resolution Angular resolution in radians. Valid values depend on the underlyling driver. range_res Range resolution in m. Valid values depend on the underlyling driver. intensity Intensity flag; set to 1 to enable reflection intensity data. scanning_frequency Scanning frequency in Hz. Valid values depend on the underlyling driver.
- Returns
- Returns 0 on success, non-zero otherwise. Use playerc_error_str() to get a descriptive error message.
◆ playerc_laser_subscribe()
PLAYERC_EXPORT int playerc_laser_subscribe | ( | playerc_laser_t * | device, |
int | access | ||
) |
Subscribe to the laser device.
◆ playerc_laser_unsubscribe()
PLAYERC_EXPORT int playerc_laser_unsubscribe | ( | playerc_laser_t * | device | ) |
Un-subscribe from the laser device.