gusimplewhiteboard
wb_hal_leg_target.h
Go to the documentation of this file.
1/*
2 * file wb_hal_leg_target.h
3 *
4 * This file was generated by classgenerator from hal_leg_target.gen.
5 * DO NOT CHANGE MANUALLY!
6 *
7 * Copyright © 2021 Dimitri Joukoff. 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 Dimitri Joukoff.
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 wb_hal_leg_target_h
61#define wb_hal_leg_target_h
62
63#pragma clang diagnostic push
64#pragma clang diagnostic ignored "-Wreserved-id-macro"
65
66#ifdef __linux
67# ifndef _POSIX_SOURCE
68# define _POSIX_SOURCE 200112L
69# endif
70#endif
71#ifndef _XOPEN_SOURCE
72# define _XOPEN_SOURCE 700
73#endif
74#ifdef __APPLE__
75# ifndef _DARWIN_C_SOURCE
76# define _DARWIN_C_SOURCE 200112L
77# endif
78# ifndef __DARWIN_C_LEVEL
79# define __DARWIN_C_LEVEL 200112L
80# endif
81#endif
82
83#pragma clang diagnostic pop
84
85#include <gu_util.h>
86#include <stdint.h>
87
88#include <stdint.h>
89
90#ifdef __cplusplus
91#define LEFT_LEG (static_cast<uint8_t>(0))
92#define RIGHT_LEG (static_cast<uint8_t>(1))
93#else
94#define LEFT_LEG ((uint8_t)0)
95#define RIGHT_LEG ((uint8_t)1)
96#endif
97
104#define HIP_YAWPITCH_LIMIT_BACK_DEG -65.62f
105#define HIP_YAWPITCH_LIMIT_FRONT_DEG 42.44f
106
107#define LEFT_HIP_ROLL_OUT_DEG 45.29f
108#define LEFT_HIP_ROLL_IN_DEG -21.74f
109#define LEFT_HIP_PITCH_FRONT_DEG -88.00f
110#define LEFT_HIP_PITCH_BACK_DEG 27.73f
111#define LEFT_KNEE_PITCH_FRONT_DEG -5.29f
112#define LEFT_KNEE_PITCH_BACK_DEG 121.04f
113#define LEFT_ANKLE_PITCH_FRONT_DEG -68.15f
114#define LEFT_ANKLE_PITCH_BACK_DEG 52.86f
115#define LEFT_ANKLE_ROLL_OUT_DEG 44.06f
116#define LEFT_ANKLE_ROLL_IN_DEG -22.79f
117
118#define RIGHT_HIP_ROLL_OUT_DEG -45.29f
119#define RIGHT_HIP_ROLL_IN_DEG 21.74f
120#define RIGHT_HIP_PITCH_FRONT_DEG -88.00f
121#define RIGHT_HIP_PITCH_BACK_DEG 27.73f
122#define RIGHT_KNEE_PITCH_FRONT_DEG -5.90f
123#define RIGHT_KNEE_PITCH_BACK_DEG 121.47f
124#define RIGHT_ANKLE_PITCH_FRONT_DEG -67.97f
125#define RIGHT_ANKLE_PITCH_BACK_DEG 53.40f
126#define RIGHT_ANKLE_ROLL_OUT_DEG -44.06f
127#define RIGHT_ANKLE_ROLL_IN_DEG 22.80f
128
130#define HIP_YAWPITCH_LIMIT_BACK_RAD -1.145303f
131#define HIP_YAWPITCH_LIMIT_FRONT_RAD 0.740810f
132
133#define LEFT_HIP_ROLL_OUT_RAD 0.790477f
134#define LEFT_HIP_ROLL_IN_RAD -0.379472f
135#define LEFT_HIP_PITCH_FRONT_RAD -1.535889f
136#define LEFT_HIP_PITCH_BACK_RAD 0.484090f
137#define LEFT_KNEE_PITCH_FRONT_RAD -0.092346f
138#define LEFT_KNEE_PITCH_BACK_RAD 2.112528f
139#define LEFT_ANKLE_PITCH_FRONT_RAD -1.189516f
140#define LEFT_ANKLE_PITCH_BACK_RAD 0.922747f
141#define LEFT_ANKLE_ROLL_OUT_RAD 0.769001f
142#define LEFT_ANKLE_ROLL_IN_RAD -0.397880f
143
144#define RIGHT_HIP_ROLL_OUT_RAD -0.790477f
145#define RIGHT_HIP_ROLL_IN_RAD 0.379472f
146#define RIGHT_HIP_PITCH_FRONT_RAD -1.535889f
147#define RIGHT_HIP_PITCH_BACK_RAD 0.484090f
148#define RIGHT_KNEE_PITCH_FRONT_RAD -0.103083f
149#define RIGHT_KNEE_PITCH_BACK_RAD 2.120198f
150#define RIGHT_ANKLE_PITCH_FRONT_RAD -1.186448f
151#define RIGHT_ANKLE_PITCH_BACK_RAD 0.932056f
152#define RIGHT_ANKLE_ROLL_OUT_RAD -0.768992f
153#define RIGHT_ANKLE_ROLL_IN_RAD 0.397935f
154
155#define HAL_LEG_TARGET_GENERATED
156#define HAL_LEG_TARGET_C_STRUCT wb_hal_leg_target
157#define HAL_LEG_TARGET_NUMBER_OF_VARIABLES 23
158
159#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
160#define HAL_LEG_TARGET_DESC_BUFFER_SIZE 691
161#define HAL_LEG_TARGET_TO_STRING_BUFFER_SIZE 204
162#endif
163
164#ifdef __cplusplus
165extern "C" {
166#endif
167
172{
173
178
183
188
193
198
203
208
212 uint8_t target_leg;
213
218
223
228
233
238
243
248
253
257 unsigned int target_hiproll_active : 1;
258
262 unsigned int target_hippitch_active : 1;
263
267 unsigned int target_kneepitch_active : 1;
268
272 unsigned int target_anklepitch_active : 1;
273
277 unsigned int target_ankleroll_active : 1;
278
282 unsigned int target_leg_at_goal : 1;
283
287 unsigned int target_leg_stop : 1;
288
289};
290
291#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
292
296const char* wb_hal_leg_target_description(const struct wb_hal_leg_target* self, char* descString, size_t bufferSize);
297
301const char* wb_hal_leg_target_to_string(const struct wb_hal_leg_target* self, char* toString, size_t bufferSize);
302
306struct wb_hal_leg_target* wb_hal_leg_target_from_string(struct wb_hal_leg_target* self, const char* str);
307
308#endif
309
310#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
311const char* wb_hal_leg_target_value_description(const struct wb_hal_leg_target* self, char* toString, size_t bufferSize);
312#endif
313
314/*#ifdef WHITEBOARD_SERIALISATION*/
315
319size_t wb_hal_leg_target_to_network_serialised(const struct wb_hal_leg_target *self, char *dst);
320
324size_t wb_hal_leg_target_from_network_serialised(const char *src, struct wb_hal_leg_target *dst);
325
326/*#endif /// WHITEBOARD_SERIALISATION*/
327
328#ifdef __cplusplus
329}
330#endif
331
332#endif
WHITEBOARD_POSTER_STRING_CONVERSION.
uint8_t target_pliability
target leg's pliability when in Passive Mode; When the leg is passive, this value reduces the update ...
uint8_t target_hipyawpitchstiffness
target hip yaw pitch stiffness as a percentage
uint8_t target_hiprollstiffness
target hip roll stiffness as a percentage
uint8_t target_kneepitchstiffness
target knee pitch stiffness as a percentage
unsigned int target_anklepitch_active
Is the ankle pitch Active (true[DEFAULT]) or Passive (false)
uint8_t target_anklerollstiffness
target ankle roll stiffness as a percentage
int16_t target_hipyawpitch
target hip yaw pitch angle in 10ths of degrees
uint8_t target_leg
target leg number; This property is used strictly for accounting purposes when the struct is stored w...
uint8_t target_anklepitchstiffness
target ankle pitch stiffness as a percentage
unsigned int target_ankleroll_active
Is the ankle roll Active (true[DEFAULT]) or Passive (false)
unsigned int target_hiproll_active
Is the hip roll Active (true[DEFAULT]) or Passive (false)
unsigned int target_hipyawpitch_active
Is the hipyawpitch Active (true[DEFAULT]) or Passive (false).
int16_t target_kneepitch
target knee pitch angle in 10ths of degrees
int32_t target_movement_time
Control Message: The elapsed time, in mSec, in which the movement should be completed.
int16_t target_anklepitch
target ankle pitch angle in 10ths of degrees
int16_t target_ankleroll
target ankle roll angle in 10ths of degrees
unsigned int target_kneepitch_active
Is the knee pitch Active (true[DEFAULT]) or Passive (false)
unsigned int target_leg_stop
Control Message: Stop the leg at its current location.
unsigned int target_hippitch_active
Is the hip pitch Active (true[DEFAULT]) or Passive (false)
uint8_t target_hippitchstiffness
target hip pitch stiffness as a percentage
int16_t target_hiproll
target hip roll angle angle in 10ths of degrees
unsigned int target_leg_at_goal
Control Message: Not used.
int16_t target_hippitch
target hip pitch angle in 10ths of degrees
const char * wb_hal_leg_target_to_string(const struct wb_hal_leg_target *self, char *toString, size_t bufferSize)
Convert to a string.
size_t wb_hal_leg_target_to_network_serialised(const struct wb_hal_leg_target *self, char *dst)
Network stream serialisation.
const char * wb_hal_leg_target_value_description(const struct wb_hal_leg_target *self, char *toString, size_t bufferSize)
WHITEBOARD_POSTER_STRING_CONVERSION.
const char * wb_hal_leg_target_description(const struct wb_hal_leg_target *self, char *descString, size_t bufferSize)
Convert to a description string.
struct wb_hal_leg_target * wb_hal_leg_target_from_string(struct wb_hal_leg_target *self, const char *str)
Convert from a string.
size_t wb_hal_leg_target_from_network_serialised(const char *src, struct wb_hal_leg_target *dst)
Network stream deserialisation.