|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--EDU.gatech.cc.is.nomad150.Ndirect
Introduction
Provides an interface to the Nomadics Technologies control library
for a Nomad 150 robot. It provides a slightly higher-level
interface than the C library functions provided by Nomadics.
See the Nomadic's Language Reference Manual for details.
Two demonstration/debugging applications are also provided: Nomad150TestTriangle and Nomad150TestSensors. Nomad150TestTriangle drives the robot around in a 5 foot triange, while Nomad150TestSensors prints out detected sensor values. See documentation for them by clicking on the appropriate link below.
Nomad150TestTriangle,
Nomad150TestSensors| Field Summary | |
static int |
MV_AC
A control law for mv(). |
static int |
MV_IGNORE
A control law for mv(). |
static int |
MV_LP
A control law for mv(). |
static int |
MV_PR
A control law for mv(). |
static int |
MV_PWM_HIGH_0
|
static int |
MV_PWM_HIGH_1
|
static int |
MV_PWM_HIGH_2
|
static int |
MV_PWM_HIGH_3
|
static int |
MV_PWM_LOW_0
|
static int |
MV_PWM_LOW_1
|
static int |
MV_PWM_LOW_2
|
static int |
MV_PWM_LOW_3
|
static int |
MV_SP
A control law for mv(). |
static int |
MV_VM
A control law for mv(). |
static int |
SERVO_CCW_TIME
Time in microseconds for full CCW rotation of servo. |
static int |
SERVO_CW_TIME
Time in microseconds for full CW rotation of servo. |
static int |
SERVO_TIME
Time in microseconds for servo pulse. |
| Constructor Summary | |
Ndirect(int serial_port,
int baud)
Instantiate a nomad150.Ndirect object. |
|
| Method Summary | |
int |
da(int th,
int tu)
Defines the robot's steering and turret angles. |
int |
dp(int x,
int y)
Defines the position of the robot. |
protected void |
finalize()
Dispose of a nomad150.Ndirect object. |
long |
get_bp()
Reads the bumpers. |
int |
get_rc()
Gets an update of the sonar, X, Y, turret and steering data. |
int |
get_rv()
Gets an update of the robot's translation, turret and steering velocities. |
int |
get_sn(int[] readings)
Reads the sonars. |
int |
get_steering()
Get the robot's steering heading, call get_rc() or mv() first to ensure this data is current. |
int |
get_turret()
Get the robot's turret heading, call get_rc() or mv() first to ensure this data is current. |
int |
get_vsteering()
Get the robot's steering velocity, call get_rv() or mv() first to ensure this data is current. |
int |
get_vtranslation()
Get the robot's translational velocity, call get_rv() or mv() first to ensure this data is current. |
int |
get_vturret()
Get the robot's turret velocity, call get_rv() or mv() first to ensure this data is current. |
int |
get_x()
Get the robot's X coordinate, call get_rc() or mv() first to ensure this data is current. |
int |
get_y()
Get the robot's Y coordinate, call get_rc() or mv() first to ensure this data is current. |
int |
gs()
Reads all the sensor data from the robot. |
int |
mv(int t_mode,
int t_mv,
int s_mode,
int s_mv,
int r_mode,
int r_mv)
Move the robot: translation, turret and steering all at once. |
int |
sn_off()
Turns off the sonar range sensors |
int |
sn_on()
Turns on the sonar range sensors. |
int |
sn_on(int delay)
Turns on the sonar range sensors. |
int |
st()
Stop the robot: translation, turret and steering all at once. |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int MV_IGNORE
mv(int, int, int, int, int, int)public static final int MV_VM
mv(int, int, int, int, int, int)public static final int MV_PR
mv(int, int, int, int, int, int)public static final int MV_LP
mv(int, int, int, int, int, int)public static final int MV_AC
mv(int, int, int, int, int, int)public static final int MV_SP
mv(int, int, int, int, int, int)public static final int SERVO_TIME
public static final int SERVO_CW_TIME
public static final int SERVO_CCW_TIME
public static final int MV_PWM_LOW_0
public static final int MV_PWM_HIGH_0
public static final int MV_PWM_LOW_1
public static final int MV_PWM_HIGH_1
public static final int MV_PWM_LOW_2
public static final int MV_PWM_HIGH_2
public static final int MV_PWM_LOW_3
public static final int MV_PWM_HIGH_3
| Constructor Detail |
public Ndirect(int serial_port,
int baud)
throws java.lang.Exception
serial_port - 1 = ttys0 (COM1), 2 = ttys1 (COM2) ...baud - baud rate for communication.| Method Detail |
protected void finalize()
throws java.lang.Exception,
java.lang.Throwable
public int da(int th,
int tu)
th - steering orientation.tu - turret orientation.
public int dp(int x,
int y)
x - the X coordinate.y - the Y coordinate.
public int mv(int t_mode,
int t_mv,
int s_mode,
int s_mv,
int r_mode,
int r_mv)
t_mode - control law for translation.t_mv - motion value for translation.s_mode - control law for steering.s_mv - motion value for steering.r_mode - control law for turret.r_mv - motion value for turret.public int st()
public int sn_on(int delay)
delay - The time between sonar firing in milliseconds.
The minimum is 60.public int sn_on()
public int sn_off()
public int get_sn(int[] readings)
readings - The sonar readings will be read into this array.
It must contain at least 16 elemements.get_rc()public int gs()
get_rc()public long get_bp()
get_rc()public int get_rc()
get_x(),
get_y(),
get_steering(),
get_turret()public int get_x()
get_rc()public int get_y()
get_rc()public int get_steering()
get_rc()public int get_turret()
get_rc()public int get_rv()
get_vtranslation(),
get_vsteering(),
get_vturret()public int get_vtranslation()
get_rv()public int get_vturret()
get_rv()public int get_vsteering()
get_rv()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||