Class MockGyro
java.lang.Object
xbot.common.controls.sensors.XGyro
xbot.common.controls.sensors.mock_adapters.MockGyro
- All Implemented Interfaces:
AutoCloseable
,DataFrameRefreshable
,ISimulatableSensor
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class xbot.common.controls.sensors.XGyro
XGyro.ImuType, XGyro.InterfaceType, XGyro.XGyroFactory
-
Field Summary
Fields inherited from class xbot.common.controls.sensors.XGyro
deviceName, imuType, io
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
double
double
double
double
double
double
void
ingestSimulationData
(org.json.JSONObject payload) boolean
isBroken()
boolean
void
setDeviceRawAccelX
(double accel) void
setDeviceRawAccelY
(double accel) void
setDeviceRawAccelZ
(double accel) void
setDeviceVelocityX
(double velocity) void
setDeviceVelocityY
(double velocity) void
setDeviceVelocityZ
(double velocity) void
setIsBroken
(boolean broken) void
void
void
void
setYawAngularVelocity
(AngularVelocity yawAngularVelocity) protected void
updateInputs
(XGyroIoInputs inputs) Methods inherited from class xbot.common.controls.sensors.XGyro
getAcceleration, getAccelerationX, getAccelerationY, getAccelerationZ, getHeading, getImuType, getPitch, getRoll, getYawAngularVelocity, refreshDataFrame
-
Constructor Details
-
MockGyro
-
-
Method Details
-
isConnected
public boolean isConnected()- Overrides:
isConnected
in classXGyro
-
setYaw
-
getDeviceYaw
-
setIsBroken
public void setIsBroken(boolean broken) -
updateInputs
- Specified by:
updateInputs
in classXGyro
-
isBroken
public boolean isBroken() -
setRoll
-
getDeviceRoll
-
setPitch
-
getDevicePitch
-
setYawAngularVelocity
-
getDeviceYawAngularVelocity
-
getDeviceVelocityX
public double getDeviceVelocityX() -
setDeviceVelocityX
public void setDeviceVelocityX(double velocity) -
getDeviceVelocityY
public double getDeviceVelocityY() -
setDeviceVelocityY
public void setDeviceVelocityY(double velocity) -
getDeviceVelocityZ
public double getDeviceVelocityZ() -
setDeviceVelocityZ
public void setDeviceVelocityZ(double velocity) -
getDeviceRawAccelX
public double getDeviceRawAccelX() -
setDeviceRawAccelX
public void setDeviceRawAccelX(double accel) -
getDeviceRawAccelY
public double getDeviceRawAccelY() -
setDeviceRawAccelY
public void setDeviceRawAccelY(double accel) -
getDeviceRawAccelZ
public double getDeviceRawAccelZ() -
setDeviceRawAccelZ
public void setDeviceRawAccelZ(double accel) -
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
ingestSimulationData
public void ingestSimulationData(org.json.JSONObject payload) - Specified by:
ingestSimulationData
in interfaceISimulatableSensor
-