|
|
|
|
||
| << Previous | Page (2/3) |
[SECTION] = SOCKET activate = 1 max_retries = 10 keepalive = 1 cycletime = 25
We have created a messaging system that allows a lower-level component to send data to a higher level component without having direct access to that class. A message is created by a lower-level component and passed into a message router, which places it into a priority queue. The upper-level component checks its message box (the queue) periodically for new messages and acts upon them. (Figure 1) depicts this relationship. Data can be passed with the message, or the message can identify the data that needs to be accessed in the class that created it. Messages can also originate from the debugger via TCP sockets.
The lowest level of the software on Seawolf I, directly above the hardware
API, is the device level. This level provides interfaces for all of the sensors
used for navigation (DVL, IMU and Altimeter) as well as motor and servo controllers.
All of the device classes were designed with the desire to modularize the entire
system. This design choice greatly aided our migration of our original analog-controlled
thrusterd to our current I2C controlled thrusters. Because of our loosely-coupled
architectuyre, none of the upper level control systems required new code to use
the different thrusters
Since the DVL and IMU are constantly streaming serial data, we use separate
execution threads to retrieve data from them. We can poll the voltage on
the altimeter’s
analog channel to determine our altitude with a simple equation.
A health monitoring class uses the analog inputs on the PC/104’s onboard
DAQ to monitor temperature, voltage and current sensors in the electronics
tube.
If the system management class measures a sensor that is out of its tolerances,
it would report the problem to the mission controller (Tier III) which would
decide what to do.
The majority of work is performed in the second tier. We divided the vehicle’s
functions into four subsystems. Each subsystem runs in a separate thread and
the software framework provides data/event logging and messaging to each subsystem.
A vehicle subsystem performs device initialization and shutdown, as well as some
miscellaneous monitoring information over the low level devices. An acoustics
subsystem collects heading information from the DSP. An image processing subsystem
interfaces with the framegrabber and performs machine vision algorithms. Finally,
a control subsystem uses fuzzy logic to calculate all of our movement solutions
given different waypoints and desired conditions.
Fuzzy-logic Control Software
rule[0] = If(Temperature) is(Cold) then output[0] = High; end
Rules can contain fuzzy logical ands and ors. We can also describe fuzzy membership sets with simple macros. We have the basic set shapes—triangle, sigmoids, trapezoids and singletons. We were able to describe fuzzy controllers with upwards of 64 rules and 8 sets using our fuzzy macro language.
From the debugger, the controls subsystem can be put into different modes which alter the level of control we have over the vehicle. We can choose to directly control each thruster’s angle and thrust independently, request open-loop movements by directly manipulating the inputs of the kinematics equations, or provide destination waypoints or desired velocities to test closed-loop control. The run mode is divided into speed-major movements—movements where we’re concerned with our current speed only, or translation-major movements—movements where we’re concerned with how far we’ve moved.
| << Previous | Page (2/3)
|
| NCSU ECE | GoRobotics.net | AUVSI Competition | Contact Us |
| Underwater Robotics Club © 2004-2008. |