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