hbp_nrp_cleserver.server.PlaybackServer module

Playback ROS wrapper overriding the SimulationServer implementation for playback

class PlaybackServer(sim_id, timeout, timeout_type, gzserver, notificator, playback_path)[source]

Bases: hbp_nrp_cleserver.server.SimulationServer.SimulationServer

Playback ROS server overriding the ROSCLEServer implementation for playback

property playback_path

Gets the playback path

prepare_simulation(except_hook=None)[source]

The CLE will be initialized within this method and ROS services for starting, pausing, stopping and resetting are setup here.

Parameters
  • playback_path – Recorded simulation playback path accessible by gzserver.

  • except_hook – A handler method for critical exceptions

process_lifecycle_command(command)[source]

Issue a lifecycle state change as a playback plugin command

Parameters

command – One of the supported commands [start, stop, pause]

reset_simulation(request)[source]

Reset the playback

Parameters

request – the ROS service request message (cle_ros_msgs.srv.ResetSimulation).

shutdown()[source]

Shutdown the playback

property simulation_time

Gets the simulation time

class PlaybackSimulationAssembly(sim_config)[source]

Bases: hbp_nrp_cleserver.server.GazeboSimulationAssembly.GazeboSimulationAssembly

This class is used to realize the assembly of a playback simulation

run()[source]

Runs the simulation