Interface VelocityInterface

All Known Subinterfaces:
MockNaoInterface, NaoInterface, PR2BaseInterface, SpotInterface
All Known Implementing Classes:
MockNaoComponent, MockSpotComponent, NaoComponent, NaoWizardComponent

public interface VelocityInterface
Minimal interface for setting and getting velocities.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Get the default velocities used by VelocityComponent functions.
    double
    Get rotational velocity.
    double
    Get translational velocity.
    double[]
    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.
    boolean
    setVels(double vel_x, double vel_y, double vel_rot)
    Set x, y, and rot velocities.
    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

      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.
    • setVels

      boolean setVels(double vel_x, double vel_y, double vel_rot)
      Set x, y, and rot velocities.
      Parameters:
      vel_x - the new forward/backward velocity (m/sec)
      vel_y - the new side-to-side velocity (m/sec)
      vel_rot - the new rotational (rad/sec)
      Returns: