opspace/include/opspace/Task.hpp

Go to the documentation of this file.
00001 /*
00002  * Shared copyright notice and LGPLv3 license statement.
00003  *
00004  * Copyright (C) 2011 The Board of Trustees of The Leland Stanford Junior University. All rights reserved.
00005  * Copyright (C) 2011 University of Texas at Austin. All rights reserved.
00006  *
00007  * Authors: Roland Philippsen (Stanford) and Luis Sentis (UT Austin)
00008  *          http://cs.stanford.edu/group/manips/
00009  *          http://www.me.utexas.edu/~hcrl/
00010  *
00011  * This program is free software: you can redistribute it and/or
00012  * modify it under the terms of the GNU Lesser General Public License
00013  * as published by the Free Software Foundation, either version 3 of
00014  * the License, or (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful, but
00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this program.  If not, see
00023  * <http://www.gnu.org/licenses/>
00024  */
00025 
00026 #ifndef OPSPACE_TASK_HPP
00027 #define OPSPACE_TASK_HPP
00028 
00029 #include <opspace/Parameter.hpp>
00030 #include <jspace/Model.hpp>
00031 
00032 namespace opspace {
00033   
00034   
00035   using jspace::Model;
00036   
00037   
00088   class Task
00089     : public ParameterReflection
00090   {
00091   protected:
00092     explicit Task(std::string const & name);
00093     
00094   public:
00103     virtual Status init(Model const & model) = 0;
00104     
00117     virtual Status update(Model const & model) = 0;
00118     
00124     Vector const & getActual() const   { return actual_; }
00125     
00132     Vector const & getCommand() const  { return command_; }
00133     
00147     Matrix const & getJacobian() const { return jacobian_; }
00148 
00153     double getSigmaThreshold() const { return sigma_threshold_; }
00154     
00155     virtual void dump(std::ostream & os,
00156           std::string const & title,
00157           std::string const & prefix) const;
00158     
00159     virtual void dbg(std::ostream & os,
00160          std::string const & title,
00161          std::string const & prefix) const;
00162     
00163   protected:
00164     Vector actual_;
00165     Vector command_;
00166     Matrix jacobian_;
00167     
00171     double sigma_threshold_;
00172   };
00173   
00174 }
00175 
00176 #endif // OPSPACE_TASK_HPP

Generated on Fri Aug 26 01:31:17 2011 for Stanford Whole-Body Control Framework by  doxygen 1.5.4