gusimplewhiteboard
wb_hal_arm_target.h
Go to the documentation of this file.
1/*
2 * file wb_hal_arm_target.h
3 *
4 * This file was generated by classgenerator from hal_arm_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_arm_target_h
61#define wb_hal_arm_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#ifdef __cplusplus
89#define LEFT_ARM (static_cast<uint8_t>(0))
90#define RIGHT_ARM (static_cast<uint8_t>(1))
91#else
92#define LEFT_ARM ((uint8_t)0)
93#define RIGHT_ARM ((uint8_t)1)
94#endif
95
102#define SHOULDER_PITCH_LIMIT_DOWN_DEG 119.5f
103#define SHOULDER_PITCH_LIMIT_UP_DEG -SHOULDER_PITCH_LIMIT_DOWN_DEG
104
105#define LEFT_SHOULDER_ROLL_OUT_DEG 76.0f
106#define LEFT_SHOULDER_ROLL_IN_DEG -18.0f
107#define RIGHT_SHOULDER_ROLL_OUT_DEG -LEFT_SHOULDER_ROLL_OUT_DEG
108#define RIGHT_SHOULDER_ROLL_IN_DEG -LEFT_SHOULDER_ROLL_IN_DEG
109
110#define LEFT_ELBOW_ROLL_STRAIGHT_DEG -2.0f
111#define LEFT_ELBOW_ROLL_BENT_DEG -88.5f
112#define RIGHT_ELBOW_ROLL_STRAIGHT_DEG -LEFT_ELBOW_ROLL_STRAIGHT_DEG
113#define RIGHT_ELBOW_ROLL_BENT_DEG -LEFT_ELBOW_ROLL_BENT_DEG
114
115#define LEFT_ELBOW_YAW_RIGHT_DEG 119.5f
116#define LEFT_ELBOW_YAW_LEFT_DEG -LEFT_ELBOW_YAW_RIGHT_DEG
117#define RIGHT_ELBOW_YAW_RIGHT_DEG LEFT_ELBOW_YAW_RIGHT_DEG
118#define RIGHT_ELBOW_YAW_LEFT_DEG -LEFT_ELBOW_YAW_RIGHT_DEG
119
120#define LEFT_WRIST_YAW_RIGHT_DEG 104.5f
121#define LEFT_WRIST_YAW_LEFT_DEG -LEFT_WRIST_YAW_RIGHT_DEG
122#define RIGHT_WRIST_YAW_RIGHT_DEG LEFT_WRIST_YAW_RIGHT_DEG
123#define RIGHT_WRIST_YAW_LEFT_DEG -LEFT_WRIST_YAW_RIGHT_DEG
124
126#define SHOULDER_PITCH_LIMIT_DOWN_RAD 2.0857f
127#define SHOULDER_PITCH_LIMIT_UP_RAD -SHOULDER_PITCH_LIMIT_DOWN_RAD
128
129#define LEFT_SHOULDER_ROLL_OUT_RAD 1.3265f
130#define LEFT_SHOULDER_ROLL_IN_RAD -0.3142f
131#define RIGHT_SHOULDER_ROLL_OUT_RAD -LEFT_SHOULDER_ROLL_OUT_RAD
132#define RIGHT_SHOULDER_ROLL_IN_RAD -LEFT_SHOULDER_ROLL_IN_RAD
133
134#define LEFT_ELBOW_ROLL_STRAIGHT_RAD -0.0349f
135#define LEFT_ELBOW_ROLL_BENT_RAD -1.5446f
136#define RIGHT_ELBOW_ROLL_STRAIGHT_RAD -LEFT_ELBOW_ROLL_STRAIGHT_RAD
137#define RIGHT_ELBOW_ROLL_BENT_RAD -LEFT_ELBOW_ROLL_BENT_RAD
138
139#define LEFT_ELBOW_YAW_RIGHT_RAD 2.0857f
140#define LEFT_ELBOW_YAW_LEFT_RAD -LEFT_ELBOW_YAW_RIGHT_RAD
141#define RIGHT_ELBOW_YAW_RIGHT_RAD LEFT_ELBOW_YAW_RIGHT_RAD
142#define RIGHT_ELBOW_YAW_LEFT_RAD -LEFT_ELBOW_YAW_RIGHT_RAD
143
144#define LEFT_WRIST_YAW_RIGHT_RAD 1.8238f
145#define LEFT_WRIST_YAW_LEFT_RAD -LEFT_WRIST_YAW_RIGHT_RAD
146#define RIGHT_WRIST_YAW_RIGHT_RAD LEFT_WRIST_YAW_RIGHT_RAD
147#define RIGHT_WRIST_YAW_LEFT_RAD -LEFT_WRIST_YAW_RIGHT_RAD
148
149#define HAL_ARM_TARGET_GENERATED
150#define HAL_ARM_TARGET_C_STRUCT wb_hal_arm_target
151#define HAL_ARM_TARGET_NUMBER_OF_VARIABLES 23
152
153#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
154#define HAL_ARM_TARGET_DESC_BUFFER_SIZE 685
155#define HAL_ARM_TARGET_TO_STRING_BUFFER_SIZE 201
156#endif
157
158#ifdef __cplusplus
159extern "C" {
160#endif
161
166{
167
172
177
182
187
192
197
201 uint8_t target_arm;
202
206 uint8_t target_hand;
207
212
217
222
227
232
237
242
247
252
256 unsigned int target_elbowroll_active : 1;
257
261 unsigned int target_elbowyaw_active : 1;
262
266 unsigned int target_wrist_active : 1;
267
271 unsigned int target_hand_active : 1;
272
276 unsigned int target_arm_at_goal : 1;
277
281 unsigned int target_arm_stop : 1;
282
283};
284
285#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
286
290const char* wb_hal_arm_target_description(const struct wb_hal_arm_target* self, char* descString, size_t bufferSize);
291
295const char* wb_hal_arm_target_to_string(const struct wb_hal_arm_target* self, char* toString, size_t bufferSize);
296
300struct wb_hal_arm_target* wb_hal_arm_target_from_string(struct wb_hal_arm_target* self, const char* str);
301
302#endif
303
304#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
305const char* wb_hal_arm_target_value_description(const struct wb_hal_arm_target* self, char* toString, size_t bufferSize);
306#endif
307
308/*#ifdef WHITEBOARD_SERIALISATION*/
309
313size_t wb_hal_arm_target_to_network_serialised(const struct wb_hal_arm_target *self, char *dst);
314
318size_t wb_hal_arm_target_from_network_serialised(const char *src, struct wb_hal_arm_target *dst);
319
320/*#endif /// WHITEBOARD_SERIALISATION*/
321
322#ifdef __cplusplus
323}
324#endif
325
326#endif
WHITEBOARD_POSTER_STRING_CONVERSION.
unsigned int target_arm_at_goal
Control Message: Not used.
uint8_t target_wristyawstiffness
target wrist yaw stiffness as a percentage
int16_t target_shoulderpitch
target shoulder pitch angle in 10ths of degrees
int16_t target_elbowroll
target elbow roll angle in 10ths of degrees
unsigned int target_elbowroll_active
Is the elbowroll Active (true[DEFAULT]) or Passive (false)
unsigned int target_hand_active
Is the hand Active (true[DEFAULT]) or Passive (false)
uint8_t target_handstiffness
target hand grasper stiffness as a percentage
unsigned int target_shoulderroll_active
Is the shoulderroll Active (true[DEFAULT]) or Passive (false)
uint8_t target_pliability
target arm's pliability when in Passive Mode.
unsigned int target_wrist_active
Is the wrist Active (true[DEFAULT]) or Passive (false)
uint8_t target_shoulderpitchstiffness
target shoulder pitch stiffness as a percentage
unsigned int target_shoulderpitch_active
Is the shoulderpitch Active (true[DEFAULT]) or Passive (false).
uint8_t target_arm
target arm number: This property is used strictly for accounting purposes when the struct is stored w...
uint8_t target_elbowrollstiffness
target elbow roll stiffness as a percentage
unsigned int target_arm_stop
Control Message: Stop the arm at its current location.
uint8_t target_elbowyawstiffness
target elbow yaw stiffness as a percentage
int16_t target_shoulderroll
target shoulder roll angle angle in 10ths of degrees
unsigned int target_elbowyaw_active
Is the elbowyaw Active (true[DEFAULT]) or Passive (false)
uint8_t target_hand
target hand grasper opening as a percentage: 0 gripper will be clasped shut, 100 gripper will be full...
int16_t target_wristyaw
target wrist yaw angle in 10ths of degrees
int32_t target_movement_time
The elapsed time, in mSec, in which the movement should be completed.
uint8_t target_shoulderrollstiffness
target shoulder roll stiffness as a percentage
int16_t target_elbowyaw
target elbow yaw angle in 10ths of degrees
size_t wb_hal_arm_target_to_network_serialised(const struct wb_hal_arm_target *self, char *dst)
Network stream serialisation.
size_t wb_hal_arm_target_from_network_serialised(const char *src, struct wb_hal_arm_target *dst)
Network stream deserialisation.
struct wb_hal_arm_target * wb_hal_arm_target_from_string(struct wb_hal_arm_target *self, const char *str)
Convert from a string.
const char * wb_hal_arm_target_value_description(const struct wb_hal_arm_target *self, char *toString, size_t bufferSize)
WHITEBOARD_POSTER_STRING_CONVERSION.
const char * wb_hal_arm_target_description(const struct wb_hal_arm_target *self, char *descString, size_t bufferSize)
Convert to a description string.
const char * wb_hal_arm_target_to_string(const struct wb_hal_arm_target *self, char *toString, size_t bufferSize)
Convert to a string.