RosFileServerLoader

class compas_fab.backends.RosFileServerLoader(ros=None, local_cache=False, local_cache_directory=None, precision=None)[source]

Bases: object

Allows to retrieve the mesh files specified in the robot model from the ROS File Server. Optionally, it stores them on the local file system, allowing for faster re-loads as well as enabling them to be loaded by the local package loaders afterwards.

Parameters
  • ros (compas_fab.backends.RosClient) – The ROS client.

  • local_cache (bool) – True to store a local copy of the ROS files, otherwise False. Defaults to False.

  • local_cache_directory (str, optional) – Directory name to store the cached files. Only used if local_cache is True. Defaults to ~/robot_description.

  • precision (float) – Defines precision for importing/loading meshes. Defaults to compas.PRECISION.

Methods

__init__([ros, local_cache, …])

Initialize self.

can_load_mesh(url)

Determine whether this loader can load a given mesh URL.

load_mesh(url)

Loads a mesh from local storage.

load_srdf([parameter_name])

Loads an SRDF model from the specified ROS parameter.

load_urdf([parameter_name])

Loads a URDF model from the specified ROS parameter.