Player
Frontpage
Contents
User
Installation
Quick start
Supported devices
Tutorials
Utilities
Client libraries
FAQ
Help
Developer
Architecture
libplayercore
interfaces
libplayerdrivers
drivers
libplayercommon
libplayerutils
libplayersd
libplayertcp
libplayerxdr
TODO
Online
Homepage
Download
Project
Bugs
Help
server
drivers
laser
lasertransform.h
1
/*
2
* Player - One Hell of a Robot Server
3
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
4
* gerkey@usc.edu kaspers@robotics.usc.edu
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
*/
22
//
23
// Desc: Base class for laser transformations (i.e. cspace etc)
24
// Author: Andrew Howard
25
// Date: 1 Sep 2002
26
// CVS: $Id: lasertransform.h 8003 2009-07-13 10:34:37Z thjc $
27
//
28
// Theory of operation -
29
//
30
// Requires - Laser device.
31
//
33
34
35
36
#include <errno.h>
37
#include <string.h>
38
#include <math.h>
39
#include <stdlib.h>
// for atoi(3)
40
#if !defined (WIN32)
41
#include <unistd.h>
42
#endif
43
44
#include <libplayercore/playercore.h>
45
46
// Driver for computing the free c-space from a laser scan.
47
class
LaserTransform
:
public
Driver
48
{
49
// Constructor
50
public
:
LaserTransform
(
ConfigFile
* cf,
int
section);
51
52
// MessageHandler
53
public
:
virtual
int
ProcessMessage
(
QueuePointer
& resp_queue,
54
player_msghdr
* hdr,
55
void
* data);
56
57
// Setup/shutdown routines.
58
public
:
virtual
int
Setup
();
59
public
:
virtual
int
Shutdown
();
60
61
protected
:
62
// Process laser data. Returns non-zero if the laser data has been
63
// updated.
64
virtual
int
UpdateLaser(
player_laser_data_t
* data) = 0;
65
66
// Process requests. Returns 1 if the configuration has changed.
67
int
HandleRequests();
68
69
// Handle geometry requests.
70
void
HandleGetGeom(
void
*client,
void
*req,
int
reqlen);
71
72
// Laser stuff.
73
Device
*laser_device;
74
player_devaddr_t
laser_addr;
75
struct
timeval laser_timestamp;
76
77
// Fiducila stuff (the data we generate).
78
player_laser_data_t
data;
79
struct
timeval time;
80
};
81
Last updated 12 September 2005 21:38:45