🚘Actors

Actors (RoarPyActor) are basic moving units in ROAR_PY.

You can issue action commands to them through await RoarPyActor.apply_action(...) and they will perform it. The action commands should differ with different underlying hardwares. An example action command is the vehicle action command, which consists of a python dict class with several string keys and np.ndarray values

All actions are compatible with gymnasium interfaces

See RoarPyActor.get_action_spec()

Actors can also carry sensors and return observations to you. You can read those observations via RoarPyActor.get_sensors(...) then await RoarPySensor.receive_observation().

Or if you want to read data returned by all sensors attached to the actor, simply use await RoarPyActor.receive_observation().

If you don't want to read new data and just want to read old data, use RoarPyActor.get_last_observation()

All observations are compatible with gymnasium interfaces through conversion

See RoarPyActor.get_gym_observation_spec(), RoarPyActor.get_last_gym_observation()

Note that get_last_gym_observation() is only available after calling receive_observation()

Last updated