Package edu.tufts.hrilab.interfaces
Interface VelocityInterface
- All Known Subinterfaces:
MockNaoInterface
,NaoInterface
,PR2BaseInterface
- All Known Implementing Classes:
MockNaoComponent
,NaoComponent
,NaoWizardComponent
,PR2BaseComponent
public interface VelocityInterface
Minimal interface for setting and getting velocities.
-
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Get the default velocities used by VelocityComponent functions.double
getRV()
Get rotational velocity.double
getTV()
Get translational velocity.double[]
getVels()
Get translational and rotational velocity.boolean
setRV
(double rv) Set rotational velocity.boolean
setTV
(double tv) Set translational velocity.boolean
setVels
(double tv, double rv) Set both velocities.void
stop()
Stop.
-
Method Details
-
getTV
double getTV()Get translational velocity.- Returns:
- the most recent TV reading (m/sec).
-
getRV
double getRV()Get rotational velocity.- Returns:
- the most recent RV reading (rad/sec).
-
getVels
double[] getVels()Get translational and rotational velocity.- Returns:
- the most recent velocity readings (m/sec and rad/sec).
-
getDefaultVels
double[] getDefaultVels()Get the default velocities used by VelocityComponent functions.- Returns:
- the default velocities (m/sec and rad/sec).
-
stop
void stop()Stop. -
setTV
boolean setTV(double tv) Set translational velocity.- Parameters:
tv
- the new TV (m/sec)- Returns:
- true if there's nothing in front of the robot, false otherwise.
-
setRV
boolean setRV(double rv) Set rotational velocity.- Parameters:
rv
- the new RV (rad/sec)- Returns:
- true if there's nothing on that side, false otherwise.
-
setVels
boolean setVels(double tv, double rv) Set both velocities.- Parameters:
tv
- the new TV (m/sec)rv
- the new RV (rad/sec)- Returns:
- true if there's nothing in front of the robot, false otherwise.
-