Defines | Functions | Variables
pantilt.cpp File Reference
#include <ros/ros.h>
#include <corobot_msgs/PanTilt.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <linux/videodev2.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <diagnostic_updater/diagnostic_updater.h>
#include <diagnostic_updater/publisher.h>
#include <corobot_diagnostics/diagnostics.h>
#include "dynctrl.h"
Include dependency graph for pantilt.cpp:

Go to the source code of this file.

Defines

#define BITS_PER_DEGREE   (64)
#define MAX_PAN_DEG   (70)
#define MAX_TILT_DEG   (30)
#define MIN_PAN_DEG   (-70)
#define MIN_STEP_DEG   (2)
#define MIN_TILT_DEG   (-30)

Functions

int main (int argc, char **argv)
void pantilt_check_speed (int fd)
void pantilt_diagnostic (diagnostic_updater::DiagnosticStatusWrapper &stat)
int pantilt_move (int fd, int pan, int tilt)
int pantilt_reset (int fd)
void pantiltCallback (const corobot_msgs::PanTiltConstPtr &msg)

Variables

static int cam_fd
int pantiltError = 0

Define Documentation

#define BITS_PER_DEGREE   (64)

Definition at line 58 of file pantilt.cpp.

#define MAX_PAN_DEG   (70)

Definition at line 59 of file pantilt.cpp.

#define MAX_TILT_DEG   (30)

Definition at line 61 of file pantilt.cpp.

#define MIN_PAN_DEG   (-70)

Definition at line 60 of file pantilt.cpp.

#define MIN_STEP_DEG   (2)

Definition at line 63 of file pantilt.cpp.

#define MIN_TILT_DEG   (-30)

Definition at line 62 of file pantilt.cpp.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 134 of file pantilt.cpp.

void pantilt_check_speed ( int  fd)

Function that will report the status of the hardware to the diagnostic topic

Definition at line 88 of file pantilt.cpp.

int pantilt_move ( int  fd,
int  pan,
int  tilt 
)

Definition at line 122 of file pantilt.cpp.

int pantilt_reset ( int  fd)

Definition at line 108 of file pantilt.cpp.

void pantiltCallback ( const corobot_msgs::PanTiltConstPtr &  msg)

called everytime a corobot_msgs::Pantilt message is received, in which case makes the camera take the postition requested

Definition at line 74 of file pantilt.cpp.


Variable Documentation

int cam_fd [static]

Definition at line 69 of file pantilt.cpp.

int pantiltError = 0

Definition at line 71 of file pantilt.cpp.



corobot_pantilt
Author(s):
autogenerated on Sun Oct 5 2014 23:18:21