Surveyor Class Reference
[Surveyor]

Plugin Driver for Surveyor SRV-1 (with ARM-7 processor). More...

#include <src/surveyor_driver.h>

List of all members.

Public Member Functions

 Surveyor (ConfigFile *cf, int section)
 Constructor for the Surveyor multi-interface driver.
int Setup ()
 Set up the device and start the device thread by calling StartThread(), which spawns a new thread and executes Surveyor::Main(), which contains the main loop for the driver.
int Shutdown ()
 Shut down the device.
int ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data)
 Message handler that sends a response if necessary using Publish(). This function is called once for each message in the incoming queue.

Private Member Functions

virtual void Main ()
 Main "entry point" function for the driver thread created using StartThread() within the Setup() function;.

Private Attributes

const char * portname
 Serial port.
player_devaddr_t position_addr
 Address of the position device (wheels odometry).
player_devaddr_t camera_addr
 Address of the camera device.
player_devaddr_t ir_addr
 Address of the infrared (IR) beacons.
player_devaddr_t dio_addr
 Address of the digital input/output pins (ports).
srv1_comm_tsrvdev
 The surveyor object.
player_position2d_cmd_vel_t position_cmd
 position2d velocity command
player_position2d_geom_t pos_geom
 position2d geometry
int setup_image_mode
 Desired camera size.


Detailed Description

Plugin Driver for Surveyor SRV-1 (with ARM-7 processor).

These robots can be controlled via ZigBee which is attached to a USB serial port on a host computer. The host computer runs the server which then communicates to the robot.

Note:
The newer SRV-1 robot (with Blackfin processor) has not yet been tested with this driver.
Compile-time dependencies

Provides
The surveyor driver provides the following device interfaces:

Supported configuration requests

Configuration file options

Example
 driver
    (
       name "surveyor"
       plugin "libSurveyor_Driver.so"
       provides ["position2d:0" "camera:0"]
       port "/dev/ttyUSB0"
    )
 

Bug:
  • Camera interface has a small delay for snapshots (Robot has to focus first, and then shoot)
  • Camera rate is very slow - about 1fps...Could do better: at least 4fps
Todo:
  • Property bags to change image size on the fly
  • Implement IR (IR sensors are very noisy and produce false negatives on dark and shiny obstacles)
  • Implement DIO
  • Opaque interface to set program
Author:
Michael Janssen (original author)

Carlos Jaramillo (current maintainer)

Definition at line 118 of file surveyor_driver.h.


Constructor & Destructor Documentation

Surveyor::Surveyor ( ConfigFile *  cf,
int  section 
)

Constructor for the Surveyor multi-interface driver.

Constructor for the Surveyor driver. Retrieves options from the configuration file, allocates memory for each interface and then reads and adds the interfaces provided in the configuration file.

Parameters:
cf Current configuration file
section Current section in configuration file

Definition at line 42 of file surveyor_driver.cc.

References camera_addr, dio_addr, ir_addr, portname, position_addr, setup_image_mode, and srvdev.


Member Function Documentation

int Surveyor::ProcessMessage ( QueuePointer &  resp_queue,
player_msghdr *  hdr,
void *  data 
)

Message handler that sends a response if necessary using Publish(). This function is called once for each message in the incoming queue.

Parameters:
resp_queue The queue to which any response should go
hdr The message header
data The message body
Returns:
0 if the message in handled, and -1 otherwise. A NACK (Negative Acknowledgment) will be sent if a response is required.

Definition at line 232 of file surveyor_driver.cc.

References pos_geom, position_addr, position_cmd, and srvdev.

int Surveyor::Setup (  ) 

Set up the device and start the device thread by calling StartThread(), which spawns a new thread and executes Surveyor::Main(), which contains the main loop for the driver.

Returns:
0 if things go well, and -1 otherwise.

Definition at line 105 of file surveyor_driver.cc.

References srv1_comm_t::image_mode, portname, setup_image_mode, and srvdev.

int Surveyor::Shutdown (  ) 

Shut down the device.

Returns:
0 when the device has been completely shut down.

Definition at line 130 of file surveyor_driver.cc.

References srvdev.


The documentation for this class was generated from the following files:

Generated on Sun Aug 30 01:44:35 2009 for Player/Stage Plugin-Driver for Surveyor Robot SRV-1 (with ARM-7 processor) by  doxygen 1.5.8