00001 00002 // 00003 // Title : LimitsData.h 00004 // Project : OSCAR 00005 // Created : March 6, 2005. 12:13 AM 00006 // Author : Chetan Kapoor 00007 // Platforms : All 00008 // Copyright : Copyright© The University of Texas at Austin, 2002. All rights reserved. 00009 // 00010 // This software and documentation constitute an unpublished work 00011 // and contain valuable trade secrets and proprietary information 00012 // belonging to the University. None of the foregoing material may be 00013 // copied or duplicated or disclosed without the express, written 00014 // permission of University. THE UNIVERSITY EXPRESSLY DISCLAIMS ANY 00015 // AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION, 00016 // INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 00017 // PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY 00018 // THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE. 00019 // NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF 00020 // THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall the 00021 // University be liable for incidental, special, indirect, direct or 00022 // consequential damages or loss of profits, interruption of business, 00023 // or related expenses which may arise from use of software or documentation, 00024 // including but not limited to those resulting from defects in software 00025 // and/or documentation, or loss or inaccuracy of data of any kind. 00026 // 00027 // Purpose : Class for loading DH Parameters and related data for a manipulator 00028 // specified in XML format 00029 // 00030 //---------------------------------------------------------------------------- 00031 // $Log: LimitsData.h,v $ 00032 // Revision 1.5 2006/03/30 19:15:57 chetan 00033 // GetAngleUnits added 00034 // 00035 // Revision 1.4 2005/06/29 04:30:34 chetan 00036 // Quite a few changes to improve Output of XML and addition of custom root element names, addition of manipulator obstacle model, etc. 00037 // 00038 // Revision 1.3 2005/03/15 19:15:28 chetan 00039 // Fixed Documentation 00040 // 00041 // Revision 1.2 2005/03/14 21:52:30 pmarch 00042 // Added to namespace OSCAR and removed "RR" from front of class names. 00043 // 00044 // Revision 1.1 2005/03/10 22:43:18 chetan 00045 // Initial Committ - Still need to test 00046 // 00047 // 00048 // 00050 #ifndef LimitsData_h 00051 #define LimitsData_h 00052 00053 #include "FileData/DHData.h" 00054 #include "FileData/XMLData.h" 00055 #include <vector> 00056 00057 00058 namespace OSCAR { 00059 class Limit; 00060 class Limits; 00061 00071 class LimitsData : public XMLData 00072 { 00073 public: 00074 enum LimitsType {Position, Velocity, Acceleration, Current, Torque}; 00075 00184 LimitsData(const String& inputFileName, OSCARError &err = DUMMY_ERROR(noError), const String& rootElementName = String("Limits"), const String name = String(" ")); 00185 00198 LimitsData(const char* xmlDataString, OSCARError &err = DUMMY_ERROR(noError), const String& rootElementName = String("Limits"), const String name = String(" ")); 00199 00200 00217 LimitsData(const DOMElement* limitsElement, OSCARError &err = DUMMY_ERROR(noError), const String& rootElementName = String("Limits"), const String name = String(" ")); 00218 00226 LimitsData(const LimitsData& rhs); 00227 00233 virtual ~LimitsData(); 00234 00242 LimitsData& operator=(const LimitsData& rhs); 00243 00251 const Limits* GetLimits(LimitsType limitsType) const; 00252 00261 bool SetLimits(const Limits& limits, LimitsType limitsType); 00262 00263 AngleUnits GetAngleUnits() const; 00264 void SetAngleUnits(AngleUnits angUnits); 00265 00266 00278 bool Output(std::ostream& out, bool nameSpaceHeader = false) const; 00279 00280 protected: 00281 AngleUnits angleUnits; 00282 Limits *pos, *vel, *acc, *curr, *torque; 00283 00291 virtual bool parseParameters(const DOMElement* rootNode); 00292 bool LimitsData::parseLimits(DOMElement* limitsTypeNode, std::vector<Limit>& limitsData); 00293 }; 00294 00295 } 00296 #endif // LimitsData_h
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |