57 X[0] = p1.second.x; Y[0] = p1.second.y; yaw[0] = p1.second.phi;
58 X[1] = p2.second.x; Y[1] = p2.second.y; yaw[1] = p2.second.phi;
59 X[2] = p3.second.x; Y[2] = p3.second.y; yaw[2] = p3.second.phi;
60 X[3] = p4.second.x; Y[3] = p4.second.y; yaw[3] = p4.second.phi;
88 out_interp.x = math::leastSquareLinearFit<double,decltype(ts), 4>(td, ts, X);
89 out_interp.y = math::leastSquareLinearFit<double, decltype(ts), 4>(td, ts, Y);
90 out_interp.phi = math::leastSquareLinearFit<double, decltype(ts), 4>(td, ts, yaw,
true );
98 out_interp.phi = math::leastSquareLinearFit<double, decltype(ts), 4>(td, ts, yaw,
true );
112 const double ratio = (td-ts[1])/(ts[2]-ts[1]);
114 out_interp.phi = yaw[1] + ratio*Aang;
123 const double ratio = (td-ts[1])/(ts[2]-ts[1]);
125 out_interp.phi = yaw[1] + ratio*Aang;
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
A partial specialization of CArrayNumeric for double numbers.
This class stores a time-stamped trajectory in SE(2) (mrpt::math::TPose2D poses).
Base class for SE(2)/SE(3) interpolators.
mrpt::poses::SE_traits< DIM >::lightweight_pose_t pose_t
TPose2D or TPose3D.
std::pair< mrpt::system::TTimeStamp, pose_t > TTimePosePair
The virtual base class which provides a unified interface for all persistent objects in MRPT.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
T angDistance(T from, T to)
Computes the shortest angular increment (or distance) between two planar orientations,...
void unwrap2PiSequence(VECTOR &x)
Modify a sequence of angle values such as no consecutive values have a jump larger than PI in absolut...
NUMTYPE spline(const NUMTYPE t, const VECTORLIKE &x, const VECTORLIKE &y, bool wrap2pi=false)
Interpolates the value of a function in a point "t" given 4 SORTED points where "t" is between the tw...
double BASE_IMPEXP interpolate2points(const double x, const double x0, const double y0, const double x1, const double y1, bool wrap2pi=false)
Linear interpolation/extrapolation: evaluates at "x" the line (x0,y0)-(x1,y1).
TInterpolatorMethod
Type to select the interpolation method in CPoseInterpolatorBase derived classes.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define THROW_EXCEPTION(msg)
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values,...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.