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