A class representing a space where actions are taken.
More...
|
| __init__ (self, List action_channels, Callable action_packing, LCM lcm_instance) |
| Create an action space.
|
| pack_and_publish (self, Any action) |
| Pack an action and publish it.
|
Dict[str, Any] | pack_message (self, Any action) |
| Abstract method to pack the action into a message format suitable for LCM.
|
None | shutdown (self) |
| Abstract method to shut down the space, ensuring any resources are released.
|
A class representing a space where actions are taken.
This space handles publishing of actions to a given LCM channel.
- Parameters
-
action | channels: Channel names where actions will be published. @type action_channels: List |
action_packing | A function that converts any types of action into dictionary @type action_packing: Callable |
lcm_instance | Communication variable @type lcm_instance: LCM |
◆ __init__()
spaces.ActionSpace.__init__ |
( |
| self, |
|
|
List | action_channels, |
|
|
Callable | action_packing, |
|
|
LCM | lcm_instance ) |
Create an action space.
- Parameters
-
action_channels | Channels to publish actions on. |
action_packing | Callback used to serialize actions. |
lcm_instance | LCM instance used for communication. |
◆ pack_and_publish()
spaces.ActionSpace.pack_and_publish |
( |
| self, |
|
|
Any | action ) |
Pack an action and publish it.
◆ pack_message()
Dict[str, Any] spaces.ActionSpace.pack_message |
( |
| self, |
|
|
Any | action ) |
Abstract method to pack the action into a message format suitable for LCM.
- Parameters
-
action | The action to be packed into a message. @type action: Any |
- Returns
- : The packed LCM message. @type: Dict
◆ action_packing
spaces.ActionSpace.action_packing = action_packing |
◆ action_space_publisher
spaces.ActionSpace.action_space_publisher = MultiChannelPublisher(action_channels, lcm_instance) |
◆ messages_to_publish
spaces.ActionSpace.messages_to_publish = None |
The documentation for this class was generated from the following file: