Simulate wheel encoder sensor readings for Ackermann vehicle
The wheelEncoderAckermann
System object™ computes wheel encoder tick readings based on the pose input of an Ackermann
vehicle.
To obtain the encoder tick readings:
Create the wheelEncoderAckermann
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
= wheelEncoderAckermannwheelEncoderAckermann
System object, encoder
.
sets properties for the encoder using one or more name-value pairs. For example,
encoder
= wheelEncoderAckermann(Name,Value
)wheelAckermann('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)