YARP
Yet Another Robot Platform
OdometryData6D.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 // Autogenerated by Thrift Compiler (0.14.1-yarped)
7 //
8 // This is an automatically generated file.
9 // It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
10 
11 #ifndef YARP_THRIFT_GENERATOR_STRUCT_ODOMETRYDATA6D_H
12 #define YARP_THRIFT_GENERATOR_STRUCT_ODOMETRYDATA6D_H
13 
14 #include <yarp/dev/api.h>
15 
16 #include <yarp/os/Wire.h>
17 #include <yarp/os/idl/WireTypes.h>
18 
19 namespace yarp {
20 namespace dev {
21 
24 {
25 public:
26  // Fields
30  double odom_x;
34  double odom_y;
38  double odom_z;
42  double odom_roll;
46  double odom_pitch;
50  double odom_yaw;
54  double base_vel_x;
58  double base_vel_y;
62  double base_vel_z;
66  double base_vel_roll;
74  double base_vel_yaw;
78  double odom_vel_x;
82  double odom_vel_y;
86  double odom_vel_z;
90  double odom_vel_roll;
98  double odom_vel_yaw;
99 
100  // Default constructor
101  OdometryData6D();
102 
103  // Constructor with field values
104  OdometryData6D(const double odom_x,
105  const double odom_y,
106  const double odom_z,
107  const double odom_roll,
108  const double odom_pitch,
109  const double odom_yaw,
110  const double base_vel_x,
111  const double base_vel_y,
112  const double base_vel_z,
113  const double base_vel_roll,
114  const double base_vel_pitch,
115  const double base_vel_yaw,
116  const double odom_vel_x,
117  const double odom_vel_y,
118  const double odom_vel_z,
119  const double odom_vel_roll,
120  const double odom_vel_pitch,
121  const double odom_vel_yaw);
122 
123  // Read structure on a Wire
124  bool read(yarp::os::idl::WireReader& reader) override;
125 
126  // Read structure on a Connection
127  bool read(yarp::os::ConnectionReader& connection) override;
128 
129  // Write structure on a Wire
130  bool write(const yarp::os::idl::WireWriter& writer) const override;
131 
132  // Write structure on a Connection
133  bool write(yarp::os::ConnectionWriter& connection) const override;
134 
135  // Convert to a printable string
136  std::string toString() const;
137 
138  // If you want to serialize this class without nesting, use this helper
140 
141  class Editor :
142  public yarp::os::Wire,
143  public yarp::os::PortWriter
144  {
145  public:
146  // Editor: default constructor
147  Editor();
148 
149  // Editor: constructor with base class
150  Editor(OdometryData6D& obj);
151 
152  // Editor: destructor
153  ~Editor() override;
154 
155  // Editor: Deleted constructors and operator=
156  Editor(const Editor& rhs) = delete;
157  Editor(Editor&& rhs) = delete;
158  Editor& operator=(const Editor& rhs) = delete;
159  Editor& operator=(Editor&& rhs) = delete;
160 
161  // Editor: edit
162  bool edit(OdometryData6D& obj, bool dirty = true);
163 
164  // Editor: validity check
165  bool isValid() const;
166 
167  // Editor: state
168  OdometryData6D& state();
169 
170  // Editor: start editing
171  void start_editing();
172 
173 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2
174  YARP_DEPRECATED_MSG("Use start_editing() instead")
175  void begin()
176  {
177  start_editing();
178  }
179 #endif // YARP_NO_DEPRECATED
180 
181  // Editor: stop editing
182  void stop_editing();
183 
184 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2
185  YARP_DEPRECATED_MSG("Use stop_editing() instead")
186  void end()
187  {
188  stop_editing();
189  }
190 #endif // YARP_NO_DEPRECATED
191 
192  // Editor: odom_x field
193  void set_odom_x(const double odom_x);
194  double get_odom_x() const;
195  virtual bool will_set_odom_x();
196  virtual bool did_set_odom_x();
197 
198  // Editor: odom_y field
199  void set_odom_y(const double odom_y);
200  double get_odom_y() const;
201  virtual bool will_set_odom_y();
202  virtual bool did_set_odom_y();
203 
204  // Editor: odom_z field
205  void set_odom_z(const double odom_z);
206  double get_odom_z() const;
207  virtual bool will_set_odom_z();
208  virtual bool did_set_odom_z();
209 
210  // Editor: odom_roll field
211  void set_odom_roll(const double odom_roll);
212  double get_odom_roll() const;
213  virtual bool will_set_odom_roll();
214  virtual bool did_set_odom_roll();
215 
216  // Editor: odom_pitch field
217  void set_odom_pitch(const double odom_pitch);
218  double get_odom_pitch() const;
219  virtual bool will_set_odom_pitch();
220  virtual bool did_set_odom_pitch();
221 
222  // Editor: odom_yaw field
223  void set_odom_yaw(const double odom_yaw);
224  double get_odom_yaw() const;
225  virtual bool will_set_odom_yaw();
226  virtual bool did_set_odom_yaw();
227 
228  // Editor: base_vel_x field
229  void set_base_vel_x(const double base_vel_x);
230  double get_base_vel_x() const;
231  virtual bool will_set_base_vel_x();
232  virtual bool did_set_base_vel_x();
233 
234  // Editor: base_vel_y field
235  void set_base_vel_y(const double base_vel_y);
236  double get_base_vel_y() const;
237  virtual bool will_set_base_vel_y();
238  virtual bool did_set_base_vel_y();
239 
240  // Editor: base_vel_z field
241  void set_base_vel_z(const double base_vel_z);
242  double get_base_vel_z() const;
243  virtual bool will_set_base_vel_z();
244  virtual bool did_set_base_vel_z();
245 
246  // Editor: base_vel_roll field
247  void set_base_vel_roll(const double base_vel_roll);
248  double get_base_vel_roll() const;
249  virtual bool will_set_base_vel_roll();
250  virtual bool did_set_base_vel_roll();
251 
252  // Editor: base_vel_pitch field
253  void set_base_vel_pitch(const double base_vel_pitch);
254  double get_base_vel_pitch() const;
255  virtual bool will_set_base_vel_pitch();
256  virtual bool did_set_base_vel_pitch();
257 
258  // Editor: base_vel_yaw field
259  void set_base_vel_yaw(const double base_vel_yaw);
260  double get_base_vel_yaw() const;
261  virtual bool will_set_base_vel_yaw();
262  virtual bool did_set_base_vel_yaw();
263 
264  // Editor: odom_vel_x field
265  void set_odom_vel_x(const double odom_vel_x);
266  double get_odom_vel_x() const;
267  virtual bool will_set_odom_vel_x();
268  virtual bool did_set_odom_vel_x();
269 
270  // Editor: odom_vel_y field
271  void set_odom_vel_y(const double odom_vel_y);
272  double get_odom_vel_y() const;
273  virtual bool will_set_odom_vel_y();
274  virtual bool did_set_odom_vel_y();
275 
276  // Editor: odom_vel_z field
277  void set_odom_vel_z(const double odom_vel_z);
278  double get_odom_vel_z() const;
279  virtual bool will_set_odom_vel_z();
280  virtual bool did_set_odom_vel_z();
281 
282  // Editor: odom_vel_roll field
283  void set_odom_vel_roll(const double odom_vel_roll);
284  double get_odom_vel_roll() const;
285  virtual bool will_set_odom_vel_roll();
286  virtual bool did_set_odom_vel_roll();
287 
288  // Editor: odom_vel_pitch field
289  void set_odom_vel_pitch(const double odom_vel_pitch);
290  double get_odom_vel_pitch() const;
291  virtual bool will_set_odom_vel_pitch();
292  virtual bool did_set_odom_vel_pitch();
293 
294  // Editor: odom_vel_yaw field
295  void set_odom_vel_yaw(const double odom_vel_yaw);
296  double get_odom_vel_yaw() const;
297  virtual bool will_set_odom_vel_yaw();
298  virtual bool did_set_odom_vel_yaw();
299 
300  // Editor: clean
301  void clean();
302 
303  // Editor: read
304  bool read(yarp::os::ConnectionReader& connection) override;
305 
306  // Editor: write
307  bool write(yarp::os::ConnectionWriter& connection) const override;
308 
309  private:
310  // Editor: state
311  OdometryData6D* obj;
312  bool obj_owned;
313  int group;
314 
315  // Editor: dirty variables
316  bool is_dirty;
317  bool is_dirty_odom_x;
318  bool is_dirty_odom_y;
319  bool is_dirty_odom_z;
320  bool is_dirty_odom_roll;
321  bool is_dirty_odom_pitch;
322  bool is_dirty_odom_yaw;
323  bool is_dirty_base_vel_x;
324  bool is_dirty_base_vel_y;
325  bool is_dirty_base_vel_z;
326  bool is_dirty_base_vel_roll;
327  bool is_dirty_base_vel_pitch;
328  bool is_dirty_base_vel_yaw;
329  bool is_dirty_odom_vel_x;
330  bool is_dirty_odom_vel_y;
331  bool is_dirty_odom_vel_z;
332  bool is_dirty_odom_vel_roll;
333  bool is_dirty_odom_vel_pitch;
334  bool is_dirty_odom_vel_yaw;
335  int dirty_count;
336 
337  // Editor: send if possible
338  void communicate();
339 
340  // Editor: mark dirty overall
341  void mark_dirty();
342 
343  // Editor: mark dirty single fields
344  void mark_dirty_odom_x();
345  void mark_dirty_odom_y();
346  void mark_dirty_odom_z();
347  void mark_dirty_odom_roll();
348  void mark_dirty_odom_pitch();
349  void mark_dirty_odom_yaw();
350  void mark_dirty_base_vel_x();
351  void mark_dirty_base_vel_y();
352  void mark_dirty_base_vel_z();
353  void mark_dirty_base_vel_roll();
354  void mark_dirty_base_vel_pitch();
355  void mark_dirty_base_vel_yaw();
356  void mark_dirty_odom_vel_x();
357  void mark_dirty_odom_vel_y();
358  void mark_dirty_odom_vel_z();
359  void mark_dirty_odom_vel_roll();
360  void mark_dirty_odom_vel_pitch();
361  void mark_dirty_odom_vel_yaw();
362 
363  // Editor: dirty_flags
364  void dirty_flags(bool flag);
365  };
366 
367 private:
368  // read/write odom_x field
369  bool read_odom_x(yarp::os::idl::WireReader& reader);
370  bool write_odom_x(const yarp::os::idl::WireWriter& writer) const;
371  bool nested_read_odom_x(yarp::os::idl::WireReader& reader);
372  bool nested_write_odom_x(const yarp::os::idl::WireWriter& writer) const;
373 
374  // read/write odom_y field
375  bool read_odom_y(yarp::os::idl::WireReader& reader);
376  bool write_odom_y(const yarp::os::idl::WireWriter& writer) const;
377  bool nested_read_odom_y(yarp::os::idl::WireReader& reader);
378  bool nested_write_odom_y(const yarp::os::idl::WireWriter& writer) const;
379 
380  // read/write odom_z field
381  bool read_odom_z(yarp::os::idl::WireReader& reader);
382  bool write_odom_z(const yarp::os::idl::WireWriter& writer) const;
383  bool nested_read_odom_z(yarp::os::idl::WireReader& reader);
384  bool nested_write_odom_z(const yarp::os::idl::WireWriter& writer) const;
385 
386  // read/write odom_roll field
387  bool read_odom_roll(yarp::os::idl::WireReader& reader);
388  bool write_odom_roll(const yarp::os::idl::WireWriter& writer) const;
389  bool nested_read_odom_roll(yarp::os::idl::WireReader& reader);
390  bool nested_write_odom_roll(const yarp::os::idl::WireWriter& writer) const;
391 
392  // read/write odom_pitch field
393  bool read_odom_pitch(yarp::os::idl::WireReader& reader);
394  bool write_odom_pitch(const yarp::os::idl::WireWriter& writer) const;
395  bool nested_read_odom_pitch(yarp::os::idl::WireReader& reader);
396  bool nested_write_odom_pitch(const yarp::os::idl::WireWriter& writer) const;
397 
398  // read/write odom_yaw field
399  bool read_odom_yaw(yarp::os::idl::WireReader& reader);
400  bool write_odom_yaw(const yarp::os::idl::WireWriter& writer) const;
401  bool nested_read_odom_yaw(yarp::os::idl::WireReader& reader);
402  bool nested_write_odom_yaw(const yarp::os::idl::WireWriter& writer) const;
403 
404  // read/write base_vel_x field
405  bool read_base_vel_x(yarp::os::idl::WireReader& reader);
406  bool write_base_vel_x(const yarp::os::idl::WireWriter& writer) const;
407  bool nested_read_base_vel_x(yarp::os::idl::WireReader& reader);
408  bool nested_write_base_vel_x(const yarp::os::idl::WireWriter& writer) const;
409 
410  // read/write base_vel_y field
411  bool read_base_vel_y(yarp::os::idl::WireReader& reader);
412  bool write_base_vel_y(const yarp::os::idl::WireWriter& writer) const;
413  bool nested_read_base_vel_y(yarp::os::idl::WireReader& reader);
414  bool nested_write_base_vel_y(const yarp::os::idl::WireWriter& writer) const;
415 
416  // read/write base_vel_z field
417  bool read_base_vel_z(yarp::os::idl::WireReader& reader);
418  bool write_base_vel_z(const yarp::os::idl::WireWriter& writer) const;
419  bool nested_read_base_vel_z(yarp::os::idl::WireReader& reader);
420  bool nested_write_base_vel_z(const yarp::os::idl::WireWriter& writer) const;
421 
422  // read/write base_vel_roll field
423  bool read_base_vel_roll(yarp::os::idl::WireReader& reader);
424  bool write_base_vel_roll(const yarp::os::idl::WireWriter& writer) const;
425  bool nested_read_base_vel_roll(yarp::os::idl::WireReader& reader);
426  bool nested_write_base_vel_roll(const yarp::os::idl::WireWriter& writer) const;
427 
428  // read/write base_vel_pitch field
429  bool read_base_vel_pitch(yarp::os::idl::WireReader& reader);
430  bool write_base_vel_pitch(const yarp::os::idl::WireWriter& writer) const;
431  bool nested_read_base_vel_pitch(yarp::os::idl::WireReader& reader);
432  bool nested_write_base_vel_pitch(const yarp::os::idl::WireWriter& writer) const;
433 
434  // read/write base_vel_yaw field
435  bool read_base_vel_yaw(yarp::os::idl::WireReader& reader);
436  bool write_base_vel_yaw(const yarp::os::idl::WireWriter& writer) const;
437  bool nested_read_base_vel_yaw(yarp::os::idl::WireReader& reader);
438  bool nested_write_base_vel_yaw(const yarp::os::idl::WireWriter& writer) const;
439 
440  // read/write odom_vel_x field
441  bool read_odom_vel_x(yarp::os::idl::WireReader& reader);
442  bool write_odom_vel_x(const yarp::os::idl::WireWriter& writer) const;
443  bool nested_read_odom_vel_x(yarp::os::idl::WireReader& reader);
444  bool nested_write_odom_vel_x(const yarp::os::idl::WireWriter& writer) const;
445 
446  // read/write odom_vel_y field
447  bool read_odom_vel_y(yarp::os::idl::WireReader& reader);
448  bool write_odom_vel_y(const yarp::os::idl::WireWriter& writer) const;
449  bool nested_read_odom_vel_y(yarp::os::idl::WireReader& reader);
450  bool nested_write_odom_vel_y(const yarp::os::idl::WireWriter& writer) const;
451 
452  // read/write odom_vel_z field
453  bool read_odom_vel_z(yarp::os::idl::WireReader& reader);
454  bool write_odom_vel_z(const yarp::os::idl::WireWriter& writer) const;
455  bool nested_read_odom_vel_z(yarp::os::idl::WireReader& reader);
456  bool nested_write_odom_vel_z(const yarp::os::idl::WireWriter& writer) const;
457 
458  // read/write odom_vel_roll field
459  bool read_odom_vel_roll(yarp::os::idl::WireReader& reader);
460  bool write_odom_vel_roll(const yarp::os::idl::WireWriter& writer) const;
461  bool nested_read_odom_vel_roll(yarp::os::idl::WireReader& reader);
462  bool nested_write_odom_vel_roll(const yarp::os::idl::WireWriter& writer) const;
463 
464  // read/write odom_vel_pitch field
465  bool read_odom_vel_pitch(yarp::os::idl::WireReader& reader);
466  bool write_odom_vel_pitch(const yarp::os::idl::WireWriter& writer) const;
467  bool nested_read_odom_vel_pitch(yarp::os::idl::WireReader& reader);
468  bool nested_write_odom_vel_pitch(const yarp::os::idl::WireWriter& writer) const;
469 
470  // read/write odom_vel_yaw field
471  bool read_odom_vel_yaw(yarp::os::idl::WireReader& reader);
472  bool write_odom_vel_yaw(const yarp::os::idl::WireWriter& writer) const;
473  bool nested_read_odom_vel_yaw(yarp::os::idl::WireReader& reader);
474  bool nested_write_odom_vel_yaw(const yarp::os::idl::WireWriter& writer) const;
475 };
476 
477 } // namespace yarp
478 } // namespace dev
479 
480 #endif // YARP_THRIFT_GENERATOR_STRUCT_ODOMETRYDATA6D_H
Editor & operator=(Editor &&rhs)=delete
Editor & operator=(const Editor &rhs)=delete
Editor(const Editor &rhs)=delete
double base_vel_x
velocity of the robot [m/s] expressed in the robot reference frame
double odom_yaw
orientation the robot [deg], expressed in the world reference frame
double base_vel_yaw
angular velocity of the robot [deg/s] expressed in the robot reference frame
yarp::os::idl::Unwrapped< OdometryData6D > unwrapped
double base_vel_roll
angular velocity of the robot [deg/s] expressed in the robot reference frame
double base_vel_y
velocity of the robot [m/s] expressed in the robot reference frame
double odom_y
position of the robot [m], expressed in the world reference frame
double odom_pitch
orientation the robot [deg], expressed in the world reference frame
double odom_vel_z
velocity of the robot [m/s] expressed in the world reference frame
double odom_vel_x
velocity of the robot [m/s] expressed in the world reference frame
double odom_vel_y
velocity of the robot [m/s] expressed in the world reference frame
double odom_roll
orientation the robot [deg], expressed in the world reference frame
double odom_z
position of the robot [m], expressed in the world reference frame
double odom_x
position of the robot [m], expressed in the world reference frame
double odom_vel_pitch
angular velocity of the robot [deg/s] expressed in the world reference frame
double odom_vel_yaw
angular velocity of the robot [deg/s] expressed in the world reference frame
double odom_vel_roll
angular velocity of the robot [deg/s] expressed in the world reference frame
double base_vel_pitch
angular velocity of the robot [deg/s] expressed in the robot reference frame
double base_vel_z
velocity of the robot [m/s] expressed in the robot reference frame
An interface for reading from a network connection.
An interface for writing to a network connection.
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:24
Base class for IDL client/server.
Definition: Wire.h:19
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
Definition: WirePortable.h:23
IDL-friendly connection reader.
Definition: WireReader.h:30
IDL-friendly connection writer.
Definition: WireWriter.h:30
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
Definition: compiler.h:2885
std::string toString(const T &value)
convert an arbitrary type to string.
bool isValid()
Check if time is valid (non-zero).
Definition: Time.cpp:314
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
Definition: ImageFile.cpp:922
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:1098
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18