00001 /**************************************************************** 00002 * 00003 * Copyright (c) 2011 00004 * All rights reserved. 00005 * 00006 * Hochschule Bonn-Rhein-Sieg 00007 * University of Applied Sciences 00008 * Computer Science Department 00009 * 00010 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00011 * 00012 * Author: 00013 * Jan Paulus, Nico Hochgeschwender, Michael Reckhaus, Azamat Shakhimardanov 00014 * Supervised by: 00015 * Gerhard K. Kraetzschmar 00016 * 00017 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00018 * 00019 * This sofware is published under a dual-license: GNU Lesser General Public 00020 * License LGPL 2.1 and BSD license. The dual-license implies that users of this 00021 * code may choose which terms they prefer. 00022 * 00023 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00024 * 00025 * Redistribution and use in source and binary forms, with or without 00026 * modification, are permitted provided that the following conditions are met: 00027 * 00028 * * Redistributions of source code must retain the above copyright 00029 * notice, this list of conditions and the following disclaimer. 00030 * * Redistributions in binary form must reproduce the above copyright 00031 * notice, this list of conditions and the following disclaimer in the 00032 * documentation and/or other materials provided with the distribution. 00033 * * Neither the name of the Hochschule Bonn-Rhein-Sieg nor the names of its 00034 * contributors may be used to endorse or promote products derived from 00035 * this software without specific prior written permission. 00036 * 00037 * This program is free software: you can redistribute it and/or modify 00038 * it under the terms of the GNU Lesser General Public License LGPL as 00039 * published by the Free Software Foundation, either version 2.1 of the 00040 * License, or (at your option) any later version or the BSD license. 00041 * 00042 * This program is distributed in the hope that it will be useful, 00043 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00044 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00045 * GNU Lesser General Public License LGPL and the BSD license for more details. 00046 * 00047 * You should have received a copy of the GNU Lesser General Public 00048 * License LGPL and BSD license along with this program. 00049 * 00050 ****************************************************************/ 00051 #include "generic-joint/JointData.hpp" 00052 00053 namespace youbot { 00054 00055 JointSensedPWM::JointSensedPWM() { 00056 // Bouml preserved body begin 000CD971 00057 this->pwm = 0; 00058 // Bouml preserved body end 000CD971 00059 } 00060 00061 JointSensedPWM::JointSensedPWM(const signed int& value) { 00062 // Bouml preserved body begin 000CFDF1 00063 this->pwm = value; 00064 // Bouml preserved body end 000CFDF1 00065 } 00066 00067 JointSensedAngle::JointSensedAngle() { 00068 // Bouml preserved body begin 000CD771 00069 this->angle = 0 * radian; 00070 // Bouml preserved body end 000CD771 00071 } 00072 00073 JointSensedAngle::JointSensedAngle(const quantity<plane_angle>& value) { 00074 // Bouml preserved body begin 000CFBF1 00075 this->angle = value; 00076 // Bouml preserved body end 000CFBF1 00077 } 00078 00079 JointSensedEncoderTicks::JointSensedEncoderTicks() { 00080 // Bouml preserved body begin 000CD7F1 00081 this->encoderTicks = 0; 00082 // Bouml preserved body end 000CD7F1 00083 } 00084 00085 JointSensedEncoderTicks::JointSensedEncoderTicks(const signed int& value) { 00086 // Bouml preserved body begin 000CFC71 00087 this->encoderTicks = value; 00088 // Bouml preserved body end 000CFC71 00089 } 00090 00091 JointSensedVelocity::JointSensedVelocity() { 00092 // Bouml preserved body begin 000CD6F1 00093 this->angularVelocity = 0 * radian_per_second; 00094 // Bouml preserved body end 000CD6F1 00095 } 00096 00097 JointSensedVelocity::JointSensedVelocity(const quantity<si::angular_velocity>& value) { 00098 // Bouml preserved body begin 000CFB71 00099 this->angularVelocity = value; 00100 // Bouml preserved body end 000CFB71 00101 } 00102 00103 JointSensedRoundsPerMinute::JointSensedRoundsPerMinute() { 00104 // Bouml preserved body begin 000CD871 00105 this->rpm = 0; 00106 // Bouml preserved body end 000CD871 00107 } 00108 00109 JointSensedRoundsPerMinute::JointSensedRoundsPerMinute(const int value) { 00110 // Bouml preserved body begin 000CFCF1 00111 this->rpm = value; 00112 // Bouml preserved body end 000CFCF1 00113 } 00114 00115 JointSensedCurrent::JointSensedCurrent() { 00116 // Bouml preserved body begin 000CD8F1 00117 this->current = 0 * ampere; 00118 // Bouml preserved body end 000CD8F1 00119 } 00120 00121 JointSensedCurrent::JointSensedCurrent(const quantity<si::current>& value) { 00122 // Bouml preserved body begin 000CFD71 00123 this->current = value; 00124 // Bouml preserved body end 000CFD71 00125 } 00126 00127 JointSensedTorque::JointSensedTorque() { 00128 // Bouml preserved body begin 000CD671 00129 this->torque = 0 * newton_meter; 00130 // Bouml preserved body end 000CD671 00131 } 00132 00133 JointSensedTorque::JointSensedTorque(const quantity<si::torque>& value) { 00134 // Bouml preserved body begin 000CFAF1 00135 this->torque = value; 00136 // Bouml preserved body end 000CFAF1 00137 } 00138 00139 JointAngleSetpoint::JointAngleSetpoint() { 00140 // Bouml preserved body begin 000CDB71 00141 this->angle = 0 * radian; 00142 // Bouml preserved body end 000CDB71 00143 } 00144 00145 JointAngleSetpoint::JointAngleSetpoint(const quantity<plane_angle>& value) { 00146 // Bouml preserved body begin 000CFF71 00147 this->angle = value; 00148 // Bouml preserved body end 000CFF71 00149 } 00150 00151 JointVelocitySetpoint::JointVelocitySetpoint() { 00152 // Bouml preserved body begin 000CDAF1 00153 this->angularVelocity = 0 * radian_per_second; 00154 // Bouml preserved body end 000CDAF1 00155 } 00156 00157 JointVelocitySetpoint::JointVelocitySetpoint(const quantity<angular_velocity>& value) { 00158 // Bouml preserved body begin 000CFEF1 00159 this->angularVelocity = value; 00160 // Bouml preserved body end 000CFEF1 00161 } 00162 00163 JointRoundsPerMinuteSetpoint::JointRoundsPerMinuteSetpoint() { 00164 // Bouml preserved body begin 000CDCF1 00165 this->rpm = 0; 00166 // Bouml preserved body end 000CDCF1 00167 } 00168 00169 JointRoundsPerMinuteSetpoint::JointRoundsPerMinuteSetpoint(const int value) { 00170 // Bouml preserved body begin 000D00F1 00171 this->rpm = value; 00172 // Bouml preserved body end 000D00F1 00173 } 00174 00175 JointCurrentSetpoint::JointCurrentSetpoint() { 00176 // Bouml preserved body begin 000CDBF1 00177 this->current = 0 * ampere; 00178 // Bouml preserved body end 000CDBF1 00179 } 00180 00181 JointCurrentSetpoint::JointCurrentSetpoint(const quantity<si::current>& value) { 00182 // Bouml preserved body begin 000CFFF1 00183 this->current = value; 00184 // Bouml preserved body end 000CFFF1 00185 } 00186 00187 JointTorqueSetpoint::JointTorqueSetpoint() { 00188 // Bouml preserved body begin 000CDA71 00189 this->torque = 0 * newton_meter; 00190 // Bouml preserved body end 000CDA71 00191 } 00192 00193 JointTorqueSetpoint::JointTorqueSetpoint(const quantity<si::torque>& value) { 00194 // Bouml preserved body begin 000CFE71 00195 this->torque = value; 00196 // Bouml preserved body end 000CFE71 00197 } 00198 00199 JointPWMSetpoint::JointPWMSetpoint() { 00200 // Bouml preserved body begin 000CDC71 00201 this->pwm = 0; 00202 // Bouml preserved body end 000CDC71 00203 } 00204 00205 JointPWMSetpoint::JointPWMSetpoint(const int value) { 00206 // Bouml preserved body begin 000D0071 00207 this->pwm = value; 00208 // Bouml preserved body end 000D0071 00209 } 00210 00211 JointEncoderSetpoint::JointEncoderSetpoint() { 00212 // Bouml preserved body begin 000CDD71 00213 this->encoderTicks = 0; 00214 // Bouml preserved body end 000CDD71 00215 } 00216 00217 JointEncoderSetpoint::JointEncoderSetpoint(const signed int& value) { 00218 // Bouml preserved body begin 000D0171 00219 this->encoderTicks = value; 00220 // Bouml preserved body end 000D0171 00221 } 00222 00223 JointRampGeneratorVelocity::JointRampGeneratorVelocity() { 00224 // Bouml preserved body begin 00103DF1 00225 this->angularVelocity = 0 * radian_per_second; 00226 // Bouml preserved body end 00103DF1 00227 } 00228 00229 JointRampGeneratorVelocity::JointRampGeneratorVelocity(const quantity<si::angular_velocity>& value) { 00230 // Bouml preserved body begin 00103E71 00231 this->angularVelocity = value; 00232 // Bouml preserved body end 00103E71 00233 } 00234 00235 00236 } // namespace youbot