Package edu.tufts.hrilab.movebase
Class MoveBaseComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.movebase.MoveBaseComponent
- All Implemented Interfaces:
MoveBaseInterface
Provides simplified access to the ROS move base node.
This interface is convenient when you want to be able to send
navigation goals without tracking their progress.
-
Field Summary
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.commons.cli.Option>
Command line options available in sub-class.approachLocation
(Symbol desiredLocation) go to the location and then move forward until certain distance from object in frontapproachLocation
(Symbol desiredLocation, Symbol initialLocation) go to the location and then move forward until certain distance from object in frontChecks to see if the robot is within atOffset distance from goal poseprotected Justification
followPath
(List<PathAction> path) protected edu.tufts.hrilab.diarcros.msg.geometry_msgs.Pose
getLocationPose
(Symbol refID) protected edu.tufts.hrilab.diarcros.msg.geometry_msgs.Pose
getPose()
double[]
javax.vecmath.Point3d
Used to updated Firebase GUIgoToLocation
(double xdest, double ydest, double quat_x, double quat_y, double quat_z, double quat_w, boolean wait) go to the point and orientationprotected Justification
goToLocation
(edu.tufts.hrilab.diarcros.msg.geometry_msgs.Pose pose, boolean wait) Go to a pose in the world.goToLocation
(Symbol location) go to the location and then move forward until certain distance from object in frontgoToLocation
(Symbol location, boolean wait) Go to a known location in the world.goToLocation
(Symbol desiredLocation, Symbol initialLocation) go to the location and then move forward until certain distance from object in frontprotected void
init()
Perform any component initialization.isMoving()
protected void
parseArgs
(org.apache.commons.cli.CommandLine cmdLine) Called directly after construction to pass runtime values that will override default values.void
setPoseGlobal
(double x, double y, double theta) stop()
Methods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown, shutdownComponent
-
Constructor Details
-
MoveBaseComponent
public MoveBaseComponent()
-
-
Method Details
-
init
protected void init()Description copied from class:DiarcComponent
Perform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.- Overrides:
init
in classDiarcComponent
-
additionalUsageInfo
Description copied from class:DiarcComponent
Command line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfo
in classDiarcComponent
- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponent
Called directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.zs- Overrides:
parseArgs
in classDiarcComponent
-
getPose
protected edu.tufts.hrilab.diarcros.msg.geometry_msgs.Pose getPose() -
getPosition
public javax.vecmath.Point3d getPosition()Used to updated Firebase GUI- Returns:
-
setPoseGlobal
public void setPoseGlobal(double x, double y, double theta) - Specified by:
setPoseGlobal
in interfaceMoveBaseInterface
-
getPoseGlobalQuat
public double[] getPoseGlobalQuat()- Specified by:
getPoseGlobalQuat
in interfaceMoveBaseInterface
-
goToLocation
protected Justification goToLocation(edu.tufts.hrilab.diarcros.msg.geometry_msgs.Pose pose, boolean wait) Go to a pose in the world.- Parameters:
pose
- a goal pose
-
goToLocation
Go to a known location in the world.- Specified by:
goToLocation
in interfaceMoveBaseInterface
- Parameters:
location
- a known location.wait
- should wait until movement is complete
-
goToLocation
Description copied from interface:MoveBaseInterface
go to the location and then move forward until certain distance from object in front- Specified by:
goToLocation
in interfaceMoveBaseInterface
- Parameters:
location
- name of the desired location to navigate to- Returns:
- justification specifying if the robot navigated to the location
-
goToLocation
Description copied from interface:MoveBaseInterface
go to the location and then move forward until certain distance from object in front- Specified by:
goToLocation
in interfaceMoveBaseInterface
- Parameters:
desiredLocation
- name of the desired location to navigate toinitialLocation
- name of the initial location to navigate from -- used for conditions and effects- Returns:
- justification specifying if the robot navigated to the location
-
goToLocation
public Justification goToLocation(double xdest, double ydest, double quat_x, double quat_y, double quat_z, double quat_w, boolean wait) Description copied from interface:MoveBaseInterface
go to the point and orientation- Specified by:
goToLocation
in interfaceMoveBaseInterface
- Parameters:
xdest
- x pointydest
- y pointquat_x
- x quaternion valuequat_y
- y quaternion valuequat_z
- z quaternion valuequat_w
- w quaternion valuewait
- should robot wait until reached desired point and orientation- Returns:
- justification if the robot reach the desired point and orientation
-
approachLocation
Description copied from interface:MoveBaseInterface
go to the location and then move forward until certain distance from object in front- Specified by:
approachLocation
in interfaceMoveBaseInterface
- Parameters:
desiredLocation
- name of the desired location to navigate to- Returns:
- justification specifying if the robot navigated to the location
-
approachLocation
Description copied from interface:MoveBaseInterface
go to the location and then move forward until certain distance from object in front- Specified by:
approachLocation
in interfaceMoveBaseInterface
- Parameters:
desiredLocation
- name of the desired location to navigate toinitialLocation
- name of the initial location to navigate from -- used for conditions and effects- Returns:
- justification specifying if the robot navigated to the location
-
stop
- Specified by:
stop
in interfaceMoveBaseInterface
-
isMoving
- Specified by:
isMoving
in interfaceMoveBaseInterface
-
checkAt
Checks to see if the robot is within atOffset distance from goal pose- Specified by:
checkAt
in interfaceMoveBaseInterface
- Parameters:
locationTerm
- the predicate to observe at(?actor, ?location)- Returns:
- list of argument bindings empty list is failure to observe list with empty hashmap means actor is within atOffset of goal pose
-
getLocationPose
-
followPath
-