class adam_sim.features.adam.adam.Adam

The Adam class contains all the methods to control and render the ADAM robot either in simulation or in real life.

Attributes:
base~.entities.Base

the base of the robot

left_manipulator~.entities.Manipulator

the left manipulator of the robot

right_manipulator~.entities.Manipulator

the right manipulator of the robot

Methods

connect:

connects to a given host and port

load:

loads a given MuJoCo scene. This method is mandatory to call

step:

advance one step in the simulation

render:

renders the scene

close:

closes all the visualizers

check_collisions:

checks if there are any collisions in the scene

export_scene:

exports the scene to the specified directory

check_collisions(left_configurations: list[adam_sim.entities.configuration.Configuration], right_configurations: list[adam_sim.entities.configuration.Configuration]) tuple[numpy.ndarray, numpy.ndarray]

checks wether there are self collisions or environment collisions

Parameters:
left_configurationslist[~.entities.Configuration]

the configurations of the left manipulator

right_configurationslist[~.entities.Configuration]

the configurations of the right manipulator

Returns:
outtuple[np.ndarray, np.ndarray]

the first element is an array of the environment collisions and the second element is an array of the self collisions

Raises:
Exception

if the robot is not in simulation mode

close() None

closes all the visualizers and connections

connect(host: str, port: int, rate: int = 30) AdamInfo

connects to a given host and port

Parameters:
hoststr

the host to connect to

portint

the port to connect to

static export_scene(destination: str) None

exports the default ADAM scene to a given directory

Parameters:
destinationstr

the directory in which to export the scene

Notes

Remember that the destination must end with ‘/’

load(filename: str | None = None) AdamInfo

loads a given MuJoCo scene.xml

Parameters:
filenamestr, optional

the path to the scene.xml. By default it loads the integrated ADAM scene

Returns:
out~.entities.AdamInfo

the initial info of the robot

render(hide_menu: bool = True) None

renders the scene

Parameters:
hide_menubool, optional

whether to hide the menu or not. By default it is True

step() AdamInfo

advance one step in the simulation

Returns:
out~.entities.AdamInfo

the info of the robot at the current step