mani_skill.agents.multi_agent#
Attributes#
Classes#
Base class for agents/robots, forming an interface of an articulated robot (SAPIEN's physx.PhysxArticulation). |
Module Contents#
- class mani_skill.agents.multi_agent.MultiAgent(agents)[source]#
Bases:
mani_skill.agents.base_agent.BaseAgent,Generic[T]Base class for agents/robots, forming an interface of an articulated robot (SAPIEN’s physx.PhysxArticulation). Users implementing their own agents/robots should inherit from this class. A tutorial on how to build your own agent can be found in its tutorial
- Parameters:
scene (ManiSkillScene) – simulation scene instance.
control_freq (int) – control frequency (Hz).
control_mode (str | None) – uid of controller to use
fix_root_link (bool) – whether to fix the robot root link
agent_idx (str | None) – an index for this agent in a multi-agent task setup If None, the task should be single-agent
initial_pose (sapien.Pose | Pose | None) – the initial pose of the robot. Important to set for GPU simulation to ensure robot
called (does not collide with other objects in the scene during GPU initialization which occurs before env._initialize_episode is) –
agents (list[mani_skill.agents.base_agent.BaseAgent]) –
- before_simulation_step()[source]#
Code that runs before each simulation step. By default it calls the controller’s before_simulation_step method.
- get_proprioception()[source]#
Get the proprioceptive state of the agent, default is the qpos and qvel of the robot and any controller state.
- set_action(action)[source]#
Set the agent’s action which is to be executed in the next environment timestep
- set_control_mode(control_mode=None)[source]#
Set the controller, drive properties, and reset for each agent. If given control mode is None, will set defaults
- Parameters:
control_mode (list[str]) –
- property _sensor_configs: list[mani_skill.sensors.base_sensor.BaseSensorConfig][source]#
Returns a list of sensor configs for this agent. It contains the sensor configs of the individual agents.
- Return type:
- agents_dict: dict[str, mani_skill.agents.base_agent.BaseAgent][source]#