00001 /* 00002 * UOS-ROS packages - Robot Operating System code by the University of Osnabrück 00003 * Copyright (C) 2011 University of Osnabrück 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 * 00019 * Katana300.h 00020 * 00021 * Created on: Dec 13, 2011 00022 * Authors: 00023 * Hannes Raudies <h.raudies@hs-mannheim.de> 00024 * Martin Günther <mguenthe@uos.de> 00025 */ 00026 00027 #ifndef KATANA300_H_ 00028 #define KATANA300_H_ 00029 00030 #include <ros/ros.h> 00031 #include <boost/thread/recursive_mutex.hpp> 00032 #include <boost/thread.hpp> 00033 00034 #include <kniBase.h> 00035 00036 #include <katana/SpecifiedTrajectory.h> 00037 #include <katana/AbstractKatana.h> 00038 #include <katana/KNIConverter.h> 00039 #include <katana/Katana.h> 00040 00041 namespace katana 00042 { 00043 00044 class Katana300 : public Katana 00045 { 00046 public: 00047 Katana300(); 00048 virtual ~Katana300(); 00049 00050 virtual void setLimits(); 00051 00052 virtual bool executeTrajectory(boost::shared_ptr<SpecifiedTrajectory> traj, 00053 boost::function<bool()> isPreemptRequested); 00054 00055 virtual void freezeRobot(); 00056 virtual bool moveJoint(int jointIndex, double turningAngle); 00057 00058 virtual void refreshMotorStatus(); 00059 virtual bool allJointsReady(); 00060 virtual bool allMotorsReady(); 00061 00062 virtual void testSpeed(); 00063 00064 static const double JOINTS_STOPPED_POS_TOLERANCE = 0.01; 00065 static const double JOINTS_STOPPED_VEL_TOLERANCE = 0.01; 00066 00067 private: 00068 std::vector<double> desired_angles_; 00069 00070 }; 00071 00072 } 00073 00074 #endif /* KATANA300_H_ */