A class representing an observation space that listens for observations over LCM and processes them.
More...
A class representing an observation space that listens for observations over LCM and processes them.
- Parameters
-
observation | channels: Channel names where observations will be listened @type observation_channels: List |
observation_unpacking | A function that converts observation dictionary into any types @type observation_unpacking: Callable |
lcm_instance | Communication variable @type lcm_instance: LCM |
◆ __init__()
spaces.ObservationSpace.__init__ |
( |
| self, |
|
|
List | observation_channels, |
|
|
Callable | observation_unpacking, |
|
|
LCM | lcm_instance ) |
Create an observation space.
- Parameters
-
observation_channels | Channels to listen for observations. |
observation_unpacking | Callback used to deserialize messages. |
lcm_instance | LCM instance used for communication. |
◆ check_readiness()
spaces.ObservationSpace.check_readiness |
( |
| self | ) |
|
Check whether fresh observations are available.
◆ empty_data()
spaces.ObservationSpace.empty_data |
( |
| self | ) |
|
Clear cached observation data.
◆ get_observation()
Any spaces.ObservationSpace.get_observation |
( |
| self | ) |
|
Return the latest processed observation.
◆ unpack_message()
Any spaces.ObservationSpace.unpack_message |
( |
| self, |
|
|
Dict | observation_dict ) |
Unpack a raw observation dictionary.
- Parameters
-
observation_dict | Dictionary mapping channel names to raw LCM messages. |
- Returns
- The processed observation. @rtype Any
◆ wait_until_observation_space_is_ready()
spaces.ObservationSpace.wait_until_observation_space_is_ready |
( |
| self | ) |
|
Block until a complete observation has been received.
◆ data
spaces.ObservationSpace.data = self.observation_space_listener.get() |
◆ is_ready
spaces.ObservationSpace.is_ready = False |
◆ observation_space_listener
spaces.ObservationSpace.observation_space_listener = MultiChannelListener(observation_channels, lcm_instance) |
◆ observation_unpacking
spaces.ObservationSpace.observation_unpacking = observation_unpacking |
The documentation for this class was generated from the following file: