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