hbp_nrp_cle.robotsim.RosControlAdapter module

Implementation of the robot control adapter using ros and gazebo

class RosControlAdapter[source]

Bases: hbp_nrp_cle.robotsim.RobotInterface.IRobotControlAdapter

Represents a robot simulation adapter actually using ROS

initialize()[source]

Initializes the world simulation control adapter

property is_alive

Queries the current status of the world simulation

Returns

True, if the world simulation is alive, otherwise False

property is_paused

Queries the current status of the physics simulation

Returns

True, if the physics simulation is paused, otherwise False

reset()[source]

Resets the physics simulation

reset_world(models, lights)[source]

Resets the world (robot excluded) to the state described by models and lights

Parameters
  • models – A dictionary containing pairs (model_name: {‘model_sdf’: sdf, ‘model_state_sdf’: sdf}).

  • lights – A dictionary containing pairs (light_name: light sdf).

run_step(dt)[source]

Runs the world simulation for the given CLE time step in seconds

Parameters

dt – The CLE time step in seconds

run_step_async(dt)[source]

Runs the world simulation for the given CLE time step in seconds

Parameters

dt – The CLE time step in seconds

set_robots(robots)[source]

Sets the list of robots

set_time_step(time_step)[source]

Sets the physics simulation time step in seconds

Parameters

time_step – The physics simulation time step in seconds

Returns

True, if the physics simulation time step is updated, otherwise False

shutdown()[source]

Shuts down the world simulation

property time_step

Gets the physics simulation time step in seconds

Parameters

dt – The physics simulation time step in seconds

Returns

The physics simulation time step in seconds