GazeboGraspGripper.h
Go to the documentation of this file.
1 //
2 // Created by tom on 19/09/16.
3 //
4 
5 #ifndef ROBOTICAN_COMMON_GAZEBOGRASPGRIPPER_H_H
6 #define ROBOTICAN_COMMON_GAZEBOGRASPGRIPPER_H_H
7 
8 #include <boost/bind.hpp>
9 #include <gazebo/gazebo.hh>
10 #include <gazebo/physics/physics.hh>
11 #include <gazebo/common/common.hh>
12 #include <gazebo/transport/TransportTypes.hh>
13 #include <stdio.h>
14 
15 namespace gazebo {
16 
24  public:
27  virtual ~GazeboGraspGripper();
28 
34  bool Init(physics::ModelPtr& _model,
35  const std::string& _gripperName,
36  const std::string& palmLinkName,
37  const std::vector<std::string>& fingerLinkNames,
38  bool _disableCollisionsOnAttach,
39  std::map<std::string, physics::CollisionPtr>& _collisions);
40 
41  const std::string& getGripperName() const;
42 
46  bool hasLink(const std::string& linkName) const;
47 
51  bool hasCollisionLink(const std::string& linkName) const;
52 
53  bool isObjectAttached() const;
54 
55  const std::string& attachedObject() const;
56 
60  bool HandleAttach(const std::string& objName);
61  void HandleDetach(const std::string& objName);
62 
63  private:
64 
65  physics::ModelPtr model;
66 
67  // name of the gripper
68  std::string gripperName;
69 
70  // names of the gripper links
71  std::vector<std::string> linkNames;
72  // names and Collision objects of the collision links in Gazebo (scoped names)
73  // Not necessarily equal names and size to linkNames.
74  std::map<std::string, physics::CollisionPtr> collisionElems;
75 
76  physics::JointPtr fixedJoint;
77 
78  physics::LinkPtr palmLink;
79 
80  // when an object is attached, collisions with it may be disabled, in case the
81  // robot still keeps wobbling.
83 
84  // flag holding whether an object is attached. Object name in \e attachedObjName
85  bool attached;
86  // name of the object currently attached.
87  std::string attachedObjName;
88  };
89 
90 }
91 
92 #endif //ROBOTICAN_COMMON_GAZEBOGRASPGRIPPER_H_H
const std::string & getGripperName() const
void HandleDetach(const std::string &objName)
std::map< std::string, physics::CollisionPtr > collisionElems
std::vector< std::string > linkNames
bool hasLink(const std::string &linkName) const
const std::string & attachedObject() const
Helper class for GazeboGraspFix which holds information for one arm. Attaches /detaches objects to th...
bool HandleAttach(const std::string &objName)
bool Init(physics::ModelPtr &_model, const std::string &_gripperName, const std::string &palmLinkName, const std::vector< std::string > &fingerLinkNames, bool _disableCollisionsOnAttach, std::map< std::string, physics::CollisionPtr > &_collisions)
bool hasCollisionLink(const std::string &linkName) const


robotican_common
Author(s):
autogenerated on Wed Jan 3 2018 03:48:33