Class CollisionSensor

java.lang.Object
me.autobot.lib.robot.Device
me.autobot.lib.robot.Sensor
me.autobot.lib.robot.sensors.CollisionSensor
All Implemented Interfaces:
Logger

public class CollisionSensor extends Sensor
Checks if the robot is in collision (used IN SIMULATION ONLY).
  • Constructor Details

    • CollisionSensor

      public CollisionSensor(int identifier)
      Creates a new collision sensor (for simulation) with the given identifier and address.
      Parameters:
      identifier - The identifier of the sensor. Could be any number, should be unique to all other sensors on the robot. \ *
  • Method Details

    • getValues

      public double[] getValues()
      Returns the value of the collision sensor.
      Overrides:
      getValues in class Sensor
      Returns:
      The processed sensor values.