|
|||||||||
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 | +--EDU.gatech.cc.is.abstractrobot.MultiForageN150Hard
MultiForageN150Hard implements MultiForageN150 for Nomad 150 hardware using the Ndirect class. You should see the specifications in MultiForageN150 and Ndirect class documentation for details.
To reduce I/O between the controller and the robot, a thread is set up to perform periodic I/O. The sensor data and motor commands are exchanged through MultiForageN150Hard class variables (globals).
Copyright (c)1997, 1998 Tucker Balch
MultiForageN150
,
Ndirect
,
EDU.gatech.cc.is.Newton
Field Summary | |
protected double |
gripper_finger
|
protected double |
gripper_height
|
protected int |
hard_command
|
protected Newton |
newt
|
protected NewtonTrans |
nt
|
protected double |
old_gripper_finger
|
protected double |
old_gripper_height
|
protected int |
old_hard_command
|
protected boolean |
trigger_mode
|
Fields inherited from class EDU.gatech.cc.is.abstractrobot.SimpleN150Hard |
base_speed,
cycles,
DEBUG,
desired_heading,
desired_speed,
hard_command,
in_reverse,
keep_running,
last_Obstacles,
last_Position,
last_SteerHeading,
last_TurretHeading,
nomad150_hardware,
num_Obstacles,
obstacle_rangeInch,
old_desired_heading,
old_desired_turret_heading,
old_hard_command,
run_time_sum,
sonar_raw_data,
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.MultiForageN150 |
GRIPPER_CAPTURE_RADIUS,
GRIPPER_POSITION,
VISION_FOV_DEG,
VISION_FOV_RAD,
VISION_RANGE |
Fields inherited from interface EDU.gatech.cc.is.abstractrobot.SimpleN150 |
MAX_STEER,
MAX_TRANSLATION,
MAX_TURRET,
RADIUS,
SONAR_RADIUS |
Constructor Summary | |
MultiForageN150Hard(int serial_port,
int baud)
Instantiate a MultiForageN150Hard object. |
Method Summary | |
void |
broadcast(Message m)
NOT IMPLEMENTED. |
boolean |
connected()
NOT IMPLEMENTED. |
int |
getObjectInGripper(long timestamp)
Get the kind of object in the gripper. |
Vec2[] |
getOpponents(long timestamp)
NOT IMPLEMENTED. |
int |
getPlayerNumber(long timestamp)
NOT IMPLEMENTED. |
CircularBufferEnumeration |
getReceiveChannel()
NOT IMPLEMENTED. |
Vec2[] |
getTeammates(long timestamp)
NOT IMPLEMENTED. |
Vec2[] |
getVisualObjects(long timestamp,
int channel)
Get an array of Vec2s that represent the locations of visually sensed objects egocentrically from center of the robot to the objects currently sensed by the vision system. |
void |
multicast(int[] ids,
Message m)
NOT IMPLEMENTED. |
void |
run()
Body of the thread that conducts periodic I/O with the robot. |
void |
setCommunicationMaxRange(double r)
NOT IMPLEMENTED. |
void |
setGripperFingers(long time_stamp,
double position)
Set the gripper "finger" position from 0 to 1, with 0 being closed and 1 being open. |
void |
setGripperHeight(long time_stamp,
double position)
Set the gripper height from 0 to 1, with 0 being down and 1 being up. |
void |
setKinMaxRange(double r)
NOT IMPLEMENTED. |
void |
setVisionNoise(double mean,
double stddev,
long seed)
this is a dummy implementation to keep compatibility with VisualSensorObject. |
void |
unicast(int id,
Message m)
NOT IMPLEMENTED. |
Methods inherited from class EDU.gatech.cc.is.abstractrobot.SimpleN150Hard |
getBackgroundColor,
getForegroundColor,
getObstacles,
getPosition,
getSteerHeading,
getTime,
getTurretHeading,
quit,
resetPosition,
resetSteerHeading,
resetTurretHeading,
setBaseSpeed,
setDisplayString,
setObstacleMaxRange,
setSpeed,
setSteerHeading,
setTurretHeading,
takeStep |
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 Newton newt
protected NewtonTrans nt
protected double old_gripper_finger
protected double old_gripper_height
protected int hard_command
protected int old_hard_command
protected double gripper_finger
protected boolean trigger_mode
protected double gripper_height
Constructor Detail |
public MultiForageN150Hard(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 run()
public Vec2[] getVisualObjects(long timestamp, int channel)
timestamp
- only get new information
if timestamp > than last call or timestamp == -1 .channel
- (1-6) which type/color of object to retrieve.public void setVisionNoise(double mean, double stddev, long seed)
mean
- this is the mean of the distribution. most cases this will be 0stddev
- this is the standard deviation of the noise (>= 0.0)
if equal to 0, then noise will not affect the sensorseed
- this is the value used to seed the number generator, for
repeatable pseudorandom noise.public int getObjectInGripper(long timestamp)
timestamp
- only get new information
if timestamp > than last call or timestamp == -1 .getVisualObjects(long, int)
public void setGripperFingers(long time_stamp, double position)
position
- the desired position from 0 to 1.public void setGripperHeight(long time_stamp, double position)
position
- the desired position from 0 to 1.public Vec2[] getTeammates(long timestamp)
timestamp
- only get new information if
timestamp > than last call or timestamp == -1.Vec2
public Vec2[] getOpponents(long timestamp)
timestamp
- only get new information if
timestamp > than last call or timestamp == -1.Vec2
public int getPlayerNumber(long timestamp)
timestamp
- only get new information if
timestamp > than last call or timestamp == -1.public void setKinMaxRange(double r)
r
- double, the maximum range.public void broadcast(Message m)
m
- Message, the message to be broadcast.public void unicast(int id, Message m) throws CommunicationException
id
- int, the ID of the agent to receive the message.m
- Message, the message to transmit.public void multicast(int[] ids, Message m) throws CommunicationException
ids
- int[], the IDs of the agents to receive the message.m
- Message, the message to transmit.public CircularBufferEnumeration getReceiveChannel()
Transceiver c = new RobotComm(); CircularBufferEnumeration r = c.getReceiveChannel(); while (r.hasMoreElements()) System.out.println(r.nextElement());
public void setCommunicationMaxRange(double r)
r
- double, the maximum range.public boolean connected()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |