PowerCubeCtrl_OROCOS.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef _POWERCUBECTRL_OROCOS_
19 #define _POWERCUBECTRL_OROCOS_
20 
21 #include <rtt/TaskContext.hpp>
22 #include <rtt/Command.hpp>
23 #include <rtt/Ports.hpp>
24 #include <rtt/Property.hpp>
25 #include <rtt/marsh/PropertyMarshaller.hpp>
26 #include "PowerCubeCtrl.h"
27 
28 #include <iostream>
29 using namespace std;
30 
31 
32 class PowerCubeCtrl_OROCOS : public RTT::TaskContext
33 {
34  public:
35 
36  PowerCubeCtrl_OROCOS(std::string name, std::string file, int dof);
37  //PowerCubeCtrl_OROCOS(std::string name);
39 
40  bool configureHook();
41  bool startHook();
42  void updateHook();
43  void stopHook();
44  void cleanupHook(){}
45 
46  /* The dataports have the following names:
47  "in_Angles"
48  "in_Velocities"
49  "in_Currents"
50  "out_Angles"
51  "out_Velocities"
52  */
53 
54  protected:
55 
56  bool stopArm();
57  bool isArmStopped();
58  bool moveJointSpace(std::vector<double> target);
59  //bool m_stopped;
60 
61  std::string m_xmlFile;
62  int m_dof;
63 
64  RTT::ReadDataPort< std::vector<double> > m_in_Angles;
66 
67  RTT::ReadDataPort< std::vector<double> > m_in_Velocities; // MoveVel
69 
70  RTT::ReadDataPort< std::vector<double> > m_in_Currents;
72 
73  RTT::WriteDataPort< std::vector<double> > m_out_Angles; // getConfig
74  RTT::WriteDataPort< std::vector<double> > m_out_Velocities; // getJointVelocities
75  //WriteDataPort< std::vector<double> > m_out_Currents;
76 
77  RTT::Method<bool(void)> m_stop_method;
78  //RTT::Method<bool(std::vector<double>)> m_moveJointSpace_method;
79 
80  RTT::Property<int> m_CanDev_prop;
81  RTT::Property<int> m_CanBaud_prop;
82  RTT::Property<int> m_dof_prop;
83  RTT::Property<double> m_MaxVel_prop;
84  RTT::Property<double> m_MaxAcc_prop;
85 
86  std::vector< RTT::PropertyBag > m_mod_params_bags;
87  std::vector< RTT::Property<RTT::PropertyBag> > m_mod_params;
88 
89  std::vector< RTT::Property<int> > m_modId_props;
90  std::vector< RTT::Property<double> > m_ul_props;
91  std::vector< RTT::Property<double> > m_ll_props;
92  std::vector< RTT::Property<double> > m_offset_props;
93 
95 
96 };
97 
98 #endif
99 
RTT::Method< bool(void)> m_stop_method
RTT::Property< int > m_CanDev_prop
RTT::ReadDataPort< std::vector< double > > m_in_Currents
RTT::ReadDataPort< std::vector< double > > m_in_Velocities
std::vector< RTT::Property< double > > m_ul_props
RTT::ReadDataPort< std::vector< double > > m_in_Angles
RTT::Property< double > m_MaxAcc_prop
std::vector< RTT::Property< double > > m_offset_props
RTT::Property< int > m_dof_prop
std::vector< RTT::PropertyBag > m_mod_params_bags
std::vector< RTT::Property< int > > m_modId_props
std::vector< RTT::Property< double > > m_ll_props
RTT::WriteDataPort< std::vector< double > > m_out_Velocities
RTT::Property< int > m_CanBaud_prop
std::vector< RTT::Property< RTT::PropertyBag > > m_mod_params
RTT::Property< double > m_MaxVel_prop
RTT::WriteDataPort< std::vector< double > > m_out_Angles


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Mon Nov 25 2019 03:48:21