roomba.roombanetwork.services.camloc
Class CameraLocalizationService

java.lang.Object
  extended by roomba.roombanetwork.services.camloc.CameraLocalizationService
All Implemented Interfaces:
ClientListener

public class CameraLocalizationService
extends java.lang.Object
implements ClientListener

Provides a camera localization service to the Roomba Network. Will consume an image track from a ColorFinderService and the odometry readings from a RoombaService to determine where the Roomba is located

Author:
Drew Housten

Constructor Summary
CameraLocalizationService(java.lang.String serviceName, java.lang.String rnsHost, int rnsPort, java.lang.String imageTrackName, java.lang.String roombaName)
          Constructor - creates the RNC and will image tracks and odometry readings from the specified services.
 
Method Summary
 RoombaNetworkClient getRNC()
          Gets the Roomba Network Client
 void messageReceived(java.lang.String messageType, java.lang.String[] messageComponents)
          Processes a message received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CameraLocalizationService

public CameraLocalizationService(java.lang.String serviceName,
                                 java.lang.String rnsHost,
                                 int rnsPort,
                                 java.lang.String imageTrackName,
                                 java.lang.String roombaName)
Constructor - creates the RNC and will image tracks and odometry readings from the specified services.

Parameters:
serviceName - Name of the CameraLocalizationService
rnsHost - The hostname (or IP address) of the RNS
rnsPort - The port of the RNS (default is 7777)
imageTrackName - Name of the image track to use
roombaName - Name of the roomba to use
Method Detail

getRNC

public RoombaNetworkClient getRNC()
Gets the Roomba Network Client

Returns:
The client

messageReceived

public void messageReceived(java.lang.String messageType,
                            java.lang.String[] messageComponents)
Processes a message received.

Specified by:
messageReceived in interface ClientListener
Parameters:
messageType - The message type
messageComponents - The components of the received message