YouBotManipulator.hpp
Go to the documentation of this file.
1 #ifndef YOUBOT_YOUBOTMANIPULATOR_H
2 #define YOUBOT_YOUBOTMANIPULATOR_H
3 
4 /****************************************************************
5  *
6  * Copyright (c) 2011
7  * All rights reserved.
8  *
9  * Hochschule Bonn-Rhein-Sieg
10  * University of Applied Sciences
11  * Computer Science Department
12  *
13  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14  *
15  * Author:
16  * Jan Paulus, Nico Hochgeschwender, Michael Reckhaus, Azamat Shakhimardanov
17  * Supervised by:
18  * Gerhard K. Kraetzschmar
19  *
20  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21  *
22  * This sofware is published under a dual-license: GNU Lesser General Public
23  * License LGPL 2.1 and BSD license. The dual-license implies that users of this
24  * code may choose which terms they prefer.
25  *
26  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
27  *
28  * Redistribution and use in source and binary forms, with or without
29  * modification, are permitted provided that the following conditions are met:
30  *
31  * * Redistributions of source code must retain the above copyright
32  * notice, this list of conditions and the following disclaimer.
33  * * Redistributions in binary form must reproduce the above copyright
34  * notice, this list of conditions and the following disclaimer in the
35  * documentation and/or other materials provided with the distribution.
36  * * Neither the name of the Hochschule Bonn-Rhein-Sieg nor the names of its
37  * contributors may be used to endorse or promote products derived from
38  * this software without specific prior written permission.
39  *
40  * This program is free software: you can redistribute it and/or modify
41  * it under the terms of the GNU Lesser General Public License LGPL as
42  * published by the Free Software Foundation, either version 2.1 of the
43  * License, or (at your option) any later version or the BSD license.
44  *
45  * This program is distributed in the hope that it will be useful,
46  * but WITHOUT ANY WARRANTY; without even the implied warranty of
47  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48  * GNU Lesser General Public License LGPL and the BSD license for more details.
49  *
50  * You should have received a copy of the GNU Lesser General Public
51  * License LGPL and BSD license along with this program.
52  *
53  ****************************************************************/
54 #include <vector>
55 #include <sstream>
56 #include <string>
61 #include <boost/ptr_container/ptr_vector.hpp>
62 #include <boost/scoped_ptr.hpp>
63 namespace youbot {
64 
69  public:
70  YouBotManipulator(const std::string name, const std::string configFilePath = "../config/");
71 
72  virtual ~YouBotManipulator();
73 
75  void doJointCommutation();
76 
78  void calibrateManipulator(const bool forceCalibration = false);
79 
80  void calibrateGripper(const bool forceCalibration = false);
81 
82  int getNumberJoints();
83 
84  bool hasGripper();
85 
88  YouBotJoint& getArmJoint(const unsigned int armJointNumber);
89 
91 
95  virtual void setJointData(const std::vector<JointAngleSetpoint>& JointData);
96 
100  virtual void getJointData(std::vector<JointSensedAngle>& data);
101 
105  virtual void setJointData(const std::vector<JointVelocitySetpoint>& JointData);
106 
110  virtual void getJointData(std::vector<JointSensedVelocity>& data);
111 
115  virtual void setJointData(const std::vector<JointCurrentSetpoint>& JointData);
116 
120  virtual void getJointData(std::vector<JointSensedCurrent>& data);
121 
125  virtual void setJointData(const std::vector<JointTorqueSetpoint>& JointData);
126 
130  virtual void getJointData(std::vector<JointSensedTorque>& data);
131 
132 
133  private:
134  YouBotManipulator(const YouBotManipulator & source);
135 
137 
139  void commutationFirmware200();
140 
142  void commutationFirmware148();
143 
144  void initializeJoints();
145 
146  unsigned int numberArmJoints;
147 
148  boost::scoped_ptr<ConfigFile> configfile;
149 
150  boost::ptr_vector<YouBotJoint> joints;
151 
152  boost::scoped_ptr<YouBotGripper> gripper;
153 
155 
157 
160 
162 
164 
165  std::vector<std::string> supportedFirmwareVersions;
166 
168 
169 };
170 
171 } // namespace youbot
172 #endif
void doJointCommutation()
does the sine commutation of the arm joints
It groups the manipulator joints and the gripper together.
YouBotManipulator(const std::string name, const std::string configFilePath="../config/")
EthercatMasterWithThread * ethercatMasterWithThread
The youBot gripper with one degree of freedom.
void calibrateManipulator(const bool forceCalibration=false)
calibrate the reference position of the arm joints
boost::ptr_vector< YouBotJoint > joints
boost::scoped_ptr< ConfigFile > configfile
The number of manipulator joints.
virtual void setJointData(const std::vector< JointAngleSetpoint > &JointData)
int getNumberJoints()
return the number of joints
std::vector< std::string > supportedFirmwareVersions
YouBotManipulator & operator=(const YouBotManipulator &source)
YouBotJoint & getArmJoint(const unsigned int armJointNumber)
virtual void getJointData(std::vector< JointSensedAngle > &data)
The Ethercat Master interface.
boost::scoped_ptr< YouBotGripper > gripper
void commutationFirmware200()
does the commutation of the arm joints with firmware 2.0
void calibrateGripper(const bool forceCalibration=false)
void commutationFirmware148()
does the commutation of the arm joints with firmware 1.48 and below
EthercatMasterInterface & ethercatMaster
abstract data class for joints
Definition: JointData.hpp:61


youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:26