Composabl Simulation API
You can integrate your simulator with the Composabl SDK by using the ServerComposabl class. This class provides the necessary methods for the simulator to interact with the Composabl SDK.
The methods of the ServerComposabl class allow the Composabl SDK to automatically take care of serializing and deserializing the different requests and responses.
To conform your simulator to the Composabl SDK, you must define a server implementation class that defines methods of how to talk with the Composabl SDK.
Composabl’s simulation API extends the the gymnasium.Env standards.
Set Up the Simulation Environment Instance
Make
Make is a request to create a new instance of the environment with the specifications requested.
string env_Id;
Identifier for the type of environment to create.dictionary env_Init;
Initial configuration for the environment, as defined within the runtime configuration (link to section about how to define runtime configuration parameters)
Sensor_space_info
Sensor_space_info
Sensor_space_info
provides details about the environment’s sensor space.
Action_space_info
Action_space_info
Action_space_info
defines the agent's action space.
Action_space_sample
Action_space_sample
The action_space_sample
function returns an element of the simulator’s action space.
Run the Simulation Environment Instance
Reset
Reset
Reset
is a request to reset the environment, and returns the first observation of the newly reset environment.
observation
Initial observation of the environment.Dictionary info
Additional information about the reset environment.
Step
Step
Step
provides the agent action to be applied to the environment. The return structure is as follows:
observation
; The observation following the action.float reward
The reward received after taking the action.bool terminated
Whether the episode has ended.bool truncated
Whether the episode was truncated before a natural conclusion.Dictionary info
Additional information about the step.
Close
Close
Close
denotes the simulator is done being used and may perform any necessary cleanups required.
Set_Scenario
Set_Scenario
Set_scenario
tells the simulator the current scenario the agent wishes to train on. Learn more about scenarios.
Get_Scenario
Get_Scenario
Get_scenario
returns the scenario that the simulation is currently running.
Create Visualizations
Get_Render
Get_render provides the current rendered image of the environment, either as a numpy array or a string.
Last updated