|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--EDU.gatech.cc.is.abstractrobot.Simple
|
+--EDU.gatech.cc.is.abstractrobot.SimpleN150Hard
SimpleN150Hard implements SimpleN150 for Nomad 150 hardware using the Ndirect class. You should see the specifications in SimpleN150 and Ndirect class documentation for details.
Copyright (c)1998 Tucker Balch
SimpleN150,
Ndirect| Field Summary | |
protected double |
base_speed
|
protected double |
cycles
|
protected static boolean |
DEBUG
|
protected double |
desired_heading
|
protected double |
desired_speed
|
protected int |
hard_command
|
protected boolean |
in_reverse
|
protected boolean |
keep_running
|
protected Vec2[] |
last_Obstacles
|
protected Vec2 |
last_Position
|
protected double |
last_SteerHeading
|
protected double |
last_TurretHeading
|
protected Ndirect |
nomad150_hardware
|
protected int |
num_Obstacles
|
protected int |
obstacle_rangeInch
|
protected double |
old_desired_heading
|
protected double |
old_desired_turret_heading
|
protected int |
old_hard_command
|
protected double |
run_time_sum
|
protected int[] |
sonar_raw_data
|
protected double |
time_sum
|
| Fields inherited from class EDU.gatech.cc.is.abstractrobot.Simple |
dictionary,
displayVectors,
unique_id |
| Fields inherited from interface EDU.gatech.cc.is.abstractrobot.SimpleN150 |
MAX_STEER,
MAX_TRANSLATION,
MAX_TURRET,
RADIUS,
SONAR_RADIUS |
| Constructor Summary | |
SimpleN150Hard(int serial_port,
int baud)
Instantiate a SimpleN150Hard object. |
|
| Method Summary | |
java.awt.Color |
getBackgroundColor()
Gets the background color of the robot. |
java.awt.Color |
getForegroundColor()
Gets the foreground color of the robot. |
Vec2[] |
getObstacles(long timestamp)
Get an array of Vec2s that point egocentrically from the center of the robot to the obstacles currently sensed by the bumpers and sonars. |
Vec2 |
getPosition(long timestamp)
Get the position of the robot in global coordinates. |
double |
getSteerHeading(long timestamp)
Get the current heading of the steering motor (radians). |
long |
getTime()
Gets time elapsed since the robot was instantiated. |
double |
getTurretHeading(long timestamp)
Get the current heading of the turret motor. |
void |
quit()
Quit the I/O thread. |
void |
resetPosition(Vec2 p)
Reset the odometry of the robot in global coordinates. |
void |
resetSteerHeading(double heading)
Reset the steering odometry of the robot in global coordinates. |
void |
resetTurretHeading(double heading)
Reset the turret odometry of the robot in global coordinates. |
void |
setBaseSpeed(double speed)
Set the base speed for the robot (translation) in meters per second. |
void |
setDisplayString(java.lang.String s)
Set the String that is printed on the robot's display. |
void |
setObstacleMaxRange(double range)
Set the maximum range at which a sensor reading should be considered an obstacle. |
void |
setSpeed(long timestamp,
double speed)
Set the desired speed for the robot (translation). |
void |
setSteerHeading(long timestamp,
double heading)
Set the desired heading for the steering motor. |
void |
setTurretHeading(long timestamp,
double heading)
Set the desired heading for the turret motor. |
void |
takeStep()
Conducts periodic I/O with the robot. |
| Methods inherited from class EDU.gatech.cc.is.abstractrobot.Simple |
getDictionary,
getID,
getID,
setDictionary,
setID |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Ndirect nomad150_hardware
protected static final boolean DEBUG
protected double cycles
protected double run_time_sum
protected double time_sum
protected boolean keep_running
protected double old_desired_heading
protected double old_desired_turret_heading
protected int hard_command
protected int old_hard_command
protected int[] sonar_raw_data
protected Vec2[] last_Obstacles
protected int num_Obstacles
protected int obstacle_rangeInch
protected Vec2 last_Position
protected double last_SteerHeading
protected boolean in_reverse
protected double desired_heading
protected double last_TurretHeading
protected double desired_speed
protected double base_speed
| Constructor Detail |
public SimpleN150Hard(int serial_port,
int baud)
throws java.lang.Exception
serial_port - 1 = ttys0 (COM1), 2 = ttys1 (COM2) ...baud - baud rate for communication.| Method Detail |
public void takeStep()
public void quit()
public long getTime()
public Vec2[] getObstacles(long timestamp)
timestamp - only get new information
if timestamp > than last call or timestamp == -1 .public void setObstacleMaxRange(double range)
range - the range in meters.public Vec2 getPosition(long timestamp)
timestamp - only get new information
if timestamp > than last call or timestamp == -1.resetPosition(EDU.gatech.cc.is.util.Vec2)public void resetPosition(Vec2 p)
position - the new position.getPosition(long)public double getSteerHeading(long timestamp)
timestamp - only get new information
if timestamp > than last call or timestamp == -1 .resetSteerHeading(double),
setSteerHeading(long, double)public void resetSteerHeading(double heading)
heading - the new heading in radians.getSteerHeading(long),
setSteerHeading(long, double)
public void setSteerHeading(long timestamp,
double heading)
heading - the heading in radians.getSteerHeading(long),
resetSteerHeading(double)public double getTurretHeading(long timestamp)
timestamp - only get new information
if timestamp > than last call or timestamp == -1 .setTurretHeading(long, double),
resetTurretHeading(double)public void resetTurretHeading(double heading)
heading - the new turret heading in radians.getTurretHeading(long),
setTurretHeading(long, double)
public void setTurretHeading(long timestamp,
double heading)
heading - the heading in radians.getTurretHeading(long),
resetTurretHeading(double)
public void setSpeed(long timestamp,
double speed)
timestamp - only get new information
if timestamp > than last callspeed - the desired speed from 0 to 1.0, where 1.0 is the
base speed.setSteerHeading(long, double),
setBaseSpeed(double)public void setBaseSpeed(double speed)
speed - the desired speed from 0 to 1.0, where 1.0 is the
base speed.setSpeed(long, double)public void setDisplayString(java.lang.String s)
s - String, the text to display.public java.awt.Color getForegroundColor()
public java.awt.Color getBackgroundColor()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||