MRPT  2.0.0
CVehicleVelCmd_Holo.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
12 
13 namespace mrpt::kinematics
14 {
15 /** Kinematic model for
16  *
17  * \ingroup mrpt_kinematics_grp
18  */
20 {
22  public:
23  /** speed(m / s) */
24  double vel{.0};
25  /**: direction, **relative** to the current robot heading (radians). 0 means
26  * forward. */
27  double dir_local{.0};
28  /**: Blending time between current and target time. */
29  double ramp_time{.0};
30  /**: (rad/s) rotational speed for rotating such as the robot slowly faces
31  * forward. */
32  double rot_speed{.0};
33 
36  double vel, double dir_local, double ramp_time, double rot_speed);
37  ~CVehicleVelCmd_Holo() override;
38  size_t getVelCmdLength() const override;
39  std::string getVelCmdDescription(const int index) const override;
40  double getVelCmdElement(const int index) const override;
41  void setVelCmdElement(const int index, const double val) override;
42  bool isStopCmd() const override;
43  void setToStop() override;
44 
45  // See base class docs.
46  void cmdVel_scale(double vel_scale) override;
47  double cmdVel_limits(
48  const mrpt::kinematics::CVehicleVelCmd& prev_vel_cmd, const double beta,
49  const TVelCmdParams& params) override;
50 };
51 
52 } // namespace mrpt::kinematics
std::string getVelCmdDescription(const int index) const override
Get textual, human-readable description of each velocity command component.
void cmdVel_scale(double vel_scale) override
Scale the velocity command encoded in this object.
mrpt::vision::TStereoCalibParams params
size_t getVelCmdLength() const override
Get number of components in each velocity command.
void setToStop() override
Set to a command that means "do not move" / "stop".
Virtual base for velocity commands of different kinematic models of planar mobile robot...
double ramp_time
: Blending time between current and target time.
void setVelCmdElement(const int index, const double val) override
Set each velocity command component.
double dir_local
: direction, relative to the current robot heading (radians).
int val
Definition: mrpt_jpeglib.h:957
double getVelCmdElement(const int index) const override
Get each velocity command component.
double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams &params) override
Updates this command, computing a blended version of beta (within [0,1]) of vel_cmd and 1-beta of pre...
bool isStopCmd() const override
Returns true if the command means "do not move" / "stop".
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
double rot_speed
: (rad/s) rotational speed for rotating such as the robot slowly faces forward.



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020