VrepClient

class compas_fab.backends.VrepClient(host='127.0.0.1', port=19997, scale=1.0, lua_script='RFL', debug=False)[source]

Bases: ClientInterface

Interface to run simulations using VREP as the engine for kinematics and path planning.

VrepClient is a context manager type, so it’s best used in combination with the with statement to ensure resource deallocation.

Args:

host (str): IP address or DNS name of the V-REP simulator. port (int): Port of the V-REP simulator. scale (int): Scaling of the model. Defaults to meters (1). lua_script (str): Name of the LUA script on the V-REP scene. debug (bool): True to enable debug messages, False otherwise.

Examples:

>>> from compas_fab.backends import VrepClient
>>> with VrepClient() as client:
...     print ('Connected: %s' % client.is_connected)
Connected: True
Note:

For more examples, check out the V-REP examples page.

Methods

find_raw_robot_states

get_all_visible_handles

Gets a list of object handles (identifiers) for all visible shapes of the 3D model.

get_object_handle

Gets the object handle (identifier) for a given object name.

get_object_matrices

Gets a dictionary of matrices keyed by object handle.

get_robot_config

Gets the current configuration of the specified robot.

run_child_script

set_robot_config

Moves the robot to the specified configuration.

set_robot_metric

Assigns a metric defining relations between axis values of a robot.

set_robot_pose

Moves the robot to a given pose, specified as a frame.

Inherited Methods

add_attached_collision_mesh

Forwards call to appropriate method in the planner.

add_collision_mesh

Forwards call to appropriate method in the planner.

append_collision_mesh

Forwards call to appropriate method in the planner.

forward_kinematics

Forwards call to appropriate method in the planner.

get_planning_scene

Forwards call to appropriate method in the planner.

inverse_kinematics

Forwards call to appropriate method in the planner.

plan_cartesian_motion

Forwards call to appropriate method in the planner.

plan_motion

Forwards call to appropriate method in the planner.

remove_attached_collision_mesh

Forwards call to appropriate method in the planner.

remove_collision_mesh

Forwards call to appropriate method in the planner.

reset_planning_scene

Forwards call to appropriate method in the planner.