8 #error This class is not to be included by the user directly. Use SAccelf.h or SAcceld.h instead.
27 SACCEL(REAL ax, REAL ay, REAL az, REAL lx, REAL ly, REAL lz, boost::shared_ptr<const POSE3>
pose = boost::shared_ptr<const POSE3>()) :
SVECTOR6(ax, ay, az, lx, ly, lz,
pose) {};
30 SACCEL(REAL ax, REAL ay, REAL az, REAL lx, REAL ly, REAL lz, boost::shared_ptr<POSE3>
pose) :
SVECTOR6(ax, ay, az, lx, ly, lz, pose) {};
33 SACCEL(
const REAL* array, boost::shared_ptr<const POSE3>
pose = boost::shared_ptr<const POSE3>()) :
SVECTOR6(array[0], array[1], array[2], array[3], array[4], array[5],
pose) {}
36 SACCEL(
const REAL* array, boost::shared_ptr<POSE3>
pose) :
SVECTOR6(array[0], array[1], array[2], array[3], array[4], array[5], pose) {}
45 static SACCEL zero(boost::shared_ptr<const POSE3>
pose = boost::shared_ptr<const POSE3>()) {
SACCEL t(
pose); t.set_zero();
return t; }
51 V& transpose_to_vector(V& v)
const
53 const unsigned SPATIAL_DIM = 6;
54 v.resize(SPATIAL_DIM);
55 REAL* vdata = v.data();
56 const REAL* d = data();
57 vdata[0] = d[3]; vdata[1] = d[4]; vdata[2] = d[5];
58 vdata[3] = d[0]; vdata[4] = d[1]; vdata[5] = d[2];
63 static SACCEL from_vector(
const V& v, boost::shared_ptr<const POSE3>
pose = boost::shared_ptr<const POSE3>())
65 const unsigned SPATIAL_DIM = 6;
66 if (v.size() != SPATIAL_DIM)
67 throw MissizeException();
69 REAL* tdata = t.data();
70 const REAL* vdata = v.data();
71 CBLAS::copy(SPATIAL_DIM, vdata, v.inc(), tdata, 1);
76 static SACCEL from_vector(
const V& v, boost::shared_ptr<POSE3>
pose)
78 const unsigned SPATIAL_DIM = 6;
79 if (v.size() != SPATIAL_DIM)
80 throw MissizeException();
82 REAL* tdata = t.data();
83 const REAL* vdata = v.data();
84 CBLAS::copy(SPATIAL_DIM, vdata, v.inc(), tdata, 1);
99 v._data[0] = -_data[0];
100 v._data[1] = -_data[1];
101 v._data[2] = -_data[2];
102 v._data[3] = -_data[3];
103 v._data[4] = -_data[4];
104 v._data[5] = -_data[5];
114 throw FrameException();
117 _data[0] -= v._data[0];
118 _data[1] -= v._data[1];
119 _data[2] -= v._data[2];
120 _data[3] -= v._data[3];
121 _data[4] -= v._data[4];
122 _data[5] -= v._data[5];
131 throw FrameException();
134 _data[0] += v._data[0];
135 _data[1] += v._data[1];
136 _data[2] += v._data[2];
137 _data[3] += v._data[3];
138 _data[4] += v._data[4];
139 _data[5] += v._data[5];
146 SACCEL operator*(REAL scalar)
const {
SACCEL v = *
this; v*= scalar;
return v;}
147 SACCEL operator/(REAL scalar)
const {
SACCEL v = *
this; v/= scalar;
return v;}
154 inline std::ostream& operator<<(std::ostream& out,
const SACCEL& t)
156 out <<
"acceleration (linear= " << t.get_linear() <<
", angular= " << t.get_angular() <<
") frame: " << t.
pose;
SACCEL(boost::shared_ptr< POSE3 > pose)
Constructs a acceleration with zero linear and zero angular components.
Definition: SAccel.h:21
void set_lower(const VECTOR3 &lower)
Sets the lower 3-dimensional vector.
Definition: SVector6.cpp:241
SACCEL(const REAL *array, boost::shared_ptr< POSE3 > pose)
Constructs a acceleration from six values (first three angular, next three linear) and a pose...
Definition: SAccel.h:36
boost::shared_ptr< const POSE3 > pose
The frame that this vector is defined in.
Definition: SVector6.h:96
SACCEL operator-() const
Returns the negation of this vector.
Definition: SAccel.h:96
void set_upper(const VECTOR3 &upper)
Sets the upper 3-dimensional vector.
Definition: SVector6.cpp:249
SACCEL(const VECTOR3 &angular, const VECTOR3 &linear, boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >())
Constructs a acceleration from linear and angular components and a pose.
Definition: SAccel.h:39
VECTOR3 get_upper() const
Gets the upper 3-dimensional vector.
Definition: SVector6.cpp:235
SACCEL(const SVECTOR6 &v)
Constructs a acceleration from a SVector6.
Definition: SAccel.h:24
SVECTOR6 & operator=(const SVECTOR6 &source)
Copies this vector from another SVECTOR6.
Definition: SVector6.cpp:257
static SACCEL zero(boost::shared_ptr< POSE3 > pose)
Returns a zero acceleration.
Definition: SAccel.h:48
SACCEL(REAL ax, REAL ay, REAL az, REAL lx, REAL ly, REAL lz, boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >())
Constructs a acceleration from six values (first three angualr, next three linear) and a pose...
Definition: SAccel.h:27
static SACCEL zero(boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >())
Returns a zero acceleration.
Definition: SAccel.h:45
A 6-dimensional floating-point vector for use with spatial algebra.
Definition: SVector6.h:22
SACCEL(const REAL *array, boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >())
Constructs a acceleration from six values (first three angular, next three linear) and a pose...
Definition: SAccel.h:33
SACCEL(const VECTOR3 &angular, const VECTOR3 &linear, boost::shared_ptr< POSE3 > pose)
Constructs a acceleration from linear and angular components and a pose.
Definition: SAccel.h:42
A spatial (six dimensional) acceleration.
Definition: SAccel.h:14
VECTOR3 get_lower() const
Gets the lower 3-dimensional vector.
Definition: SVector6.cpp:229
A three-dimensional floating point vector used for representing points and vectors in 3D with associa...
Definition: Vector3.h:15
A spatial force (a wrench)
Definition: SForce.h:14
SACCEL(boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >())
Constructs a acceleration with zero linear and zero angular components.
Definition: SAccel.h:18
SACCEL(REAL ax, REAL ay, REAL az, REAL lx, REAL ly, REAL lz, boost::shared_ptr< POSE3 > pose)
Constructs a acceleration from six values (first three angualr, next three linear) and a pose...
Definition: SAccel.h:30