SMACC
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
cl_move_group_interface::GraspingComponent Class Reference

#include <cp_grasping_objects.h>

Inheritance diagram for cl_move_group_interface::GraspingComponent:
Inheritance graph
Collaboration diagram for cl_move_group_interface::GraspingComponent:
Collaboration graph

Public Member Functions

bool getGraspingObject (std::string name, moveit_msgs::CollisionObject &object)
 
void createGraspableBox (std::string frameid, float x, float y, float z, float xl, float yl, float zl)
 
- Public Member Functions inherited from smacc::ISmaccComponent
 ISmaccComponent ()
 
virtual ~ISmaccComponent ()
 
virtual std::string getName () const
 

Public Attributes

std::vector< std::string > fingerTipNames
 
boost::optional< std::string > currentAttachedObjectName
 

Private Attributes

std::map< std::string, moveit_msgs::CollisionObject > graspingObjects
 

Additional Inherited Members

- Protected Member Functions inherited from smacc::ISmaccComponent
virtual void initialize (ISmaccClient *owner)
 
void setStateMachine (ISmaccStateMachine *stateMachine)
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
template<typename TComponent >
void requiresComponent (TComponent *&requiredComponentStorage)
 
template<typename TClient >
void requiresClient (TClient *&requiredClientStorage)
 
virtual void onInitialize ()
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingComponent (TArgs... targs)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingNamedComponent (std::string name, TArgs... targs)
 
- Protected Attributes inherited from smacc::ISmaccComponent
ISmaccStateMachinestateMachine_
 
ISmaccClientowner_
 

Detailed Description

Definition at line 10 of file cp_grasping_objects.h.

Member Function Documentation

◆ createGraspableBox()

void cl_move_group_interface::GraspingComponent::createGraspableBox ( std::string  frameid,
float  x,
float  y,
float  z,
float  xl,
float  yl,
float  zl 
)

Definition at line 18 of file cp_grasping_objects.cpp.

19 {
20 moveit_msgs::CollisionObject collision;
21 auto boxname = frameid;
22 ;
23 collision.id = boxname;
24 collision.header.frame_id = frameid;
25
26 collision.primitives.resize(1);
27 collision.primitives[0].type = collision.primitives[0].BOX;
28 collision.primitives[0].dimensions.resize(3);
29
30 collision.primitives[0].dimensions[0] = xl;
31 collision.primitives[0].dimensions[1] = yl;
32 collision.primitives[0].dimensions[2] = zl;
33
34 collision.primitive_poses.resize(1);
35 collision.primitive_poses[0].position.x = x;
36 collision.primitive_poses[0].position.y = y;
37 collision.primitive_poses[0].position.z = z;
38 collision.primitive_poses[0].orientation.w = 1.0;
39
40 graspingObjects[boxname] = collision;
41 }
std::map< std::string, moveit_msgs::CollisionObject > graspingObjects

References graspingObjects.

◆ getGraspingObject()

bool cl_move_group_interface::GraspingComponent::getGraspingObject ( std::string  name,
moveit_msgs::CollisionObject &  object 
)

Definition at line 5 of file cp_grasping_objects.cpp.

6 {
7 if (this->graspingObjects.count(name))
8 {
9 object = this->graspingObjects[name];
10 return true;
11 }
12 else
13 {
14 return false;
15 }
16 }

References graspingObjects.

Referenced by cl_move_group_interface::CbAttachObject::onEntry().

Here is the caller graph for this function:

Member Data Documentation

◆ currentAttachedObjectName

boost::optional<std::string> cl_move_group_interface::GraspingComponent::currentAttachedObjectName

◆ fingerTipNames

std::vector<std::string> cl_move_group_interface::GraspingComponent::fingerTipNames

◆ graspingObjects

std::map<std::string, moveit_msgs::CollisionObject> cl_move_group_interface::GraspingComponent::graspingObjects
private

Definition at line 13 of file cp_grasping_objects.h.

Referenced by createGraspableBox(), and getGraspingObject().


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