Simulate wheel encoder sensor readings for differential drive vehicle
The wheelEncoderDifferentialDrive
System object™ computes wheel encoder tick readings based on the pose input of a differential
drive vehicle.
To obtain the encoder tick readings:
Create the wheelEncoderDifferentialDrive
object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
creates a encoder
= wheelEncoderDifferentialDrivewheelEncoderDifferentialDrive
System object, encoder
.
sets properties for the encoder using one or more name-value pairs. For example,
encoder
= wheelEncoderDifferentialDrive(Name,Value
)wheelEncoderDifferentialDrive('SampleRate',120)
sets the sample rate
of the encoder to 120 Hz. Unspecified properties have default values. Enclose each
property name in quotes.
return the wheel tick readings, ticks
= encoder(velocity
,angularVelocity
,orientation
)ticks
, form velocity, angular
velocity, and orientation information.
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)