gusimplewhiteboard
NaoWalkCommand.hpp
Go to the documentation of this file.
1/*
2 * file NaoWalkCommand.hpp
3 *
4 * This file was generated by classgenerator from naoWalkCommand.gen.
5 * DO NOT CHANGE MANUALLY!
6 *
7 * Copyright © 2021 Carl Lusty. All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * 2. Redistributions in binary form must reproduce the above
17 * copyright notice, this list of conditions and the following
18 * disclaimer in the documentation and/or other materials
19 * provided with the distribution.
20 *
21 * 3. All advertising materials mentioning features or use of this
22 * software must display the following acknowledgement:
23 *
24 * This product includes software developed by Carl Lusty.
25 *
26 * 4. Neither the name of the author nor the names of contributors
27 * may be used to endorse or promote products derived from this
28 * software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
34 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
35 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
36 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
37 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
38 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
39 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
40 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 *
42 * -----------------------------------------------------------------------
43 * This program is free software; you can redistribute it and/or
44 * modify it under the above terms or under the terms of the GNU
45 * General Public License as published by the Free Software Foundation;
46 * either version 2 of the License, or (at your option) any later version.
47 *
48 * This program is distributed in the hope that it will be useful,
49 * but WITHOUT ANY WARRANTY; without even the implied warranty of
50 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 * GNU General Public License for more details.
52 *
53 * You should have received a copy of the GNU General Public License
54 * along with this program; if not, see http://www.gnu.org/licenses/
55 * or write to the Free Software Foundation, Inc., 51 Franklin Street,
56 * Fifth Floor, Boston, MA 02110-1301, USA.
57 *
58 */
59
60#ifndef guWhiteboard_NaoWalkCommand_h
61#define guWhiteboard_NaoWalkCommand_h
62
63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
64#include <cstdlib>
65#include <string.h>
66#include <sstream>
67#endif
68
69#include <gu_util.h>
70#include "wb_nao_walk_command.h"
71
72#undef guWhiteboard_NaoWalkCommand_DEFINED
73#define guWhiteboard_NaoWalkCommand_DEFINED
74
75#undef NaoWalkCommand_DEFINED
76#define NaoWalkCommand_DEFINED
77
78namespace guWhiteboard {
79
84
85 private:
86
90 void init(bool t_walkEngineOn = false, int16_t t_forward = 0, int16_t t_left = 0, int8_t t_turn = 0, bool t_exactStepsRequested = false, uint8_t t_speed = 100, uint8_t t_odometryResetCounter = 0, bool t_isFast = false, bool t_kickWithLeftFoot = true, bool t_useShuffle = true, bool t_leftArmLimp = false, bool t_rightArmLimp = false, uint8_t t_power = 0, uint8_t t_bend = 0) {
91 set_walkEngineOn(t_walkEngineOn);
92 set_forward(t_forward);
93 set_left(t_left);
94 set_turn(t_turn);
95 set_exactStepsRequested(t_exactStepsRequested);
96 set_speed(t_speed);
97 set_odometryResetCounter(t_odometryResetCounter);
98 set_isFast(t_isFast);
99 set_kickWithLeftFoot(t_kickWithLeftFoot);
100 set_useShuffle(t_useShuffle);
101 set_leftArmLimp(t_leftArmLimp);
102 set_rightArmLimp(t_rightArmLimp);
103 set_power(t_power);
104 set_bend(t_bend);
105 }
106
107 public:
108
112 NaoWalkCommand(bool t_walkEngineOn = false, int16_t t_forward = 0, int16_t t_left = 0, int8_t t_turn = 0, bool t_exactStepsRequested = false, uint8_t t_speed = 100, uint8_t t_odometryResetCounter = 0, bool t_isFast = false, bool t_kickWithLeftFoot = true, bool t_useShuffle = true, bool t_leftArmLimp = false, bool t_rightArmLimp = false, uint8_t t_power = 0, uint8_t t_bend = 0) {
113 this->init(t_walkEngineOn, t_forward, t_left, t_turn, t_exactStepsRequested, t_speed, t_odometryResetCounter, t_isFast, t_kickWithLeftFoot, t_useShuffle, t_leftArmLimp, t_rightArmLimp, t_power, t_bend);
114 }
115
120 this->init(t_other.walkEngineOn(), t_other.forward(), t_other.left(), t_other.turn(), t_other.exactStepsRequested(), t_other.speed(), t_other.odometryResetCounter(), t_other.isFast(), t_other.kickWithLeftFoot(), t_other.useShuffle(), t_other.leftArmLimp(), t_other.rightArmLimp(), t_other.power(), t_other.bend());
121 }
122
127 this->init(t_other.walkEngineOn, t_other.forward, t_other.left, t_other.turn, t_other.exactStepsRequested, t_other.speed, t_other.odometryResetCounter, t_other.isFast, t_other.kickWithLeftFoot, t_other.useShuffle, t_other.leftArmLimp, t_other.rightArmLimp, t_other.power, t_other.bend);
128 }
129
134 this->init(t_other.walkEngineOn(), t_other.forward(), t_other.left(), t_other.turn(), t_other.exactStepsRequested(), t_other.speed(), t_other.odometryResetCounter(), t_other.isFast(), t_other.kickWithLeftFoot(), t_other.useShuffle(), t_other.leftArmLimp(), t_other.rightArmLimp(), t_other.power(), t_other.bend());
135 return *this;
136 }
137
142 this->init(t_other.walkEngineOn, t_other.forward, t_other.left, t_other.turn, t_other.exactStepsRequested, t_other.speed, t_other.odometryResetCounter, t_other.isFast, t_other.kickWithLeftFoot, t_other.useShuffle, t_other.leftArmLimp, t_other.rightArmLimp, t_other.power, t_other.bend);
143 return *this;
144 }
145
146 bool operator ==(const NaoWalkCommand &t_other) const
147 {
148 return walkEngineOn() == t_other.walkEngineOn()
149 && forward() == t_other.forward()
150 && left() == t_other.left()
151 && turn() == t_other.turn()
153 && speed() == t_other.speed()
155 && isFast() == t_other.isFast()
156 && kickWithLeftFoot() == t_other.kickWithLeftFoot()
157 && useShuffle() == t_other.useShuffle()
158 && leftArmLimp() == t_other.leftArmLimp()
159 && rightArmLimp() == t_other.rightArmLimp()
160 && power() == t_other.power()
161 && bend() == t_other.bend();
162 }
163
164 bool operator !=(const NaoWalkCommand &t_other) const
165 {
166 return !(*this == t_other);
167 }
168
169 bool operator ==(const wb_nao_walk_command &t_other) const
170 {
171 return *this == NaoWalkCommand(t_other);
172 }
173
174 bool operator !=(const wb_nao_walk_command &t_other) const
175 {
176 return !(*this == t_other);
177 }
178
180 {
182 }
183
184 const bool & walkEngineOn() const
185 {
187 }
188
189 void set_walkEngineOn(const bool &t_newValue)
190 {
192 }
193
194 int16_t & forward()
195 {
197 }
198
199 const int16_t & forward() const
200 {
202 }
203
204 void set_forward(const int16_t &t_newValue)
205 {
206 wb_nao_walk_command::forward = t_newValue;
207 }
208
209 int16_t & left()
210 {
212 }
213
214 const int16_t & left() const
215 {
217 }
218
219 void set_left(const int16_t &t_newValue)
220 {
221 wb_nao_walk_command::left = t_newValue;
222 }
223
224 int8_t & turn()
225 {
227 }
228
229 const int8_t & turn() const
230 {
232 }
233
234 void set_turn(const int8_t &t_newValue)
235 {
236 wb_nao_walk_command::turn = t_newValue;
237 }
238
240 {
242 }
243
244 const bool & exactStepsRequested() const
245 {
247 }
248
249 void set_exactStepsRequested(const bool &t_newValue)
250 {
252 }
253
254 uint8_t & speed()
255 {
257 }
258
259 const uint8_t & speed() const
260 {
262 }
263
264 void set_speed(const uint8_t &t_newValue)
265 {
266 wb_nao_walk_command::speed = t_newValue;
267 }
268
270 {
272 }
273
274 const uint8_t & odometryResetCounter() const
275 {
277 }
278
279 void set_odometryResetCounter(const uint8_t &t_newValue)
280 {
282 }
283
284 bool & isFast()
285 {
287 }
288
289 const bool & isFast() const
290 {
292 }
293
294 void set_isFast(const bool &t_newValue)
295 {
296 wb_nao_walk_command::isFast = t_newValue;
297 }
298
300 {
302 }
303
304 const bool & kickWithLeftFoot() const
305 {
307 }
308
309 void set_kickWithLeftFoot(const bool &t_newValue)
310 {
312 }
313
314 bool & useShuffle()
315 {
317 }
318
319 const bool & useShuffle() const
320 {
322 }
323
324 void set_useShuffle(const bool &t_newValue)
325 {
327 }
328
329 bool & leftArmLimp()
330 {
332 }
333
334 const bool & leftArmLimp() const
335 {
337 }
338
339 void set_leftArmLimp(const bool &t_newValue)
340 {
342 }
343
345 {
347 }
348
349 const bool & rightArmLimp() const
350 {
352 }
353
354 void set_rightArmLimp(const bool &t_newValue)
355 {
357 }
358
359 uint8_t & power()
360 {
362 }
363
364 const uint8_t & power() const
365 {
367 }
368
369 void set_power(const uint8_t &t_newValue)
370 {
371 wb_nao_walk_command::power = t_newValue;
372 }
373
374 uint8_t & bend()
375 {
377 }
378
379 const uint8_t & bend() const
380 {
382 }
383
384 void set_bend(const uint8_t &t_newValue)
385 {
386 wb_nao_walk_command::bend = t_newValue;
387 }
388
389#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
393 NaoWalkCommand(const std::string &t_str) {
394 this->init();
395 this->from_string(t_str);
396 }
397
398 std::string description() {
399#ifdef USE_WB_NAO_WALK_COMMAND_C_CONVERSION
401 wb_nao_walk_command_description(this, buffer, sizeof(buffer));
402 std::string descr = buffer;
403 return descr;
404#else
405 std::ostringstream ss;
406 ss << "walkEngineOn=" << (this->walkEngineOn() ? "true" : "false");
407 ss << ", ";
408 ss << "forward=" << static_cast<signed>(this->forward());
409 ss << ", ";
410 ss << "left=" << static_cast<signed>(this->left());
411 ss << ", ";
412 ss << "turn=" << static_cast<signed>(this->turn());
413 ss << ", ";
414 ss << "exactStepsRequested=" << (this->exactStepsRequested() ? "true" : "false");
415 ss << ", ";
416 ss << "speed=" << static_cast<unsigned>(this->speed());
417 ss << ", ";
418 ss << "odometryResetCounter=" << static_cast<unsigned>(this->odometryResetCounter());
419 ss << ", ";
420 ss << "isFast=" << (this->isFast() ? "true" : "false");
421 ss << ", ";
422 ss << "kickWithLeftFoot=" << (this->kickWithLeftFoot() ? "true" : "false");
423 ss << ", ";
424 ss << "useShuffle=" << (this->useShuffle() ? "true" : "false");
425 ss << ", ";
426 ss << "leftArmLimp=" << (this->leftArmLimp() ? "true" : "false");
427 ss << ", ";
428 ss << "rightArmLimp=" << (this->rightArmLimp() ? "true" : "false");
429 ss << ", ";
430 ss << "power=" << static_cast<unsigned>(this->power());
431 ss << ", ";
432 ss << "bend=" << static_cast<unsigned>(this->bend());
433 return ss.str();
434#endif
435 }
436
437 std::string to_string() {
438#ifdef USE_WB_NAO_WALK_COMMAND_C_CONVERSION
440 wb_nao_walk_command_to_string(this, buffer, sizeof(buffer));
441 std::string toString = buffer;
442 return toString;
443#else
444 std::ostringstream ss;
445 ss << (this->walkEngineOn() ? "true" : "false");
446 ss << ", ";
447 ss << static_cast<signed>(this->forward());
448 ss << ", ";
449 ss << static_cast<signed>(this->left());
450 ss << ", ";
451 ss << static_cast<signed>(this->turn());
452 ss << ", ";
453 ss << (this->exactStepsRequested() ? "true" : "false");
454 ss << ", ";
455 ss << static_cast<unsigned>(this->speed());
456 ss << ", ";
457 ss << static_cast<unsigned>(this->odometryResetCounter());
458 ss << ", ";
459 ss << (this->isFast() ? "true" : "false");
460 ss << ", ";
461 ss << (this->kickWithLeftFoot() ? "true" : "false");
462 ss << ", ";
463 ss << (this->useShuffle() ? "true" : "false");
464 ss << ", ";
465 ss << (this->leftArmLimp() ? "true" : "false");
466 ss << ", ";
467 ss << (this->rightArmLimp() ? "true" : "false");
468 ss << ", ";
469 ss << static_cast<unsigned>(this->power());
470 ss << ", ";
471 ss << static_cast<unsigned>(this->bend());
472 return ss.str();
473#endif
474 }
475
476#ifdef USE_WB_NAO_WALK_COMMAND_C_CONVERSION
477 void from_string(const std::string &t_str) {
478 wb_nao_walk_command_from_string(this, t_str.c_str());
479#else
480 void from_string(const std::string &t_str) {
481 char * str_cstr = const_cast<char *>(t_str.c_str());
482 size_t temp_length = strlen(str_cstr);
483 int length = (temp_length <= INT_MAX) ? static_cast<int>(static_cast<ssize_t>(temp_length)) : -1;
484 if (length < 1 || length > NAOWALKCOMMAND_DESC_BUFFER_SIZE) {
485 return;
486 }
487 char var_str_buffer[NAOWALKCOMMAND_DESC_BUFFER_SIZE + 1];
488 char* var_str = &var_str_buffer[0];
489 char key_buffer[21];
490 char* key = &key_buffer[0];
491 int bracecount = 0;
492 int startVar = 0;
493 int index = 0;
494 int startKey = 0;
495 int endKey = -1;
496 int varIndex = 0;
497 if (index == 0 && str_cstr[0] == '{') {
498 index = 1;
499 }
500 startVar = index;
501 startKey = startVar;
502 do {
503 for (int i = index; i < length; i++) {
504 index = i + 1;
505 if (bracecount == 0 && str_cstr[i] == '=') {
506 endKey = i - 1;
507 startVar = index;
508 continue;
509 }
510 if (bracecount == 0 && isspace(str_cstr[i])) {
511 startVar = index;
512 if (endKey == -1) {
513 startKey = index;
514 }
515 continue;
516 }
517 if (bracecount == 0 && str_cstr[i] == ',') {
518 index = i - 1;
519 break;
520 }
521 if (str_cstr[i] == '{') {
522 bracecount++;
523 continue;
524 }
525 if (str_cstr[i] == '}') {
526 bracecount--;
527 if (bracecount < 0) {
528 index = i - 1;
529 break;
530 }
531 }
532 if (i == length - 1) {
533 index = i;
534 }
535 }
536 if (endKey >= startKey && endKey - startKey < length) {
537 strncpy(key, str_cstr + startKey, static_cast<size_t>((endKey - startKey) + 1));
538 key[(endKey - startKey) + 1] = 0;
539 } else {
540 key[0] = 0;
541 }
542 strncpy(var_str, str_cstr + startVar, static_cast<size_t>((index - startVar) + 1));
543 var_str[(index - startVar) + 1] = 0;
544 bracecount = 0;
545 index += 2;
546 startVar = index;
547 startKey = startVar;
548 endKey = -1;
549 if (strlen(key) > 0) {
550 if (0 == strcmp("walkEngineOn", key)) {
551 varIndex = 0;
552 } else if (0 == strcmp("forward", key)) {
553 varIndex = 1;
554 } else if (0 == strcmp("left", key)) {
555 varIndex = 2;
556 } else if (0 == strcmp("turn", key)) {
557 varIndex = 3;
558 } else if (0 == strcmp("exactStepsRequested", key)) {
559 varIndex = 4;
560 } else if (0 == strcmp("speed", key)) {
561 varIndex = 5;
562 } else if (0 == strcmp("odometryResetCounter", key)) {
563 varIndex = 6;
564 } else if (0 == strcmp("isFast", key)) {
565 varIndex = 7;
566 } else if (0 == strcmp("kickWithLeftFoot", key)) {
567 varIndex = 8;
568 } else if (0 == strcmp("useShuffle", key)) {
569 varIndex = 9;
570 } else if (0 == strcmp("leftArmLimp", key)) {
571 varIndex = 10;
572 } else if (0 == strcmp("rightArmLimp", key)) {
573 varIndex = 11;
574 } else if (0 == strcmp("power", key)) {
575 varIndex = 12;
576 } else if (0 == strcmp("bend", key)) {
577 varIndex = 13;
578 } else {
579 varIndex = -1;
580 }
581 }
582 switch (varIndex) {
583 case -1: { break; }
584 case 0:
585 {
586 this->set_walkEngineOn(strcmp(var_str, "true") == 0 || strcmp(var_str, "1") == 0);
587 break;
588 }
589 case 1:
590 {
591 this->set_forward(static_cast<int16_t>(atoi(var_str)));
592 break;
593 }
594 case 2:
595 {
596 this->set_left(static_cast<int16_t>(atoi(var_str)));
597 break;
598 }
599 case 3:
600 {
601 this->set_turn(static_cast<int8_t>(atoi(var_str)));
602 break;
603 }
604 case 4:
605 {
606 this->set_exactStepsRequested(strcmp(var_str, "true") == 0 || strcmp(var_str, "1") == 0);
607 break;
608 }
609 case 5:
610 {
611 this->set_speed(static_cast<uint8_t>(atoi(var_str)));
612 break;
613 }
614 case 6:
615 {
616 this->set_odometryResetCounter(static_cast<uint8_t>(atoi(var_str)));
617 break;
618 }
619 case 7:
620 {
621 this->set_isFast(strcmp(var_str, "true") == 0 || strcmp(var_str, "1") == 0);
622 break;
623 }
624 case 8:
625 {
626 this->set_kickWithLeftFoot(strcmp(var_str, "true") == 0 || strcmp(var_str, "1") == 0);
627 break;
628 }
629 case 9:
630 {
631 this->set_useShuffle(strcmp(var_str, "true") == 0 || strcmp(var_str, "1") == 0);
632 break;
633 }
634 case 10:
635 {
636 this->set_leftArmLimp(strcmp(var_str, "true") == 0 || strcmp(var_str, "1") == 0);
637 break;
638 }
639 case 11:
640 {
641 this->set_rightArmLimp(strcmp(var_str, "true") == 0 || strcmp(var_str, "1") == 0);
642 break;
643 }
644 case 12:
645 {
646 this->set_power(static_cast<uint8_t>(atoi(var_str)));
647 break;
648 }
649 case 13:
650 {
651 this->set_bend(static_cast<uint8_t>(atoi(var_str)));
652 break;
653 }
654 }
655 if (varIndex >= 0) {
656 varIndex++;
657 }
658 } while(index < length);
659#endif
660 }
661#endif
662
663 public:
664
672 static NaoWalkCommand walk(int16_t t_forward, int16_t t_left, int8_t t_turn) {
674 cmd.set_walkEngineOn(true);
675 cmd.set_forward(t_forward);
676 cmd.set_left(t_left);
677 cmd.set_turn(t_turn);
678 cmd.set_bend(1);
679 return cmd;
680 }
681
689 static NaoWalkCommand walkPrecisely(int16_t t_forward, int16_t t_left, int8_t t_turn) {
690 NaoWalkCommand cmd = walk(t_forward, t_left, t_turn);
691 cmd.set_exactStepsRequested(true);
692 return cmd;
693 }
694
701 cmd.set_walkEngineOn(true);
702 cmd.set_forward(0);
703 cmd.set_left(0);
704 cmd.set_turn(0);
705 cmd.set_bend(1);
706 return cmd;
707 }
708
714 NaoWalkCommand cmd = stop();
715 cmd.set_walkEngineOn(true);
716 cmd.set_bend(1);
717 return cmd;
718 }
719
725 NaoWalkCommand cmd = stop();
726 cmd.set_walkEngineOn(true);
727 cmd.set_bend(0);
728 return cmd;
729 }
730
737 cmd.set_walkEngineOn(false);
738 return cmd;
739 }
740 };
741
742}
743
744#endif
Provides a C++ wrapper around wb_nao_walk_command.
void set_left(const int16_t &t_newValue)
NaoWalkCommand(const std::string &t_str)
String Constructor.
void set_kickWithLeftFoot(const bool &t_newValue)
static NaoWalkCommand standWithStiffness()
Convenience function to make the nao stand in the 'walk' position (slightly crouched),...
bool operator!=(const NaoWalkCommand &t_other) const
void set_forward(const int16_t &t_newValue)
const bool & useShuffle() const
bool operator==(const NaoWalkCommand &t_other) const
static NaoWalkCommand disconnectWalk()
Convenience function to disconnect the walk engine from the DCM.
const bool & isFast() const
static NaoWalkCommand walk(int16_t t_forward, int16_t t_left, int8_t t_turn)
WHITEBOARD_POSTER_STRING_CONVERSION.
void set_rightArmLimp(const bool &t_newValue)
const bool & walkEngineOn() const
const int16_t & left() const
void set_leftArmLimp(const bool &t_newValue)
const bool & leftArmLimp() const
const uint8_t & bend() const
void set_speed(const uint8_t &t_newValue)
void set_exactStepsRequested(const bool &t_newValue)
const bool & rightArmLimp() const
const uint8_t & speed() const
void set_useShuffle(const bool &t_newValue)
NaoWalkCommand & operator=(const NaoWalkCommand &t_other)
Copy Assignment Operator.
void set_walkEngineOn(const bool &t_newValue)
const int8_t & turn() const
const uint8_t & odometryResetCounter() const
NaoWalkCommand(const struct wb_nao_walk_command &t_other)
Copy Constructor.
void set_power(const uint8_t &t_newValue)
static NaoWalkCommand walkPrecisely(int16_t t_forward, int16_t t_left, int8_t t_turn)
Convenience function to make the nao walk, with precise step distances.
void set_turn(const int8_t &t_newValue)
const int16_t & forward() const
static NaoWalkCommand stop()
Convenience function to make the nao stop walking.
void set_odometryResetCounter(const uint8_t &t_newValue)
const uint8_t & power() const
void set_bend(const uint8_t &t_newValue)
static NaoWalkCommand standWithMinimalStiffness()
Convenience function to make the nao stand in the 'STANDING' position, upright with minimal stiffness...
NaoWalkCommand(bool t_walkEngineOn=false, int16_t t_forward=0, int16_t t_left=0, int8_t t_turn=0, bool t_exactStepsRequested=false, uint8_t t_speed=100, uint8_t t_odometryResetCounter=0, bool t_isFast=false, bool t_kickWithLeftFoot=true, bool t_useShuffle=true, bool t_leftArmLimp=false, bool t_rightArmLimp=false, uint8_t t_power=0, uint8_t t_bend=0)
Create a new NaoWalkCommand.
const bool & exactStepsRequested() const
const bool & kickWithLeftFoot() const
NaoWalkCommand(const NaoWalkCommand &t_other)
Copy Constructor.
void set_isFast(const bool &t_newValue)
void from_string(const std::string &t_str)
/file APM_Interface.h
WHITEBOARD_POSTER_STRING_CONVERSION.
int8_t turn
[-85 - 85] step-size(mm) per second, limited to +/- 85deg/step
uint8_t power
[0 - 100] stiffness, auto set to minimum needed values.
uint8_t speed
[0 - 100] modifier for forward etc.
bool leftArmLimp
lower stiffness in the arms when walking, allows the arm to move a little more.
bool kickWithLeftFoot
which foot to use for kicking
bool rightArmLimp
lower stiffness in the arms when walking, allows the arm to move a little more.
uint8_t odometryResetCounter
Odometry will reset any time this is changed or incremented.
int16_t forward
[-300 - 300] step-size(mm) per second, limited to +/- 300mm/step
bool useShuffle
limits the step height so the robot 'shuffles' instead of taking larger steps.
bool exactStepsRequested
No ratcheting, no speed 'buildup', just full step sizes.
uint8_t bend
[0 - 1] controls what the robot does when stopped, 0 == STAND and lower stiffness,...
bool walkEngineOn
connects the dcm callbacks.
int16_t left
[-200 - 200] step-size(mm) per second, limited to +/- 200mm/step
const char * wb_nao_walk_command_to_string(const struct wb_nao_walk_command *self, char *toString, size_t bufferSize)
Convert to a string.
const char * wb_nao_walk_command_description(const struct wb_nao_walk_command *self, char *descString, size_t bufferSize)
Convert to a description string.
struct wb_nao_walk_command * wb_nao_walk_command_from_string(struct wb_nao_walk_command *self, const char *str)
Convert from a string.
#define NAOWALKCOMMAND_TO_STRING_BUFFER_SIZE
#define NAOWALKCOMMAND_DESC_BUFFER_SIZE