All Packages Class Hierarchy This Package Previous Next Index
Class EDU.gatech.cc.is.abstractrobot.MultiForageN150Hard
java.lang.Object
|
+----EDU.gatech.cc.is.abstractrobot.Simple
|
+----EDU.gatech.cc.is.abstractrobot.SimpleN150Hard
|
+----EDU.gatech.cc.is.abstractrobot.MultiForageN150Hard
- public class MultiForageN150Hard
- extends SimpleN150Hard
- implements MultiForageN150
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
- Version:
- $Revision: 1.7 $
- Author:
- Tucker Balch
- See Also:
- MultiForageN150, Ndirect, Newton
-
gripper_finger
-
-
gripper_height
-
-
hard_command
-
-
newt
-
-
nt
-
-
old_gripper_finger
-
-
old_gripper_height
-
-
old_hard_command
-
-
trigger_mode
-
-
MultiForageN150Hard(int, int)
- Instantiate a MultiForageN150Hard object.
-
broadcast(Message)
- NOT IMPLEMENTED.
-
connected()
- NOT IMPLEMENTED.
-
getObjectInGripper(long)
- Get the kind of object in the gripper.
-
getOpponents(long)
- NOT IMPLEMENTED.
-
getPlayerNumber(long)
- NOT IMPLEMENTED.
-
getReceiveChannel()
- NOT IMPLEMENTED.
-
getTeammates(long)
- NOT IMPLEMENTED.
-
getVisualObjects(long, int)
- 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.
-
multicast(int[], Message)
- NOT IMPLEMENTED.
-
run()
- Body of the thread that conducts periodic I/O with
the robot.
-
setCommunicationMaxRange(double)
- NOT IMPLEMENTED.
-
setGripperFingers(long, double)
- Set the gripper "finger" position from 0 to 1, with
0 being closed and 1 being open.
-
setGripperHeight(long, double)
- Set the gripper height from 0 to 1, with
0 being down and 1 being up.
-
setKinMaxRange(double)
- NOT IMPLEMENTED.
-
unicast(int, Message)
- NOT IMPLEMENTED.
newt
protected Newton newt
nt
protected NewtonTrans nt
old_gripper_finger
protected double old_gripper_finger
old_gripper_height
protected double old_gripper_height
hard_command
protected int hard_command
old_hard_command
protected int old_hard_command
gripper_finger
protected double gripper_finger
trigger_mode
protected boolean trigger_mode
gripper_height
protected double gripper_height
MultiForageN150Hard
public MultiForageN150Hard(int serial_port,
int baud) throws Exception
- Instantiate a MultiForageN150Hard object. You should only
instantiate one of these per robot connected to your
computer. Standard call is MultiForageN150Hard(1,38400);
- Parameters:
- serial_port - 1 = ttys0 (COM1), 2 = ttys1 (COM2) ...
- baud - baud rate for communication.
- Throws: Exception
- If unable to configure the hardware.
run
public void run()
- Body of the thread that conducts periodic I/O with
the robot. It runs at most every MultiForageN150Hard.MIN_CYCLE_TIME
milliseconds to gather sensor data from the robot, and issue
movement commands.
getVisualObjects
public 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.
- Parameters:
- timestamp - only get new information
if timestamp > than last call or timestamp == -1 .
- channel - (1-6) which type/color of object to retrieve.
- Returns:
- the sensed objects.
getObjectInGripper
public int getObjectInGripper(long timestamp)
- Get the kind of object in the gripper.
- Parameters:
- timestamp - only get new information
if timestamp > than last call or timestamp == -1 .
- Returns:
- channel (0-5) which type/color of object
`in the gripper, -1 otherwise.
- See Also:
- getVisualObjects
setGripperFingers
public void setGripperFingers(long time_stamp,
double position)
- Set the gripper "finger" position from 0 to 1, with
0 being closed and 1 being open.
In simulation, any setting less than 1 means closed.
- Parameters:
- position - the desired position from 0 to 1.
setGripperHeight
public void setGripperHeight(long time_stamp,
double position)
- Set the gripper height from 0 to 1, with
0 being down and 1 being up.
In simulation this has no effect.
- Parameters:
- position - the desired position from 0 to 1.
getTeammates
public Vec2[] getTeammates(long timestamp)
- NOT IMPLEMENTED.
Get an array of Vec2s that represent the locations of
teammates (Kin).
- Parameters:
- timestamp - only get new information if
timestamp > than last call or timestamp == -1.
- Returns:
- the sensed teammates.
- See Also:
- Vec2
getOpponents
public Vec2[] getOpponents(long timestamp)
- NOT IMPLEMENTED.
Get an array of Vec2s that represent the
locations of opponents.
- Parameters:
- timestamp - only get new information if
timestamp > than last call or timestamp == -1.
- Returns:
- the sensed opponents.
- See Also:
- Vec2
getPlayerNumber
public int getPlayerNumber(long timestamp)
- NOT IMPLEMENTED.
Get the robot's player number, between 0
and the number of robots on the team.
Don't confuse this with getID which returns a unique number
for the object in the simulation as a whole, not on its individual
team.
- Parameters:
- timestamp - only get new information if
timestamp > than last call or timestamp == -1.
- Returns:
- the player number.
setKinMaxRange
public void setKinMaxRange(double r)
- NOT IMPLEMENTED.
Set the maximum range at which kin may be sensed. Primarily
for use in simulation.
- Parameters:
- r - double, the maximum range.
broadcast
public void broadcast(Message m)
- NOT IMPLEMENTED.
Broadcast a message to all teammates, except self.
- Parameters:
- m - Message, the message to be broadcast.
unicast
public void unicast(int id,
Message m) throws CommunicationException
- NOT IMPLEMENTED.
Transmit a message to just one teammate. Transmission to
self is allowed.
- Parameters:
- id - int, the ID of the agent to receive the message.
- m - Message, the message to transmit.
- Throws: CommunicationException
- if the receiving agent does not
exist.
multicast
public void multicast(int ids[],
Message m) throws CommunicationException
- NOT IMPLEMENTED.
Transmit a message to specific teammates. Transmission to
self is allowed.
- Parameters:
- ids - int[], the IDs of the agents to receive the message.
- m - Message, the message to transmit.
- Throws: CommunicationException
- if one of the receiving agents
does not exist.
getReceiveChannel
public Enumeration getReceiveChannel()
- NOT IMPLEMENTED.
Get an enumeration of the incoming messages. The messages
are automatically buffered by the implementation.
Unless the implementation guarantees it, you cannot
count on all messages being delivered.
Example, to print all incoming messages:
Transceiver c = new RobotComm();
Enumeration r = c.getReceiveChannel();
while (r.hasMoreElements())
System.out.println(r.nextElement());
- Returns:
- the Enumeration.
setCommunicationMaxRange
public void setCommunicationMaxRange(double r)
- NOT IMPLEMENTED.
Set the maximum range at which communication can occur.
In simulation, this corresponds to a simulation of physical limits,
on mobile robots it corresponds to a signal strength setting.
- Parameters:
- r - double, the maximum range.
connected
public boolean connected()
- NOT IMPLEMENTED.
All Packages Class Hierarchy This Package Previous Next Index