YouBotGripperBar.hpp
Go to the documentation of this file.
1 #ifndef YOUBOT_YOUBOTGRIPPERBAR_H
2 #define YOUBOT_YOUBOTGRIPPERBAR_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>
70 
71 namespace youbot {
72 
77  public:
78  YouBotGripperBar(const unsigned int barNo, const unsigned int jointNo, const std::string& configFilePath = "../config/");
79 
80  virtual ~YouBotGripperBar();
81 
82  virtual void setConfigurationParameter(const MaxEncoderValue& parameter);
83 
84  virtual void getConfigurationParameter(MaxEncoderValue& parameter) const;
85 
86  virtual void getConfigurationParameter(MaxTravelDistance& parameter) const;
87 
88  virtual void setConfigurationParameter(const MaxTravelDistance& parameter);
89 
90  virtual void setConfigurationParameter(const BarSpacingOffset& parameter);
91 
92  virtual void getConfigurationParameter(BarSpacingOffset& parameter) const;
93 
94  virtual void setConfigurationParameter(const GripperBarName& parameter);
95 
96  virtual void getConfigurationParameter(GripperBarName& parameter) const;
97 
98  virtual void getConfigurationParameter(YouBotGripperParameter& parameter) const;
99 
100  virtual void setConfigurationParameter(const YouBotGripperParameter& parameter);
101 
102  virtual void getConfigurationParameter(YouBotSlaveMailboxMsg& parameter) const;
103 
104  virtual void setData(const GripperBarEncoderSetpoint& encoderSetpoint);
105 
106  virtual void getData(GripperSensedVelocity& barVelocity) const;
107 
108  virtual void getData(GripperSensedBarPosition& barPosition) const;
109 
110  virtual void setData(GripperBarPositionSetPoint& barPosition);
111 
112  void parseGripperErrorFlags(const unsigned int& errosFlags);
113 
114 
115  private:
116  YouBotGripperBar(const YouBotGripperBar & source);
117 
118  YouBotGripperBar & operator=(const YouBotGripperBar & source);
119 
120  void parseMailboxStatusFlags(const YouBotSlaveMailboxMsg& mailboxMsg) const;
121 
122  bool setValueToMotorContoller(const YouBotSlaveMailboxMsg& mailboxMsg) const;
123 
125 
126  quantity<si::length> maxTravelDistance;
127 
128  unsigned int maxEncoderValue;
129 
130  quantity<si::length> barSpacingOffset;
131 
133 
135 
136  unsigned int mailboxMsgRetries;
137 
138  unsigned int jointNumber;
139 
140  unsigned int barNo;
141 
142  std::string name;
143 
144 };
145 
146 } // namespace youbot
147 #endif
virtual void getData(GripperSensedVelocity &barVelocity) const
YouBotGripperBar(const unsigned int barNo, const unsigned int jointNo, const std::string &configFilePath="../config/")
void parseMailboxStatusFlags(const YouBotSlaveMailboxMsg &mailboxMsg) const
The encoder value when the gripper has reached it&#39;s maximum bar spacing position. ...
quantity< si::length > barSpacingOffset
bool setValueToMotorContoller(const YouBotSlaveMailboxMsg &mailboxMsg) const
The encoder setpoint for one bar.
virtual void getConfigurationParameter(MaxEncoderValue &parameter) const
The maximum bar spacing distance of the gripper.
virtual void setData(const GripperBarEncoderSetpoint &encoderSetpoint)
EtherCAT mailbox message of the youBot slaves.
virtual void setConfigurationParameter(const MaxEncoderValue &parameter)
void parseGripperErrorFlags(const unsigned int &errosFlags)
The sensed bar velocity for a one DOF gripper.
The Ethercat Master interface.
Represents a bar spacing offset. It could be useful if the gripper can not be totally closed...
One bar of the youBot gripper.
quantity< si::length > maxTravelDistance
bool retrieveValueFromMotorContoller(YouBotSlaveMailboxMsg &message) const
YouBotGripperBar & operator=(const YouBotGripperBar &source)
abstract youBot gripper parameter
The name for a gripper bar or finger.
The bar position for a one gripper bar.
unsigned int timeTillNextMailboxUpdate
The sensed bar position for a one gripper bar.
EthercatMasterInterface * ethercatMaster


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