/usr/include/Aria/ArAMPTU.h is in libaria-dev 2.8.0+repack-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | /*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004, 2005 ActivMedia Robotics LLC
Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc.
Copyright (C) 2011, 2012, 2013 Adept Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
If you wish to redistribute ARIA under different terms, contact
Adept MobileRobots for information about a commercial version of ARIA at
robots@mobilerobots.com or
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
#ifndef ARAMPTU_H
#define ARAMPTU_H
#include "ariaTypedefs.h"
#include "ArBasePacket.h"
#include "ArPTZ.h"
/// A class with the commands for the AMPTU
class ArAMPTUCommands
{
public:
enum {
ABSTILT = 0x35, ///< Absolute tilt
RELTILTU = 0x36, ///< Relative tilt, up
RELTILTD = 0x37, ///< Relative tilt, down
ABSPAN = 0x31, ///< Absolute pan
RELPANCW = 0x32, ///< Relative pan, clockwise
RELPANCCW = 0x33, ///< Relative pan, counter clockwise
PANTILT = 0x28, ///< Pan and tilt absolute
PANTILTUCW = 0x29, ///< Relative tilt up, pan clockwise
PANTILTDCW = 0x2A, ///< Relative tilt down, pan clockwise
PANTILTUCCW = 0x2B, ///< Relative tilt up, pan counter-clockwise
PANTILTDCCW = 0x2C, ///< Relative tilt down, pan counter-clockwise
ZOOM = 0x3F, ///< Zoom
PAUSE = 0x39, ///< Pause the current movement
CONT = 0x3A, ///< Continue paused movement
PURGE = 0x3B, ///< Stops movement and purges commands
STATUS = 0x3C, ///< Requests a status packet
INIT = 0x3D, ///< Initializes the camera
RESP = 0x3E, ///< Response
PANSLEW = 0x34, ///< Sets the pan slew rate
TILTSLEW = 0x38 ///< Sets the tilt slew rate
};
};
/// A class for for making commands to send to the AMPTU
/**
There are only a few functioning ways to put things into this packet, you
MUST use thse, if you use anything else your commands won't work. You
must use byteToBuf and byte2ToBuf.
@see getUnitNumber
@see setUnitNumber
*/
class ArAMPTUPacket: public ArBasePacket
{
public:
/// Constructor
AREXPORT ArAMPTUPacket(ArTypes::UByte2 bufferSize = 30);
/// Destructor
AREXPORT virtual ~ArAMPTUPacket();
/// Gets the unit number this packet is for
AREXPORT unsigned char getUnitNumber(void);
/// Sets the unit number htis packet is for
AREXPORT bool setUnitNumber(unsigned char unitNumber);
AREXPORT virtual void byteToBuf(ArTypes::Byte val);
AREXPORT virtual void byte2ToBuf(ArTypes::Byte2 val);
AREXPORT virtual void finalizePacket(void);
protected:
unsigned char myUnitNumber;
};
/// Driver for the AMPTU
/// @ingroup ObscureClasses
class ArAMPTU : public ArPTZ
{
public:
/// Constructor
AREXPORT ArAMPTU(ArRobot *robot, int unitNumber = 0);
/// Destructor
AREXPORT virtual ~ArAMPTU();
AREXPORT virtual bool init(void);
AREXPORT virtual const char *getTypeName() { return "amptu"; }
protected:
AREXPORT virtual bool pan_i(double deg);
AREXPORT virtual bool panRel_i(double deg);
AREXPORT virtual bool tilt_i(double deg);
AREXPORT virtual bool tiltRel_i(double deg);
AREXPORT virtual bool panTilt_i(double panDeg, double tiltDeg);
AREXPORT virtual bool panTiltRel_i(double panDeg, double tiltDeg);
public:
/// Sets the rate that the camera pans at
AREXPORT bool panSlew(double deg);
/// Sets the rate the camera tilts at
AREXPORT bool tiltSlew(double deg);
virtual bool canZoom(void) const { return false; }
virtual bool canPanTiltSlew() { return true; }
/// Stops current pan/tilt, can be resumed later
AREXPORT bool pause(void);
/// Resumes a previously paused pan/tilt
AREXPORT bool resume(void);
/// Stops motion and purges last command
AREXPORT bool purge(void);
/// Retrieves the camera status
AREXPORT bool requestStatus(void);
/// Gets the angle the camera is panned to
AREXPORT virtual double getPan_i(void) const { return myPan; }
/// Gets the angle the camera is tilted to
AREXPORT virtual double getTilt_i(void) const { return myTilt; }
enum {
MIN_SLEW = 15,
MAX_TILT_SLEW = 200,
MAX_PAN_SLEW = 120
};
protected:
ArRobot *myRobot;
ArAMPTUPacket myPacket;
int myUnitNumber;
double myPan;
double myTilt;
double myPanSlew;
double myTiltSlew;
/*double myCurPan;
double myCurTilt;
double myCurPanSlew;
double myCurTiltSlew;*/
};
#endif // ARAMPTU_H
|