00001 00002 // 00003 // Title : Perturbation.h 00004 // Project : OSCAR Version 2.0 00005 // Created : On a cloudy tuesday in March 00006 // Author : Ross C. Taylor and Peter S. March 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 perturbing vectors. 00028 // 00029 //---------------------------------------------------------------------------- 00030 // 00031 // $Revisions$ 00032 // 00033 // 00035 00036 #ifndef EEPerturbation_h 00037 #define EEPerturbation_h 00038 00039 #include "Base/Base.h" 00040 #include "Math/HandPose.h" 00041 #include "Math/VectorArray.h" 00042 #include "Math/Vector3.h" 00043 #include <vector> 00044 00045 00047 namespace OSCAR { 00048 00059 class EEPerturbation : public virtual Base 00060 { 00061 public: 00062 00063 /* \brief Default constructor 00064 */ 00065 EEPerturbation(double radius); 00066 00067 /* \brief Destructor 00068 \sa EEPerturbation(double radius) 00069 */ 00070 virtual ~EEPerturbation(); 00071 00072 /* \brief Set the position about which the perturbations will be generated 00073 \param inputHand the HandPose position about which the XYZ values will be perturbed 00074 \return true 00075 */ 00076 void SetInput(const HandPose& inputHand); 00077 00078 /* \brief Returns the number of options that are generated 00079 */ 00080 unsigned int GetNoOfOptions() const; 00081 00082 /* \brief Copies the options into the argument 00083 \param outputs An VectorArray with NoOfOptions vectors, each of length 6 00084 */ 00085 bool GetOptions(VectorArray& outputs); 00086 00087 /* \brief Set the perturbation radius for the EE location 00088 \param newRadius The radius to perturb the EE location 00089 */ 00090 void SetRadius(double newRadius); 00091 00092 /* \brief Returns the radius of perturbation for the EE location 00093 */ 00094 double GetRadius() const; 00095 00096 protected: 00097 void fillOne(Vector3& toFill, double theta, double phi); 00098 00099 std::vector<Vector3> trigArray; 00100 HandPose currentHand; 00101 double perturbRadius; 00102 unsigned int noOfOptions; 00103 }; 00104 00105 } 00106 00107 #endif // !defined(EEPerturbation_h)
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |