Package edu.tufts.hrilab.ava
Class Follower
java.lang.Object
edu.tufts.hrilab.ava.Follower
Helper class to "track" target obstacle and calculate velocities for robot following behavior.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]calculateFollowVelocity(org.apache.commons.lang3.tuple.Pair<javax.vecmath.Point3d, javax.vecmath.Quat4d> currPose, Obstacle target) Use the robot pose and target obstacle location to calculate translation and rotation velocities.getObstacleToFollow(org.apache.commons.lang3.tuple.Pair<javax.vecmath.Point3d, javax.vecmath.Quat4d> currPose, List<Obstacle> obstacles) Select the obstacle to follow.voidreset()Clear the last target.
-
Constructor Details
-
Follower
public Follower()
-
-
Method Details
-
reset
public void reset()Clear the last target. -
getObstacleToFollow
public Obstacle getObstacleToFollow(org.apache.commons.lang3.tuple.Pair<javax.vecmath.Point3d, javax.vecmath.Quat4d> currPose, List<Obstacle> obstacles) Select the obstacle to follow.- Returns:
-
calculateFollowVelocity
public float[] calculateFollowVelocity(org.apache.commons.lang3.tuple.Pair<javax.vecmath.Point3d, javax.vecmath.Quat4d> currPose, Obstacle target) Use the robot pose and target obstacle location to calculate translation and rotation velocities.- Parameters:
currPose- - current robot posetarget- - target obstacle to move towards- Returns:
- {transVelocity (m/s), rotVelocity(rad/s)}
-