PlanningScene.add_attached_collision_mesh

PlanningScene.add_attached_collision_mesh(attached_collision_mesh, scale=False)[source]

Add an attached collision object to the planning scene.

Parameters:
attached_collision_meshAttachedCollisionMesh

The AttachedCollisionMesh (a CollisionMesh attached to a Robot’s Link) that we want to add to the PlanningScene.

scalebool, optional

If True, the mesh will be copied and scaled according to the robot’s scale factor.

Returns:
None

Examples

>>> scene = PlanningScene(robot)
>>> mesh = Mesh.from_stl(compas_fab.get("planning_scene/cone.stl"))
>>> cm = CollisionMesh(mesh, "tip")
>>> ee_link_name = "ee_link"
>>> touch_links = ["wrist_3_link", "ee_link"]
>>> acm = AttachedCollisionMesh(cm, ee_link_name, touch_links)
>>> scene.add_attached_collision_mesh(acm)