NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gait_command.h
1 // Gait command structure for the generic gait motion module
2 // File: gait_command.h
3 // Author: Philipp Allgeuer <pallgeuer@ais.uni-bonn.de>
4 
5 // Ensure header is only included once
6 #ifndef GAIT_COMMAND_H
7 #define GAIT_COMMAND_H
8 
9 // Includes
10 #include <cmath>
11 
12 // Gait namespace
13 namespace gait
14 {
20  struct GaitCommand
21  {
23  GaitCommand() { reset(); }
24 
26  void reset(bool shouldWalk = false)
27  {
28  linVelX = 0.0;
29  linVelY = 0.0;
30  angVelZ = 0.0;
31  walk = shouldWalk;
32  }
33 
35  bool isFinite() const { return (std::isfinite(linVelX) && std::isfinite(linVelY) && std::isfinite(angVelZ)); }
36 
37  // Gait command velocity vector
38  float linVelX;
39  float linVelY;
40  float angVelZ;
41 
42  // Flags
43  bool walk;
44  };
45 }
46 
47 #endif /* GAIT_COMMAND_H */
48 // EOF
bool isFinite() const
Check whether the gait command is finite.
Definition: gait_command.h:35
Gait command data structure.
Definition: gait_command.h:20
float angVelZ
Commanded angular z-velocity.
Definition: gait_command.h:40
void reset(bool shouldWalk=false)
Reset function.
Definition: gait_command.h:26
float linVelX
Commanded linear x-velocity.
Definition: gait_command.h:38
float linVelY
Commanded linear y-velocity.
Definition: gait_command.h:39
GaitCommand()
Default constructor.
Definition: gait_command.h:23
bool walk
Flag whether to walk or not.
Definition: gait_command.h:43