hbp_nrp_cleserver.server.GazeboInterface module

Interface for gzserver and gzbridge spawning classes.

class IGazeboBridgeInstance[source]

Bases: object

Takes care of starting a gzserver instance somewhere.

restart()[source]

Restarts the gzbridge instance represented by the object.

start()[source]

Starts the gzbridge instance represented by the object.

stop()[source]

Stops the gzbridge instance represented by the object.

class IGazeboServerInstance[source]

Bases: object

Takes care of starting a gzserver process somewhere, connect it to the given roscore. Each implementation has to take care of providing the methods start, stop and restart as well as a property containing the gzserver master URI.

property gazebo_died_callback

Gets the callback when gazebo dies

property gazebo_master_uri

Returns a string containing the gazebo master URI (like:’http://bbpviz001.cscs.ch:11345’)

restart(ros_master_uri)[source]

Restarts the gzserver instance.

Parameters

ros_master_uri – The ros master uri where to connect gzserver.

start(ros_master_uri, models_path=None, gzserver_args=None)[source]

Starts a gzserver instance connected to the local roscore (provided by ros_master_uri)

Parameters
  • ros_master_uri – The ros master uri where to connect gzserver.

  • models_path – An additional path where Gazebo may find models

  • gzserver_args – Additional formatted string of command line arguments to pass to gzserver (e.g. –seed 123456 -e simbody)

stop()[source]

Stops the gzserver instance.

try_extend(new_timeout)[source]

” Verifies that the gazebo can accept the new simulation timeout