27 : robotPoseLocalization(0, 0, 0),
28 robotPoseOdometry(0, 0, 0),
29 relPoseSense(0, 0, 0),
30 relPoseVelCmd(0, 0, 0),
31 WS_targets_relative(),
33 cur_vel_local(0, 0, 0),
35 rel_cur_pose_wrt_last_vel_cmd_NOP(0, 0, 0),
36 rel_pose_PTG_origin_wrt_sense_NOP(0, 0, 0)
50 for (i = 0; i <
n; i++)
58 (
const void*)&(*
infoPerPTG[i].TP_Obstacles.begin()),
64 out <<
infoPerPTG[i].timeForTPObsTransformation
74 const bool there_is_ptg_data =
infoPerPTG[i].ptg ? true :
false;
75 out << there_is_ptg_data;
76 if (there_is_ptg_data) out <<
infoPerPTG[i].ptg;
175 for (i = 0; i <
n; i++)
182 ipp.TP_Obstacles.resize(m);
184 in.ReadBufferFixEndianness(&(*ipp.TP_Obstacles.begin()), m);
186 ipp.TP_Targets.clear();
191 in >> ipp.TP_Targets;
197 ipp.TP_Targets.push_back(trg);
204 ipp.TP_Targets.emplace_back(pos.x(), pos.y());
213 in >> ipp.timeForTPObsTransformation >>
214 ipp.timeForHolonomicMethod;
215 in >> ipp.desiredDirection >> ipp.desiredSpeed >>
220 in.ReadAsAndCastTo<float,
double>(
221 ipp.timeForTPObsTransformation);
222 in.ReadAsAndCastTo<float,
double>(
223 ipp.timeForHolonomicMethod);
224 in.ReadAsAndCastTo<float,
double>(ipp.desiredDirection);
225 in.ReadAsAndCastTo<float,
double>(ipp.desiredSpeed);
226 in.ReadAsAndCastTo<float,
double>(ipp.evaluation);
228 if (version >= 21 && version < 23)
230 double evaluation_org, evaluation_priority;
231 in >> evaluation_org >> evaluation_priority;
240 bool there_is_ptg_data;
241 in >> there_is_ptg_data;
242 if (there_is_ptg_data)
243 ipp.ptg = std::dynamic_pointer_cast<
251 std::vector<std::map<double, double>> raw_clearances;
252 in >> raw_clearances;
253 ipp.clearance.resize(
254 raw_clearances.size(), raw_clearances.size());
255 for (
size_t k = 0; k < raw_clearances.size(); k++)
256 ipp.clearance.get_path_clearance_decimated(k) =
261 ipp.clearance.readFromStream(
in);
266 ipp.clearance.clear();
283 in >> robotOdometryPose;
325 crel_pose_PTG_origin_wrt_sense_NOP;
326 in >> crel_cur_pose_wrt_last_vel_cmd_NOP >>
327 crel_pose_PTG_origin_wrt_sense_NOP;
329 crel_cur_pose_wrt_last_vel_cmd_NOP.
asTPose();
331 crel_pose_PTG_origin_wrt_sense_NOP.asTPose();
338 if (version >= 17 && version < 24)
355 std::vector<double> vel;
363 for (
size_t k = 0; k <
cmd_vel->getVelCmdLength(); k++)
364 cmd_vel->setVelCmdElement(i, vel[k]);
383 values[
"executionTime"] = old_exec_time;
393 if (
n)
in.ReadBufferFixEndianness(&(*prevV.
begin()),
n);
397 if (
n)
in.ReadBufferFixEndianness(&(*prevW.
begin()),
n);
401 if (
n)
in.ReadBufferFixEndianness(&(*prevSelPTG.
begin()),
n);
421 float actual_v, actual_w;
422 in >> actual_v >> actual_w;
433 if (version < 13 && version > 1)
435 float old_estim_period;
436 in >> old_estim_period;
437 values[
"estimatedExecutionPeriod"] = old_estim_period;
452 for (
unsigned int j = 0; j <
n; j++)
475 for (i = 0; i < n; i++) in >> dummy;
488 in >> navigatorBehavior;
494 in >> doorCrossing_P1 >> doorCrossing_P2;
498 if (version > 6 && version < 13)
514 if (version >= 12 && version < 15)
516 std::vector<std::vector<double>> dummy_cmd_vel_filterings;
517 in >> dummy_cmd_vel_filterings;
539 in >> crelPoseSense >> crelPoseVelCmd;
void readFromStream(mrpt::serialization::CArchive &in)
mrpt::math::TPose2D rel_cur_pose_wrt_last_vel_cmd_NOP
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
int32_t nSelectedPTG
The selected PTG.
std::vector< mrpt::math::TPose2D > WS_targets_relative
Relative poses (wrt to robotPoseLocalization) for.
mrpt::math::CVectorFloat robotShape_y
mrpt::math::TTwist2D cur_vel_local
The actual robot velocities in local (robot) coordinates, as read from sensors, in "m/sec" and "rad/s...
Template for column vectors of dynamic size, compatible with Eigen.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
GLboolean GLenum GLenum GLvoid * values
std::map< std::string, mrpt::system::TTimeStamp > timestamps
Known values:
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
mrpt::math::TPose2D rel_pose_PTG_origin_wrt_sense_NOP
mrpt::math::TPose2D robotPoseOdometry
size_type size() const
Get a 2-vector with [NROWS NCOLS] (as in MATLAB command size(x))
mrpt::math::TPose2D relPoseSense
uint32_t nPTGs
The number of PTGS:
void WriteBuffer(const void *Buffer, size_t Count)
Writes a block of bytes to the stream from Buffer.
A class for storing, saving and loading a reactive navigation log record for the CReactiveNavigationS...
GLubyte GLubyte GLubyte GLubyte w
mrpt::math::CVectorFloat robotShape_x
The robot shape in WS.
mrpt::math::TPose2D asTPose() const
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
mrpt::Clock::time_point TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState ptg_last_navDynState
This is the base class for any user-defined PTG.
mrpt::math::TPose2D robotPoseLocalization
The robot pose (from odometry and from the localization/SLAM system).
mrpt::kinematics::CVehicleVelCmd::Ptr cmd_vel
The final motion command sent to robot, in "m/sec" and "rad/sec".
mrpt::math::TTwist2D curVelLocal
Current vehicle velocity (local frame of reference)
int16_t ptg_index_NOP
Negative means no NOP mode evaluation, so the rest of "NOP variables" should be ignored.
mrpt::math::TPose2D relTarget
Current relative target location.
mrpt::maps::CSimplePointsMap WS_Obstacles_original
A class used to store a 2D point.
void writeToStream(mrpt::serialization::CArchive &out) const
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState navDynState
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
std::vector< TInfoPerPTG > infoPerPTG
The info for each applied PTG: must contain "nPTGs * nSecDistances" elements.
mrpt::kinematics::CVehicleVelCmd::Ptr cmd_vel_original
Motion command as comes out from the PTG, before scaling speed limit filtering.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
mrpt::math::TTwist2D cur_vel
The actual robot velocities in global (map) coordinates, as read from sensors, in "m/sec" and "rad/se...
void resize(std::size_t N, bool zeroNewElements=false)
mrpt::maps::CSimplePointsMap WS_Obstacles
The WS-Obstacles.
std::shared_ptr< CVehicleVelCmd > Ptr
unsigned __int32 uint32_t
Dynamic state that may affect the PTG path parameterization.
mrpt::math::TPose2D relPoseVelCmd
Kinematic model for Ackermann-like or differential-driven vehicles.
std::map< std::string, std::string > additional_debug_msgs
Additional debug traces.
double robotShape_radius
The circular robot radius.