00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef SIMULATION_NAXES_VELOCITY_CONTROLLER_HPP
00019 #define SIMULATION_NAXES_VELOCITY_CONTROLLER_HPP
00020
00021 #include <rtt/RTT.hpp>
00022
00023 #include <rtt/TaskContext.hpp>
00024 #include <rtt/Ports.hpp>
00025 #include <rtt/Event.hpp>
00026 #include <rtt/Method.hpp>
00027 #include <rtt/Properties.hpp>
00028
00029 #include "dev/SimulationAxis.hpp"
00030 #include <rtt/dev/AxisInterface.hpp>
00031
00032 #include <ocl/OCL.hpp>
00033
00034 namespace OCL
00035 {
00042 class nAxesVelocityController: public RTT::TaskContext
00043 {
00044 public:
00045 nAxesVelocityController(std::string name);
00046 virtual ~nAxesVelocityController(){};
00047
00048 private:
00049 virtual bool startAllAxes();
00050 virtual bool stopAllAxes();
00051 virtual bool lockAllAxes();
00052 virtual bool unlockAllAxes();
00053
00054 virtual bool configureHook();
00055 virtual bool startHook();
00056 virtual void updateHook();
00057 virtual void stopHook();
00058 virtual void cleanupHook();
00059
00060 unsigned int naxes;
00061
00062 std::vector<double> driveValues;
00063 std::vector<double> positionValues;
00064
00065 std::vector<OCL::SimulationAxis*> simulation_axes;
00066
00067 protected:
00068 Method<bool(void)> M_startAllAxes;
00069 Method<bool(void)> M_stopAllAxes;
00070 Method<bool(void)> M_unlockAllAxes;
00071 Method<bool(void)> M_lockAllAxes;
00072
00073 RTT::DataPort<std::vector<double> > D_driveValues;
00074 RTT::DataPort<std::vector<double> > D_positionValues;
00075
00076 RTT::Property<std::vector<double> > P_initialPositions;
00077 RTT::Property<unsigned int> P_naxes;
00078
00079 };
00080 }
00081 #endif