Go to the documentation of this file.00001 #ifndef GAZEBO_GAZEBOGRASPGRIPPER_H
00002 #define GAZEBO_GAZEBOGRASPGRIPPER_H
00003
00004 #include <boost/bind.hpp>
00005 #include <gazebo/gazebo.hh>
00006 #include <gazebo/physics/physics.hh>
00007 #include <gazebo/common/common.hh>
00008 #include <gazebo/transport/TransportTypes.hh>
00009 #include <stdio.h>
00010
00011 namespace gazebo
00012 {
00013
00020 class GazeboGraspGripper
00021 {
00022 public:
00023 GazeboGraspGripper();
00024 GazeboGraspGripper(const GazeboGraspGripper &o);
00025 virtual ~GazeboGraspGripper();
00026
00032 bool Init(physics::ModelPtr &_model,
00033 const std::string &_gripperName,
00034 const std::string &palmLinkName,
00035 const std::vector<std::string> &fingerLinkNames,
00036 bool _disableCollisionsOnAttach,
00037 std::map<std::string, physics::CollisionPtr> &_collisions);
00038
00039 const std::string &getGripperName() const;
00040
00044 bool hasLink(const std::string &linkName) const;
00045
00049 bool hasCollisionLink(const std::string &linkName) const;
00050
00051 bool isObjectAttached() const;
00052
00053 const std::string &attachedObject() const;
00054
00058 bool HandleAttach(const std::string &objName);
00059 void HandleDetach(const std::string &objName);
00060
00061 private:
00062
00063 physics::ModelPtr model;
00064
00065
00066 std::string gripperName;
00067
00068
00069 std::vector<std::string> linkNames;
00070
00071
00072 std::map<std::string, physics::CollisionPtr> collisionElems;
00073
00074 physics::JointPtr fixedJoint;
00075
00076 physics::LinkPtr palmLink;
00077
00078
00079
00080 bool disableCollisionsOnAttach;
00081
00082
00083 bool attached;
00084
00085 std::string attachedObjName;
00086 };
00087
00088 }
00089 #endif // GAZEBO_GAZEBOGRASPGRIPPER_H