Public Member Functions | Private Attributes | List of all members
moveit_python.planning_scene_interface.PlanningSceneInterface Class Reference

A class for managing the state of the planning scene. More...

Inheritance diagram for moveit_python.planning_scene_interface.PlanningSceneInterface:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, frame, ns='', init_from_service=True)
 
def addBox (self, name, size_x, size_y, size_z, x, y, z, use_service=True, frame_id=None)
 Insert new box into planning scene. More...
 
def addCone (self, name, height, radius, x, y, z, use_service=True, frame_id=None)
 Insert new cone into planning scene. More...
 
def addCube (self, name, size, x, y, z, use_service=True, frame_id=None)
 Insert new cube to planning scene. More...
 
def addCylinder (self, name, height, radius, x, y, z, use_service=True, frame_id=None)
 Insert new cylinder into planning scene. More...
 
def addMesh (self, name, pose, filename, use_service=True)
 Insert a mesh into the planning scene. More...
 
def addSolidPrimitive (self, name, solid, pose, use_service=True, frame_id=None)
 Insert a solid primitive into planning scene. More...
 
def addSphere (self, name, radius, x, y, z, use_service=True, frame_id=None)
 Insert new sphere into planning scene. More...
 
def attachBox (self, name, size_x, size_y, size_z, x, y, z, link_name, touch_links=None, detach_posture=None, weight=0.0, use_service=True)
 Attach a box into the planning scene. More...
 
def attachMesh (self, name, pose, filename, link_name, touch_links=None, detach_posture=None, weight=0.0, use_service=True)
 Attach a mesh into the planning scene. More...
 
def clear (self)
 Clear the planning scene of all objects. More...
 
def getKnownAttachedObjects (self)
 Get a list of names of attached objects. More...
 
def getKnownCollisionObjects (self)
 Get a list of names of collision objects. More...
 
def makeAttached (self, link_name, obj, touch_links, detach_posture, weight)
 Make an attachedCollisionObject. More...
 
def makeMesh (self, name, pose, filename)
 Make a mesh collision object. More...
 
def makeSolidPrimitive (self, name, solid, pose, frame_id=None)
 Make a solid primitive collision object. More...
 
def removeAttachedObject (self, name, use_service=True)
 Send message to remove object. More...
 
def removeCollisionObject (self, name, use_service=True)
 Send message to remove object. More...
 
def sceneCb (self, msg, initial=False)
 Update the object lists from a PlanningScene message. More...
 
def sendColors (self)
 Actually send the colors to MoveIt! More...
 
def sendUpdate (self, collision_object, attached_collision_object, use_service=True)
 Send new update to planning scene. More...
 
def setColor (self, name, r, g, b, a=0.9)
 Set the color of an object. More...
 
def waitForSync (self, max_time=2.0)
 Wait for sync. More...
 

Private Attributes

 _apply_service
 
 _attached
 
 _attached_objects
 
 _attached_removed
 
 _collision
 
 _colors
 
 _fixed_frame
 
 _mutex
 
 _objects
 
 _removed
 
 _scene_pub
 
 _service
 

Detailed Description

A class for managing the state of the planning scene.

Parameters
frameThe fixed frame in which planning is being done (needs to be part of robot?)
nsA namespace to push all topics down into.
init_from_serviceWhether to initialize our list of objects by calling the service NOTE: this requires that said service be in the move_group launch file, which is not the default from the setup assistant.

Definition at line 61 of file planning_scene_interface.py.

Constructor & Destructor Documentation

◆ __init__()

def moveit_python.planning_scene_interface.PlanningSceneInterface.__init__ (   self,
  frame,
  ns = '',
  init_from_service = True 
)

Definition at line 62 of file planning_scene_interface.py.

Member Function Documentation

◆ addBox()

def moveit_python.planning_scene_interface.PlanningSceneInterface.addBox (   self,
  name,
  size_x,
  size_y,
  size_z,
  x,
  y,
  z,
  use_service = True,
  frame_id = None 
)

Insert new box into planning scene.

Parameters
nameName of the object
size_xThe x-dimensions size of the box
size_yThe y-dimensions size of the box
size_zThe z-dimensions size of the box
xThe x position in fixed frame
yThe y position in fixed frame
zThe z position in fixed frame
use_serviceIf true, update will be sent via apply service
frame_idOptional frame for the pose, otherwise fixed_frame is used

Definition at line 324 of file planning_scene_interface.py.

◆ addCone()

def moveit_python.planning_scene_interface.PlanningSceneInterface.addCone (   self,
  name,
  height,
  radius,
  x,
  y,
  z,
  use_service = True,
  frame_id = None 
)

Insert new cone into planning scene.

Parameters
heightThe height of the cone
radiusThe radius of the cone
xThe x position in fixed frame
yThe y position in fixed frame
zThe z position in fixed frame
use_serviceIf true, update will be sent via apply service
frame_idOptional frame for the pose, otherwise fixed_frame is used

Definition at line 300 of file planning_scene_interface.py.

◆ addCube()

def moveit_python.planning_scene_interface.PlanningSceneInterface.addCube (   self,
  name,
  size,
  x,
  y,
  z,
  use_service = True,
  frame_id = None 
)

Insert new cube to planning scene.

Parameters
use_serviceIf true, update will be sent via apply service
frame_idOptional frame for the pose, otherwise fixed_frame is used

Definition at line 370 of file planning_scene_interface.py.

◆ addCylinder()

def moveit_python.planning_scene_interface.PlanningSceneInterface.addCylinder (   self,
  name,
  height,
  radius,
  x,
  y,
  z,
  use_service = True,
  frame_id = None 
)

Insert new cylinder into planning scene.

Parameters
heightThe height of the cylinder
radiusThe radius of the cylinder
xThe x position in fixed frame
yThe y position in fixed frame
zThe z position in fixed frame
use_serviceIf true, update will be sent via apply service
frame_idOptional frame for the pose, otherwise fixed_frame is used

Definition at line 257 of file planning_scene_interface.py.

◆ addMesh()

def moveit_python.planning_scene_interface.PlanningSceneInterface.addMesh (   self,
  name,
  pose,
  filename,
  use_service = True 
)

Insert a mesh into the planning scene.

Parameters
nameName of the object
poseA geometry_msgs/Pose for the object
filenameThe mesh file to load
use_serviceIf true, update will be sent via apply service

Definition at line 219 of file planning_scene_interface.py.

◆ addSolidPrimitive()

def moveit_python.planning_scene_interface.PlanningSceneInterface.addSolidPrimitive (   self,
  name,
  solid,
  pose,
  use_service = True,
  frame_id = None 
)

Insert a solid primitive into planning scene.

Parameters
nameThe name of the object
solidAn instance of shape_msgs/SolidPrimitive to add
poseA geometry_msgs/Pose for the object
use_serviceIf true, update will be sent via apply service
frame_idOptional frame for the pose, otherwise fixed_frame is used

Definition at line 244 of file planning_scene_interface.py.

◆ addSphere()

def moveit_python.planning_scene_interface.PlanningSceneInterface.addSphere (   self,
  name,
  radius,
  x,
  y,
  z,
  use_service = True,
  frame_id = None 
)

Insert new sphere into planning scene.

Parameters
radiusThe radius of the sphere
xThe x position in fixed frame
yThe y position in fixed frame
zThe z position in fixed frame
use_serviceIf true, update will be sent via apply service
frame_idOptional frame for the pose, otherwise fixed_frame is used

Definition at line 278 of file planning_scene_interface.py.

◆ attachBox()

def moveit_python.planning_scene_interface.PlanningSceneInterface.attachBox (   self,
  name,
  size_x,
  size_y,
  size_z,
  x,
  y,
  z,
  link_name,
  touch_links = None,
  detach_posture = None,
  weight = 0.0,
  use_service = True 
)

Attach a box into the planning scene.

Parameters
nameName of the object
size_xThe x-dimensions size of the box
size_yThe y-dimensions size of the box
size_zThe z-dimensions size of the box
xThe x position in link_name frame
yThe y position in link_name frame
zThe z position in link_name frame
link_nameName of link to attach this object to
touch_linksNames of robot links that can touch this object
use_serviceIf true, update will be sent via apply service

Definition at line 349 of file planning_scene_interface.py.

◆ attachMesh()

def moveit_python.planning_scene_interface.PlanningSceneInterface.attachMesh (   self,
  name,
  pose,
  filename,
  link_name,
  touch_links = None,
  detach_posture = None,
  weight = 0.0,
  use_service = True 
)

Attach a mesh into the planning scene.

Parameters
nameName of the object
poseA geometry_msgs/Pose for the object
filenameThe mesh file to load
use_serviceIf true, update will be sent via apply service

Definition at line 229 of file planning_scene_interface.py.

◆ clear()

def moveit_python.planning_scene_interface.PlanningSceneInterface.clear (   self)

Clear the planning scene of all objects.

Definition at line 132 of file planning_scene_interface.py.

◆ getKnownAttachedObjects()

def moveit_python.planning_scene_interface.PlanningSceneInterface.getKnownAttachedObjects (   self)

Get a list of names of attached objects.

Definition at line 445 of file planning_scene_interface.py.

◆ getKnownCollisionObjects()

def moveit_python.planning_scene_interface.PlanningSceneInterface.getKnownCollisionObjects (   self)

Get a list of names of collision objects.

Definition at line 438 of file planning_scene_interface.py.

◆ makeAttached()

def moveit_python.planning_scene_interface.PlanningSceneInterface.makeAttached (   self,
  link_name,
  obj,
  touch_links,
  detach_posture,
  weight 
)

Make an attachedCollisionObject.

Definition at line 202 of file planning_scene_interface.py.

◆ makeMesh()

def moveit_python.planning_scene_interface.PlanningSceneInterface.makeMesh (   self,
  name,
  pose,
  filename 
)

Make a mesh collision object.

Parameters
nameName of the object
poseA geometry_msgs/Pose for the object
filenameThe mesh file to load

Definition at line 143 of file planning_scene_interface.py.

◆ makeSolidPrimitive()

def moveit_python.planning_scene_interface.PlanningSceneInterface.makeSolidPrimitive (   self,
  name,
  solid,
  pose,
  frame_id = None 
)

Make a solid primitive collision object.

Parameters
nameName of the object
solidThe solid primitive to add
poseA geometry_msgs/Pose for the object
frame_idOptional frame for the pose, otherwise fixed_frame is used

Definition at line 188 of file planning_scene_interface.py.

◆ removeAttachedObject()

def moveit_python.planning_scene_interface.PlanningSceneInterface.removeAttachedObject (   self,
  name,
  use_service = True 
)

Send message to remove object.

Parameters
use_serviceIf true, update will be sent via apply service
Remove an attached object. 

Definition at line 393 of file planning_scene_interface.py.

◆ removeCollisionObject()

def moveit_python.planning_scene_interface.PlanningSceneInterface.removeCollisionObject (   self,
  name,
  use_service = True 
)

Send message to remove object.

Parameters
use_serviceIf true, update will be sent via apply service
Remove an object. 

Definition at line 375 of file planning_scene_interface.py.

◆ sceneCb()

def moveit_python.planning_scene_interface.PlanningSceneInterface.sceneCb (   self,
  msg,
  initial = False 
)

Update the object lists from a PlanningScene message.

Recieve updates from move_group. 

Definition at line 408 of file planning_scene_interface.py.

◆ sendColors()

def moveit_python.planning_scene_interface.PlanningSceneInterface.sendColors (   self)

Actually send the colors to MoveIt!

Definition at line 500 of file planning_scene_interface.py.

◆ sendUpdate()

def moveit_python.planning_scene_interface.PlanningSceneInterface.sendUpdate (   self,
  collision_object,
  attached_collision_object,
  use_service = True 
)

Send new update to planning scene.

Parameters
collision_objectA collision object to add to scene, or None
attached_collision_objectAttached collision object to add to scene, or None
use_serviceIf true, update will be sent via apply service, otherwise by topic

Definition at line 114 of file planning_scene_interface.py.

◆ setColor()

def moveit_python.planning_scene_interface.PlanningSceneInterface.setColor (   self,
  name,
  r,
  g,
  b,
  a = 0.9 
)

Set the color of an object.

Definition at line 489 of file planning_scene_interface.py.

◆ waitForSync()

def moveit_python.planning_scene_interface.PlanningSceneInterface.waitForSync (   self,
  max_time = 2.0 
)

Wait for sync.

Definition at line 452 of file planning_scene_interface.py.

Member Data Documentation

◆ _apply_service

moveit_python.planning_scene_interface.PlanningSceneInterface._apply_service
private

Definition at line 75 of file planning_scene_interface.py.

◆ _attached

moveit_python.planning_scene_interface.PlanningSceneInterface._attached
private

Definition at line 79 of file planning_scene_interface.py.

◆ _attached_objects

moveit_python.planning_scene_interface.PlanningSceneInterface._attached_objects
private

Definition at line 83 of file planning_scene_interface.py.

◆ _attached_removed

moveit_python.planning_scene_interface.PlanningSceneInterface._attached_removed
private

Definition at line 85 of file planning_scene_interface.py.

◆ _collision

moveit_python.planning_scene_interface.PlanningSceneInterface._collision
private

Definition at line 80 of file planning_scene_interface.py.

◆ _colors

moveit_python.planning_scene_interface.PlanningSceneInterface._colors
private

Definition at line 86 of file planning_scene_interface.py.

◆ _fixed_frame

moveit_python.planning_scene_interface.PlanningSceneInterface._fixed_frame
private

Definition at line 70 of file planning_scene_interface.py.

◆ _mutex

moveit_python.planning_scene_interface.PlanningSceneInterface._mutex
private

Definition at line 77 of file planning_scene_interface.py.

◆ _objects

moveit_python.planning_scene_interface.PlanningSceneInterface._objects
private

Definition at line 82 of file planning_scene_interface.py.

◆ _removed

moveit_python.planning_scene_interface.PlanningSceneInterface._removed
private

Definition at line 84 of file planning_scene_interface.py.

◆ _scene_pub

moveit_python.planning_scene_interface.PlanningSceneInterface._scene_pub
private

Definition at line 72 of file planning_scene_interface.py.

◆ _service

moveit_python.planning_scene_interface.PlanningSceneInterface._service
private

Definition at line 92 of file planning_scene_interface.py.


The documentation for this class was generated from the following file:


moveit_python
Author(s): Michael Ferguson
autogenerated on Sun Jan 8 2023 03:16:41