Package edu.tufts.hrilab.ava
Class AvaWebsocketAPI
java.lang.Object
edu.tufts.hrilab.ava.AvaWebsocketAPI
- All Implemented Interfaces:
AvaAPIInterface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondock()Send the robot to the dock after waiting 30 seconds.voidend()Terminates a session.doubleGet the current battery level as a percentage.Get status of robot docking from the robot.Get status of robot driving from the robot.Get list of dynamic obstacles from the robotGet the status of the robot while going to a tagged/named location within RMS.Get the health of the robot.getLidar()Get a lidar scan from the robot.Gets a list of all rooms and waypoints available for navigation.Get the scale and resolution data about the current map.getMapMetadata(String mapName) Get the current position of the robot on the map (in pixels).Get the estimated runtime of the robot.Get the health of the robot.goToArbitrary(double x, double y) Send the robot to a given position on the map.goToArbitrary(double x, double y, double theta) Send the robot to a given pose on the map.goToLocation(String room) Send the robot to a room waypoint on the map.goToLocation(String room, int waypointId) Send the robot to a waypoint within a room on the map.booleanReturns session status.booleanisMoving()Determine if robot is moving.lookAt(double x, double y, double z, double duration) Look at a vector by rotation to face it.setCameraTilt(double position) Set the Z lift position of the robot.setRotation(double theta) Rotates the robot on the Z axis.setVelocity(float translation, float rotation, float sidestep) setVelocity(float translation, float rotation, float sidestep, boolean nudge) setZLift(double position) Set the Z lift position of the robot.stop()Stop any go to navigation action for named or arbitrary locations.
-
Field Details
-
client
-
resolved
public static boolean resolved -
message
-
-
Constructor Details
-
AvaWebsocketAPI
-
-
Method Details
-
end
public void end()Terminates a session. After 30 seconds the robot will return to home base.- Specified by:
endin interfaceAvaAPIInterface
-
setVelocity
- Specified by:
setVelocityin interfaceAvaAPIInterface
-
setVelocity
- Specified by:
setVelocityin interfaceAvaAPIInterface
-
goToArbitrary
Send the robot to a given position on the map.- Specified by:
goToArbitraryin interfaceAvaAPIInterface- Parameters:
x- The x coordinates on the map (in pixels)y- The y coordinates on the map (in pixels)
-
goToArbitrary
Send the robot to a given pose on the map.- Specified by:
goToArbitraryin interfaceAvaAPIInterface- Parameters:
x- The x coordinates on the map (in pixels)y- The y coordinates on the map (in pixels)theta- The desired orientation of the robot on the map
-
goToLocation
Send the robot to a room waypoint on the map.- Parameters:
room- Name of room in map to navigate to
-
goToLocation
Send the robot to a waypoint within a room on the map.- Parameters:
room- Name of room waypoint is inwaypointId- Unique id of the waypoint
-
dock
Send the robot to the dock after waiting 30 seconds.- Specified by:
dockin interfaceAvaAPIInterface- Returns:
- object from RMS containing success or error
-
stop
Stop any go to navigation action for named or arbitrary locations.- Specified by:
stopin interfaceAvaAPIInterface- Returns:
- object from RMS with error or status
-
getGoToStatus
Get the status of the robot while going to a tagged/named location within RMS.- Specified by:
getGoToStatusin interfaceAvaAPIInterface- Returns:
- status object from RMS
-
getPosition
Get the current position of the robot on the map (in pixels).- Specified by:
getPositionin interfaceAvaAPIInterface- Returns:
- Object containing position and orientation data
-
getMapLocations
Gets a list of all rooms and waypoints available for navigation.- Returns:
- Object containing all rooms and waypoints in map TODO: Add room representation to RMSMapInfoResponse, currently just waypoints
-
getMapMetadata
Get the scale and resolution data about the current map.- Specified by:
getMapMetadatain interfaceAvaAPIInterface- Returns:
- Object containing the map metadata
-
getMapMetadata
- Specified by:
getMapMetadatain interfaceAvaAPIInterface
-
getMapMetadatas
- Specified by:
getMapMetadatasin interfaceAvaAPIInterface
-
getHealth
Get the health of the robot.- Specified by:
getHealthin interfaceAvaAPIInterface- Returns:
- Object containing robot health metadata
-
getZLiftCameraTilt
Get the health of the robot.- Specified by:
getZLiftCameraTiltin interfaceAvaAPIInterface- Returns:
- Object containing robot health metadata
-
getRuntime
Get the estimated runtime of the robot.- Specified by:
getRuntimein interfaceAvaAPIInterface- Returns:
- Object containing robot runtume metadata
-
getLidar
Get a lidar scan from the robot.- Specified by:
getLidarin interfaceAvaAPIInterface- Returns:
- Object containing robot lidar
-
getDynamicObstacles
Get list of dynamic obstacles from the robot- Specified by:
getDynamicObstaclesin interfaceAvaAPIInterface- Returns:
- Object containing dyanmic obstacles list
-
getDockStatus
Get status of robot docking from the robot.- Specified by:
getDockStatusin interfaceAvaAPIInterface- Returns:
- Object containing dock status
-
setZLift
Set the Z lift position of the robot.- Specified by:
setZLiftin interfaceAvaAPIInterface- Parameters:
position- Z lift position- Returns:
- object from RMS with error or status
-
setCameraTilt
Set the Z lift position of the robot.- Specified by:
setCameraTiltin interfaceAvaAPIInterface- Parameters:
position- Z lift position- Returns:
- object from RMS with error or status
-
setRotation
Rotates the robot on the Z axis.- Specified by:
setRotationin interfaceAvaAPIInterface- Parameters:
theta- goal rotation- Returns:
- response object
-
lookAt
Look at a vector by rotation to face it.- Specified by:
lookAtin interfaceAvaAPIInterface- Parameters:
x- double of x positiony- double of y positionz- double of z positionduration- double of seconds to hold look- Returns:
- response object
-
hasSession
public boolean hasSession()Returns session status.- Specified by:
hasSessionin interfaceAvaAPIInterface- Returns:
- whether robot has active session with client
-
isMoving
public boolean isMoving()Determine if robot is moving.- Specified by:
isMovingin interfaceAvaAPIInterface- Returns:
- whether robot is moving
-
getBatteryLevel
public double getBatteryLevel()Get the current battery level as a percentage.- Specified by:
getBatteryLevelin interfaceAvaAPIInterface- Returns:
- double 0-100 representing battery level
-
getDriveStatus
Get status of robot driving from the robot.- Specified by:
getDriveStatusin interfaceAvaAPIInterface- Returns:
- Object containing dock status
-