Package edu.tufts.hrilab.ava
Class AvaHTTPAPI
java.lang.Object
edu.tufts.hrilab.ava.AvaHTTPAPI
- All Implemented Interfaces:
AvaAPIInterface
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTag(String mapId, String name, double x, double y, double theta, Map<String, String> attributes) dock()Sends the robot to the dock after waiting 30s.voidend()Null method.doubleGet the current battery level as a percentage.Get dock statusGets drive statusGet list of dynamic obstaclesNull method.Get the health of the robot.getLidar()Get the lidar scan from the robotGet the map as image data (PNG).Get the metadata about the current map.getMapMetadata(String mapName) getMaps()Gets the position of the robot at time of request.Get the estimate remaining runtime of the robot in minutesGet the Z lift position and camera tilt positon of the robot.goToArbitrary(double x, double y) Send the robot to an arbitrary position on the map.goToArbitrary(double x, double y, double theta) Send the robot to an arbitrary pose on the map.booleanReturns whether the client has an active session, which in the case of the HTTP client is always true.booleanisMoving()Returns whether the robot has any velocity values in the position object.localize(double x, double y) Set the localization information for the robot.localize(double x, double y, double theta) Set the localization information for the robot with orientation.lookAt(double x, double y, double z, double duration) Look at a vector by rotation to face it.setCameraTilt(double position) Set the robot camera tilt position.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 robot Z lift position.stop()Stops the robot during any go to navigation action.boolean
-
Constructor Details
-
AvaHTTPAPI
-
-
Method Details
-
end
public void end()Null method. Ends an RMS session. Not possible in HTTP client.- Specified by:
endin interfaceAvaAPIInterface
-
getMapMetadata
Get the metadata about the current map.- Specified by:
getMapMetadatain interfaceAvaAPIInterface- Returns:
- object containing metadata about map dimensions and scale
-
getMapMetadata
- Specified by:
getMapMetadatain interfaceAvaAPIInterface
-
getMapMetadatas
- Specified by:
getMapMetadatasin interfaceAvaAPIInterface
-
setVelocity
- Specified by:
setVelocityin interfaceAvaAPIInterface
-
setVelocity
- Specified by:
setVelocityin interfaceAvaAPIInterface
-
goToArbitrary
Send the robot to an arbitrary position on the map.- Specified by:
goToArbitraryin interfaceAvaAPIInterface- Parameters:
x- position in x coordinates (meters)y- position along y coordinates (meters)- Returns:
- status of the request
-
goToArbitrary
Send the robot to an arbitrary pose on the map.- Specified by:
goToArbitraryin interfaceAvaAPIInterface- Parameters:
x- position in x coordinates (meters)y- position along y coordinates (meters)theta- the z rotation of the robot (radians)- Returns:
- status of the request
-
getPosition
Gets the position of the robot at time of request.- Specified by:
getPositionin interfaceAvaAPIInterface- Returns:
- robot position information
-
getGoToStatus
Null method. Returns the status of the robot during a go to navigation action to a named or tagged location. Not currently in use.- Specified by:
getGoToStatusin interfaceAvaAPIInterface- Returns:
- status of go to location action
-
getHealth
Get the health of the robot.- Specified by:
getHealthin interfaceAvaAPIInterface- Returns:
- Object containing robot health metadata
-
getZLiftCameraTilt
Get the Z lift position and camera tilt positon of the robot.- Specified by:
getZLiftCameraTiltin interfaceAvaAPIInterface- Returns:
- Object containing z lift and camera tilt
-
getRuntime
Get the estimate remaining runtime of the robot in minutes- Specified by:
getRuntimein interfaceAvaAPIInterface- Returns:
- Object containing runtime estimate
-
getLidar
Get the lidar scan from the robot- Specified by:
getLidarin interfaceAvaAPIInterface- Returns:
- Object containing lidar scan
-
getDynamicObstacles
Get list of dynamic obstacles- Specified by:
getDynamicObstaclesin interfaceAvaAPIInterface- Returns:
- Object containing list of dynamic obstacles
-
getDockStatus
Get dock status- Specified by:
getDockStatusin interfaceAvaAPIInterface- Returns:
- Object containing dock status information
-
stop
Stops the robot during any go to navigation action.- Specified by:
stopin interfaceAvaAPIInterface- Returns:
- response object
-
dock
Sends the robot to the dock after waiting 30s.- Specified by:
dockin interfaceAvaAPIInterface- Returns:
- response object
-
setZLift
Set the robot Z lift position.- Specified by:
setZLiftin interfaceAvaAPIInterface- Parameters:
position- Z lift height- Returns:
- response object
-
setCameraTilt
Set the robot camera tilt position.- Specified by:
setCameraTiltin interfaceAvaAPIInterface- Parameters:
position- camera tilt position- 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 whether the client has an active session, which in the case of the HTTP client is always true.- Specified by:
hasSessionin interfaceAvaAPIInterface- Returns:
- whether client has session
-
isMoving
public boolean isMoving()Returns whether the robot has any velocity values in the position object.- Specified by:
isMovingin interfaceAvaAPIInterface- Returns:
- whether the robot is in motion
-
getBatteryLevel
public double getBatteryLevel()Get the current battery level as a percentage.- Specified by:
getBatteryLevelin interfaceAvaAPIInterface- Returns:
- double 0-100 representing battery level
-
setRotation
Rotates the robot on the Z axis.- Specified by:
setRotationin interfaceAvaAPIInterface- Parameters:
theta- goal rotation- Returns:
- response object
-
localize
Set the localization information for the robot. Forces expected localization. Lets the robot figure out theta based on sensor information.- Parameters:
x- x position in global coordinatesy- y position in global coordinates- Returns:
- response object
-
localize
Set the localization information for the robot with orientation.- Parameters:
x- x position in global coordinatesy- y position in global coordinatestheta- orientation in radians- Returns:
- response object
-
getMap
Get the map as image data (PNG). Only available on local HTTP API.- Returns:
- map data as image
-
getMaps
-
getAllTags
-
createTag
-
updateTag
-
getDriveStatus
Gets drive status- Specified by:
getDriveStatusin interfaceAvaAPIInterface- Returns:
- Object containing various drive statuses
-