JointData.hpp

Go to the documentation of this file.
00001 #ifndef YOUBOT_JOINTDATA_H
00002 #define YOUBOT_JOINTDATA_H
00003 
00004 /****************************************************************
00005  *
00006  * Copyright (c) 2011
00007  * All rights reserved.
00008  *
00009  * Hochschule Bonn-Rhein-Sieg
00010  * University of Applied Sciences
00011  * Computer Science Department
00012  *
00013  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00014  *
00015  * Author:
00016  * Jan Paulus, Nico Hochgeschwender, Michael Reckhaus, Azamat Shakhimardanov
00017  * Supervised by:
00018  * Gerhard K. Kraetzschmar
00019  *
00020  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00021  *
00022  * This sofware is published under a dual-license: GNU Lesser General Public 
00023  * License LGPL 2.1 and BSD license. The dual-license implies that users of this
00024  * code may choose which terms they prefer.
00025  *
00026  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00027  *
00028  * Redistribution and use in source and binary forms, with or without
00029  * modification, are permitted provided that the following conditions are met:
00030  *
00031  *     * Redistributions of source code must retain the above copyright
00032  *       notice, this list of conditions and the following disclaimer.
00033  *     * Redistributions in binary form must reproduce the above copyright
00034  *       notice, this list of conditions and the following disclaimer in the
00035  *       documentation and/or other materials provided with the distribution.
00036  *     * Neither the name of the Hochschule Bonn-Rhein-Sieg nor the names of its
00037  *       contributors may be used to endorse or promote products derived from
00038  *       this software without specific prior written permission.
00039  *
00040  * This program is free software: you can redistribute it and/or modify
00041  * it under the terms of the GNU Lesser General Public License LGPL as
00042  * published by the Free Software Foundation, either version 2.1 of the
00043  * License, or (at your option) any later version or the BSD license.
00044  *
00045  * This program is distributed in the hope that it will be useful,
00046  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00047  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00048  * GNU Lesser General Public License LGPL and the BSD license for more details.
00049  *
00050  * You should have received a copy of the GNU Lesser General Public
00051  * License LGPL and BSD license along with this program.
00052  *
00053  ****************************************************************/
00054 #include "generic/Units.hpp"
00055 
00056 namespace youbot {
00057 
00058 ///////////////////////////////////////////////////////////////////////////////
00059 /// abstract data class for joints
00060 ///////////////////////////////////////////////////////////////////////////////
00061 class JointData {
00062 };
00063 ///////////////////////////////////////////////////////////////////////////////
00064 /// abstract data class for sensed / measured joint data
00065 ///////////////////////////////////////////////////////////////////////////////
00066 class JointSensedData : public JointData {
00067 };
00068 ///////////////////////////////////////////////////////////////////////////////
00069 /// abstract data class for computed joint data
00070 ///////////////////////////////////////////////////////////////////////////////
00071 class JointComputedData : public JointSensedData {
00072 };
00073 ///////////////////////////////////////////////////////////////////////////////
00074 /// actual pwm value of the joint
00075 ///////////////////////////////////////////////////////////////////////////////
00076 class JointSensedPWM : public JointSensedData {
00077   public:
00078     signed int pwm;
00079 
00080     JointSensedPWM();
00081 
00082     JointSensedPWM(const signed int& value);
00083 
00084 };
00085 ///////////////////////////////////////////////////////////////////////////////
00086 /// Sensed position / angle of the joint
00087 ///////////////////////////////////////////////////////////////////////////////
00088 class JointSensedAngle : public JointSensedData {
00089   public:
00090     quantity<plane_angle> angle;
00091 
00092     JointSensedAngle();
00093 
00094     JointSensedAngle(const quantity<plane_angle>& value);
00095 
00096 };
00097 ///////////////////////////////////////////////////////////////////////////////
00098 /// Sensed encoder ticks of the joint
00099 ///////////////////////////////////////////////////////////////////////////////
00100 class JointSensedEncoderTicks : public JointSensedData {
00101   public:
00102     signed int encoderTicks;
00103 
00104     JointSensedEncoderTicks();
00105 
00106     JointSensedEncoderTicks(const signed int& value);
00107 
00108 };
00109 ///////////////////////////////////////////////////////////////////////////////
00110 /// Sensed velocity of the joint
00111 ///////////////////////////////////////////////////////////////////////////////
00112 class JointSensedVelocity : public JointSensedData {
00113   public:
00114     quantity<si::angular_velocity> angularVelocity;
00115 
00116     JointSensedVelocity();
00117 
00118     JointSensedVelocity(const quantity<si::angular_velocity>& value);
00119 
00120 };
00121 ///////////////////////////////////////////////////////////////////////////////
00122 /// Sensed rounds per minute (rpm) of the joint
00123 ///////////////////////////////////////////////////////////////////////////////
00124 class JointSensedRoundsPerMinute : public JointSensedData {
00125   public:
00126     int rpm;
00127 
00128     JointSensedRoundsPerMinute();
00129 
00130     JointSensedRoundsPerMinute(const int value);
00131 
00132 };
00133 ///////////////////////////////////////////////////////////////////////////////
00134 /// Sensed electric current of the joint
00135 ///////////////////////////////////////////////////////////////////////////////
00136 class JointSensedCurrent : public JointSensedData {
00137   public:
00138     quantity<si::current> current;
00139 
00140     JointSensedCurrent();
00141 
00142     JointSensedCurrent(const quantity<si::current>& value);
00143 
00144 };
00145 ///////////////////////////////////////////////////////////////////////////////
00146 /// This torque of the joint is computed from the actual current
00147 ///////////////////////////////////////////////////////////////////////////////
00148 class JointSensedTorque : public JointComputedData {
00149   public:
00150     quantity<si::torque> torque;
00151 
00152     JointSensedTorque();
00153 
00154     JointSensedTorque(const quantity<si::torque>& value);
00155 
00156 };
00157 ///////////////////////////////////////////////////////////////////////////////
00158 /// abstract data class for commanded joint data
00159 ///////////////////////////////////////////////////////////////////////////////
00160 class JointDataSetpoint : public JointData {
00161 };
00162 ///////////////////////////////////////////////////////////////////////////////
00163 /// abstract data class for computed joint data setpoints
00164 ///////////////////////////////////////////////////////////////////////////////
00165 class JointComputedSetpoint : public JointDataSetpoint {
00166 };
00167 ///////////////////////////////////////////////////////////////////////////////
00168 /// Set-point angle / position of the joint
00169 ///////////////////////////////////////////////////////////////////////////////
00170 class JointAngleSetpoint : public JointDataSetpoint {
00171   public:
00172     quantity<plane_angle> angle;
00173 
00174     JointAngleSetpoint();
00175 
00176     JointAngleSetpoint(const quantity<plane_angle>& value);
00177 
00178 };
00179 ///////////////////////////////////////////////////////////////////////////////
00180 /// Set-point velocity of the joint
00181 ///////////////////////////////////////////////////////////////////////////////
00182 class JointVelocitySetpoint : public JointDataSetpoint {
00183   public:
00184     quantity<angular_velocity> angularVelocity;
00185 
00186     JointVelocitySetpoint();
00187 
00188     JointVelocitySetpoint(const quantity<angular_velocity>& value);
00189 
00190 };
00191 ///////////////////////////////////////////////////////////////////////////////
00192 /// Rounds per minute set-point of the joint
00193 ///////////////////////////////////////////////////////////////////////////////
00194 class JointRoundsPerMinuteSetpoint : public JointDataSetpoint {
00195   public:
00196     int rpm;
00197 
00198     JointRoundsPerMinuteSetpoint();
00199 
00200     JointRoundsPerMinuteSetpoint(const int value);
00201 
00202 };
00203 ///////////////////////////////////////////////////////////////////////////////
00204 /// Set-point current of the joint
00205 ///////////////////////////////////////////////////////////////////////////////
00206 class JointCurrentSetpoint : public JointDataSetpoint {
00207   public:
00208     quantity<si::current> current;
00209 
00210     JointCurrentSetpoint();
00211 
00212     JointCurrentSetpoint(const quantity<si::current>& value);
00213 
00214 };
00215 ///////////////////////////////////////////////////////////////////////////////
00216 /// The torque set-point of the joint will be set by setting the computed current set-point
00217 ///////////////////////////////////////////////////////////////////////////////
00218 class JointTorqueSetpoint : public JointComputedSetpoint {
00219   public:
00220     quantity<si::torque> torque;
00221 
00222     JointTorqueSetpoint();
00223 
00224     JointTorqueSetpoint(const quantity<si::torque>& value);
00225 
00226 };
00227 ///////////////////////////////////////////////////////////////////////////////
00228 /// Pulse-width modulation set-point of the joint
00229 ///////////////////////////////////////////////////////////////////////////////
00230 class JointPWMSetpoint : public JointDataSetpoint {
00231   public:
00232     int pwm;
00233 
00234     JointPWMSetpoint();
00235 
00236     JointPWMSetpoint(const int value);
00237 
00238 };
00239 ///////////////////////////////////////////////////////////////////////////////
00240 /// encoder ticks setpoint of the joint
00241 ///////////////////////////////////////////////////////////////////////////////
00242 class JointEncoderSetpoint : public JointDataSetpoint {
00243   public:
00244     signed int encoderTicks;
00245 
00246     JointEncoderSetpoint();
00247 
00248     JointEncoderSetpoint(const signed int& value);
00249 
00250 };
00251 ///////////////////////////////////////////////////////////////////////////////
00252 /// abstract data class for data which have been computed by the hardware controller
00253 ///////////////////////////////////////////////////////////////////////////////
00254 class JointControllerComputedData : public JointSensedData {
00255 };
00256 ///////////////////////////////////////////////////////////////////////////////
00257 /// Sensed velocity of the joint
00258 ///////////////////////////////////////////////////////////////////////////////
00259 class JointRampGeneratorVelocity : public JointControllerComputedData {
00260   public:
00261     quantity<si::angular_velocity> angularVelocity;
00262 
00263     JointRampGeneratorVelocity();
00264 
00265     JointRampGeneratorVelocity(const quantity<si::angular_velocity>& value);
00266 
00267 };
00268 
00269 } // namespace youbot
00270 #endif
Generated by  doxygen 1.6.3