pyrobosim.sensors.types.Sensor

class pyrobosim.sensors.types.Sensor

Generic sensor class that helps with type hinting.

When implementing a new sensor, you should subclass from this class.

Methods

__init__()

get_measurement()

Returns the latest measurement from the sensor.

setup_artists()

Sets up and returns the artists for visualizing the sensor.

start_thread()

Starts the thread defined by your sensor's implementation of thread_function().

stop_thread()

Stops the actively running sensor thread.

thread_function()

Defines the sensor update function to run in a background thread.

to_dict()

Serializes the sensor to a dictionary.

update()

Performs the sensor calculation.

update_artists()

Updates the artists.

Attributes

registered_plugins

List of registered sensor plugins.

plugin_name

The name of the plugin.