PyBulletClient
-
class
compas_fab.backends.PyBulletClient(connection_type='gui', verbose=False)[source] Bases:
compas_fab.backends.pybullet.client.PyBulletBase,compas_fab.backends.interfaces.client.ClientInterfaceInterface to use pybullet as backend.
compasfab.backends.PyBulletClientis a context manager type, so it’s best used in combination with thewithstatement to ensure resource deallocation.Thanks to Yijiang Huang and his work in pybullet_planning for much inspiration.
- Parameters
Examples
>>> from compas_fab.backends import PyBulletClient >>> with PyBulletClient(connection_type='direct') as client: ... print('Connected: %s' % client.is_connected) Connected: TrueMethods
__init__([connection_type, verbose])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.
body_from_obj(path[, scale, concavity, …])Create a PyBullet body from an OBJ file.
Checks whether any of the collision objects are colliding.
check_collision_with_objects(robot)Checks whether the robot and its attached collision objects with its current configuration is is colliding with any collision objects.
check_collisions(robot[, configuration])Checks whether the current or given configuration is in collision.
check_robot_self_collision(robot)Checks whether the robot and its attached collision objects with its current configuration is colliding with itself.
connect([shadows, color, width, height])Connect from the PyBullet server.
convert_mesh_to_body(mesh, frame[, _name, …])Convert compas mesh and its frame to a pybullet body
Disconnect from the PyBullet server.
filter_configurations_in_collision(robot, …)Filters from a list of configurations those which are in collision.
forward_kinematics(*args, **kwargs)Forwards call to appropriate method in the planner.
get_planning_scene(*args, **kwargs)Forwards call to appropriate method in the planner.
inverse_kinematics(*args, **kwargs)Forwards call to appropriate method in the planner.
load_robot(urdf_file)Create a pybullet robot using the input urdf file.
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.
set_robot_configuration(robot, configuration)Sets the robot’s pose to the given configuration.
By default, the physics server will not step the simulation, unless you explicitly send a
step_simulationcommand.Attributes
is_connectedIndicates whether the client has an active connection.