⚠️ This type is unstable and may change significantly in a way that the data won't be backwards compatible. A state change, representing a transition of an entity into a new state.
Useful for representing discrete state machines, mode transitions, or
state changes over time. Each logged archetypes.StateChange marks a new state
at the given time. A null state is ignored by the state timeline view.
The state timeline view displays these as horizontal colored lanes over time.
Fields
Required
state:Text
Can be shown in
API reference links
Example
State changes over time
# Log a `StateChange`.
import rerun as rr
rr.init("rerun_example_state_change", spawn=True)
rr.set_time("step", sequence=0)
rr.log("door", rr.StateChange(state="open"))
rr.set_time("step", sequence=1)
rr.log("door", rr.StateChange(state="closed"))
rr.set_time("step", sequence=2)
rr.log("door", rr.StateChange(state="open"))
