AbstractKatana.h
Go to the documentation of this file.
00001 /*
00002  * UOS-ROS packages - Robot Operating System code by the University of Osnabrück
00003  * Copyright (C) 2010  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  * AbstractKatana.h
00020  *
00021  *  Created on: 20.12.2010
00022  *      Author: Martin Günther <mguenthe@uos.de>
00023  */
00024 
00025 #ifndef ABSTRACTKATANA_H_
00026 #define ABSTRACTKATANA_H_
00027 
00028 #include <ros/ros.h>
00029 #include <urdf_interface/joint.h>
00030 #include <urdf/model.h>
00031 
00032 #include <katana/SpecifiedTrajectory.h>
00033 #include <katana/katana_constants.h>
00034 
00035 #include <arm_navigation_msgs/JointLimits.h>
00036 
00037 namespace katana
00038 {
00039 
00040 class AbstractKatana
00041 {
00042 public:
00043   AbstractKatana();
00044   virtual ~AbstractKatana();
00045 
00046   virtual void refreshEncoders() = 0;
00047   virtual bool executeTrajectory(boost::shared_ptr<SpecifiedTrajectory> traj) = 0;
00048   virtual void freezeRobot();
00049 
00058   virtual bool moveJoint(int jointIndex, double turningAngle) = 0;
00059 
00060   virtual int getJointIndex(std::string joint_name);
00061 
00062   virtual std::vector<std::string> getJointNames();
00063   virtual std::vector<int> getJointTypes();
00064 
00065   virtual std::vector<std::string> getGripperJointNames();
00066   virtual std::vector<int> getGripperJointTypes();
00067 
00068   virtual std::vector<double> getMotorAngles();
00069   virtual std::vector<double> getMotorVelocities();
00070 
00071   virtual std::vector<arm_navigation_msgs::JointLimits> getMotorLimits();
00072   virtual double getMotorLimitMax(std::string joint_name);
00073   virtual double getMotorLimitMin(std::string joint_name);
00074 
00075   virtual void refreshMotorStatus();
00076   virtual bool someMotorCrashed() = 0;
00077   virtual bool allJointsReady() = 0;
00078   virtual bool allMotorsReady() = 0;
00079 
00080 
00081 protected:
00082   // only the 5 "real" joints:
00083   std::vector<std::string> joint_names_;
00084   std::vector<int> joint_types_;
00085 
00086   // the two "finger" joints of the gripper:
00087   std::vector<std::string> gripper_joint_names_;
00088   std::vector<int> gripper_joint_types_;
00089 
00090   // all motors (the 5 "real" joints plus the gripper)
00091 
00092   std::vector<double> motor_angles_;
00093   std::vector<double> motor_velocities_;
00094 
00095   // the motor limits of the 6 motors
00096 
00097   std::vector<arm_navigation_msgs::JointLimits> motor_limits_;
00098 };
00099 
00100 }
00101 
00102 #endif /* ABSTRACTKATANA_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


katana
Author(s): Martin Günther
autogenerated on Tue May 28 2013 14:54:05