Package me.autobot.lib.robot.sensors
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
Checks if the robot is in collision (used IN SIMULATION ONLY).
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCollisionSensor
(int identifier) Creates a new collision sensor (for simulation) with the given identifier and address. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Returns the value of the collision sensor.Methods inherited from class me.autobot.lib.robot.Sensor
attachRelativePosition, attachRelativePosition, changeUpdateInterval, connectToI2C, connectToSerial, getAddress, getBus, getIdentifier, getParentIdentification, getRelativePosition, getRelativeRotation, getSensor, getSensorValues, setBusAndAddress, setSensorValue, setSensorValues, simulateValues, subscribe, unsubscribe
Methods inherited from class me.autobot.lib.robot.Device
emergencyStop, emergencyStopAll, enableSimulation, getCurrent, getParent, getProperties, getProperty, getVoltage, inSimulation, registerDevice, setParent, setProperty
-
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