From d860ee12ac494e4ada69f2304709a535978e543b Mon Sep 17 00:00:00 2001 From: philipp schoenberger Date: Tue, 23 Jun 2015 14:07:57 +0200 Subject: [PATCH] cleanup headers --- lwrserv/{ => include}/Point.h | 0 lwrserv/{ => include}/Singleton.h | 0 lwrserv/{ => include}/global.h | 0 lwrserv/{ => include}/resource.h | 0 lwrserv/{ => include}/sgn.h | 0 lwrserv/include/trajectory.h | 21 +++ lwrserv/include/vec.h | 236 ++++++++++++++++++++++++++++++ 7 files changed, 257 insertions(+) rename lwrserv/{ => include}/Point.h (100%) rename lwrserv/{ => include}/Singleton.h (100%) rename lwrserv/{ => include}/global.h (100%) rename lwrserv/{ => include}/resource.h (100%) rename lwrserv/{ => include}/sgn.h (100%) create mode 100644 lwrserv/include/trajectory.h create mode 100644 lwrserv/include/vec.h diff --git a/lwrserv/Point.h b/lwrserv/include/Point.h similarity index 100% rename from lwrserv/Point.h rename to lwrserv/include/Point.h diff --git a/lwrserv/Singleton.h b/lwrserv/include/Singleton.h similarity index 100% rename from lwrserv/Singleton.h rename to lwrserv/include/Singleton.h diff --git a/lwrserv/global.h b/lwrserv/include/global.h similarity index 100% rename from lwrserv/global.h rename to lwrserv/include/global.h diff --git a/lwrserv/resource.h b/lwrserv/include/resource.h similarity index 100% rename from lwrserv/resource.h rename to lwrserv/include/resource.h diff --git a/lwrserv/sgn.h b/lwrserv/include/sgn.h similarity index 100% rename from lwrserv/sgn.h rename to lwrserv/include/sgn.h diff --git a/lwrserv/include/trajectory.h b/lwrserv/include/trajectory.h new file mode 100644 index 0000000..8b89859 --- /dev/null +++ b/lwrserv/include/trajectory.h @@ -0,0 +1,21 @@ +#ifndef _TRAJECTORY_H_ +#define _TRAJECTORY_H_ + +#include "vec.h" + +class Trajectory +{ + public: + virtual unsigned int getSteps(); + + virtual Vec getJointValues(); + virtual Vec getJointVelocity(unsigned int jointID); + virtual Vec getJointAcceleration(unsigned int jointID); + + virtual Vec getCarthesianValues(); + virtual Vec getCarthesianVelocity(unsigned int jointID); + virtual Vec getCarthesianAcceleration(unsigned int jointID); +}; + +class TrajectoryBangBang :: Trajectory; +#endif diff --git a/lwrserv/include/vec.h b/lwrserv/include/vec.h new file mode 100644 index 0000000..4ef4833 --- /dev/null +++ b/lwrserv/include/vec.h @@ -0,0 +1,236 @@ +#ifndef _VEC_H_ +#define _VEC_H_ +#include +#include +#include "mat.h" + +template class Vec; +template class Mat; + + +// Vector class for SIMPLE data types +template class Vec +{ +public: + + // standard constructor + Vec () + { // initialize all elements with zero + for (unsigned int i=0; i (const T atData[SIZE]) + { + for (unsigned int i=0; i (const Vec &vec) + { + if (this==&vec) + return; // nothing to do, it's me + for (unsigned int i=0; i &operator = (const Vec &vec) + { + if (this==&vec) + return (*this); // ok, it's me, so no L-value action + for (unsigned int i=0; i &operator = (const T atData[SIZE]) + { + for (unsigned int i=0; i