VrepClient
-
class
compas_fab.backends.
VrepClient
(host='127.0.0.1', port=19997, scale=1.0, lua_script='RFL', debug=False)[source] Bases:
compas_fab.backends.interfaces.client.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 thewith
statement to ensure resource deallocation.- Parameters
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
__init__
([host, port, scale, lua_script, debug])Initialize self.
add_attached_collision_mesh
(*args, **kwargs)Forwards call to appropriate method in the planner.
add_collision_mesh
(*args, **kwargs)Forwards call to appropriate method in the planner.
append_collision_mesh
(*args, **kwargs)Forwards call to appropriate method in the planner.
find_raw_robot_states
(group, goal_vrep_pose, …)forward_kinematics
(*args, **kwargs)Forwards call to appropriate method in the planner.
Gets a list of object handles (identifiers) for all visible shapes of the 3D model.
get_object_handle
(object_name)Gets the object handle (identifier) for a given object name.
get_object_matrices
(object_handles)Gets a dictionary of matrices keyed by object handle.
get_planning_scene
(*args, **kwargs)Forwards call to appropriate method in the planner.
get_robot_config
(robot)Gets the current configuration of the specified robot.
inverse_kinematics
(*args, **kwargs)Forwards call to appropriate method in the planner.
plan_cartesian_motion
(*args, **kwargs)Forwards call to appropriate method in the planner.
plan_motion
(*args, **kwargs)Forwards call to appropriate method in the planner.
remove_attached_collision_mesh
(*args, **kwargs)Forwards call to appropriate method in the planner.
remove_collision_mesh
(*args, **kwargs)Forwards call to appropriate method in the planner.
reset_planning_scene
(*args, **kwargs)Forwards call to appropriate method in the planner.
run_child_script
(function_name, in_ints, …)set_robot_config
(robot, config)Moves the robot to the specified configuration.
set_robot_metric
(group, metric_values)Assigns a metric defining relations between axis values of a robot.
set_robot_pose
(robot, frame)Moves the robot to a given pose, specified as a frame.
Attributes
is_connected
Indicates whether the client has an active connection.