|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCarmen.Robot
public class Robot
Carmen class for a Robot
| Nested Class Summary | |
|---|---|
static class |
Robot.BaseResetMessage
Event Handler receives this and can set its fields |
static class |
Robot.RobotVectorMoveMessage
Event Handler receives this and can set its fields |
static class |
Robot.RobotVelocityMessage
Event Handler receives this and can set its fields |
| Constructor Summary | |
|---|---|
Robot()
|
|
| Method Summary | |
|---|---|
static void |
dispatch()
|
static void |
initialize(java.lang.String moduleName,
java.lang.String SBCName)
|
static int |
listen(long timeoutMSecs)
|
static void |
moveAlongVector(double distance,
double theta)
Application module calls this class method to direct the robot to proceed in a vector stated by distance and orientation. |
static void |
resetRobotBase()
Application module calls this class method to reset the robot base to the initialized state. |
static void |
setVelocity(double tv,
double rv)
Application module calls this class method to direct the robot at stated translational velocity (m/s) and rotational velocity (r/s). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Robot()
| Method Detail |
|---|
public static void setVelocity(double tv,
double rv)
public static void moveAlongVector(double distance,
double theta)
Application module calls this class method to direct the robot to proceed in a vector stated by distance and orientation.
If distance is zero, and the robot is capable of turning
in place (TBD: and otherwise?), then the robot will just rotate CCW by
theta radians relative to current orientation in world
frame.
Otherwise, define a point P with polar coordinates
(distance, theta) relative to current robot
frame, aim the robot along the vector from its current position
towards P (first), then drive to P, then stop when the current orientation
is within 5*pi/180 radians and current position along the vector is within
robot_min_approach_dist (a configurable Carmen parameter) of
P.
The motion happens asynchronously (i.e. this method does not block, and when it returns the motion will likely not yet be complete). There is no semantic way to determine that the motion has completed, though Carmen does eventually disable its internal feedback controllers which drive the motion, according to the termination conditions above. If you need to know when the motion has completed, you can watch the odometry for the same conditions.
Explicitly calling setVelocity(double, double) while any
moveAlongVector() is ongoing tacitly cancels the latter.
distance - the distance to move in meters (see above). Negative
input is handled correctly.theta - the angle to rotate in radians. TBD is negative handled
correctly?public static void resetRobotBase()
public static void initialize(java.lang.String moduleName,
java.lang.String SBCName)
public static void dispatch()
public static int listen(long timeoutMSecs)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||