GripperDataTrace.hpp
Go to the documentation of this file.
1 #ifndef YOUBOT_GRIPPERDATATRACE_H
2 #define YOUBOT_GRIPPERDATATRACE_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 
55 #include <vector>
56 #include <sstream>
57 #include <string>
58 #include <cstdio>
59 #include <stdexcept>
60 #include <iostream>
61 #include <stdlib.h>
62 #include "boost/date_time/gregorian/gregorian.hpp"
63 #include "boost/filesystem.hpp"
70 
71 using namespace boost::posix_time;
72 
73 namespace youbot {
74 
79  public:
80  GripperDataTrace(YouBotGripperBar& youBotGripperBar, const std::string Name, const bool overwriteFiles = false);
81 
82  virtual ~GripperDataTrace();
83 
84  void startTrace(const std::string parameterName, const std::string unit);
85 
86  void stopTrace();
87 
88  void plotTrace();
89 
90  void updateTrace(const double parameterValue);
91 
92  unsigned long getTimeDurationMilliSec();
93 
94 
95  private:
96  GripperDataTrace(const GripperDataTrace & source);
97 
98  GripperDataTrace & operator=(const GripperDataTrace & source);
99 
101 
103 
105 
107 
109 
111 
113 
114  std::fstream file;
115 
117 
119 
121 
123 
125 
127 
129 
131 
133 
135 
136  time_duration timeDuration;
137 
138  unsigned long timeDurationMicroSec;
139 
141 
142  std::vector<YouBotGripperParameter*> parameterVector;
143 
144  std::string name;
145 
146  std::string path;
147 
148 };
149 
150 } // namespace youbot
151 #endif
JointSensedTorque sensedTorque
Sensed encoder ticks of the joint.
Definition: JointData.hpp:100
JointCurrentSetpoint currentSetpoint
Set-point velocity of the joint.
Definition: JointData.hpp:182
JointTorqueSetpoint torqueSetpoint
The torque set-point of the joint will be set by setting the computed current set-point.
Definition: JointData.hpp:218
JointVelocitySetpoint velocitySetpoint
JointRoundsPerMinuteSetpoint roundsPerMinuteSetpoint
This torque of the joint is computed from the actual current.
Definition: JointData.hpp:148
JointSensedEncoderTicks sensedEncoderTicks
JointSensedRoundsPerMinute sensedRoundsPerMinute
Sensed rounds per minute (rpm) of the joint.
Definition: JointData.hpp:124
JointEncoderSetpoint encoderSetpoint
Sensed electric current of the joint.
Definition: JointData.hpp:136
encoder ticks setpoint of the joint
Definition: JointData.hpp:242
One bar of the youBot gripper.
JointSensedVelocity sensedVelocity
std::vector< YouBotGripperParameter * > parameterVector
YouBotGripperBar & gripperBar
Pulse-width modulation set-point of the joint.
Definition: JointData.hpp:230
JointAngleSetpoint angleSetpoint
JointSensedCurrent sensedCurrent
Set-point current of the joint.
Definition: JointData.hpp:206
Creates a trace of one parameter of the gripper.
Sensed position / angle of the joint.
Definition: JointData.hpp:88
Set-point angle / position of the joint.
Definition: JointData.hpp:170
Rounds per minute set-point of the joint.
Definition: JointData.hpp:194
actual pwm value of the joint
Definition: JointData.hpp:76
Sensed velocity of the joint.
Definition: JointData.hpp:112


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