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