60#ifndef guWhiteboard_SENSORSArmJointSensors_h
61#define guWhiteboard_SENSORSArmJointSensors_h
63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
73#undef guWhiteboard_SENSORSArmJointSensors_DEFINED
74#define guWhiteboard_SENSORSArmJointSensors_DEFINED
76#undef SENSORSArmJointSensors_DEFINED
77#define SENSORSArmJointSensors_DEFINED
91 void init(
float t_LShoulderPitch = 0.0f,
float t_LShoulderRoll = 0.0f,
float t_LElbowRoll = 0.0f,
float t_LElbowYaw = 0.0f,
float t_RShoulderPitch = 0.0f,
float t_RShoulderRoll = 0.0f,
float t_RElbowRoll = 0.0f,
float t_RElbowYaw = 0.0f,
float t_LWristYaw = 0.0f,
float t_RWristYaw = 0.0f) {
109 SENSORSArmJointSensors(
float t_LShoulderPitch = 0.0f,
float t_LShoulderRoll = 0.0f,
float t_LElbowRoll = 0.0f,
float t_LElbowYaw = 0.0f,
float t_RShoulderPitch = 0.0f,
float t_RShoulderRoll = 0.0f,
float t_RElbowRoll = 0.0f,
float t_RElbowYaw = 0.0f,
float t_LWristYaw = 0.0f,
float t_RWristYaw = 0.0f) {
110 this->init(t_LShoulderPitch, t_LShoulderRoll, t_LElbowRoll, t_LElbowYaw, t_RShoulderPitch, t_RShoulderRoll, t_RElbowRoll, t_RElbowYaw, t_LWristYaw, t_RWristYaw);
159 return !(*
this == t_other);
169 return !(*
this == t_other);
322#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
332#ifdef USE_WB_SENSORS_ARMJOINTSENSORS_C_CONVERSION
335 std::string descr = buffer;
338 std::ostringstream ss;
363#ifdef USE_WB_SENSORS_ARMJOINTSENSORS_C_CONVERSION
366 std::string toString = buffer;
369 std::ostringstream ss;
393#ifdef USE_WB_SENSORS_ARMJOINTSENSORS_C_CONVERSION
398 char * str_cstr =
const_cast<char *
>(t_str.c_str());
399 size_t temp_length = strlen(str_cstr);
400 int length = (temp_length <= INT_MAX) ? static_cast<int>(
static_cast<ssize_t
>(temp_length)) : -1;
405 char* var_str = &var_str_buffer[0];
407 char* key = &key_buffer[0];
414 if (index == 0 && str_cstr[0] ==
'{') {
420 for (
int i = index; i < length; i++) {
422 if (bracecount == 0 && str_cstr[i] ==
'=') {
427 if (bracecount == 0 && isspace(str_cstr[i])) {
434 if (bracecount == 0 && str_cstr[i] ==
',') {
438 if (str_cstr[i] ==
'{') {
442 if (str_cstr[i] ==
'}') {
444 if (bracecount < 0) {
449 if (i == length - 1) {
453 if (endKey >= startKey && endKey - startKey < length) {
454 strncpy(key, str_cstr + startKey,
static_cast<size_t>((endKey - startKey) + 1));
455 key[(endKey - startKey) + 1] = 0;
459 strncpy(var_str, str_cstr + startVar,
static_cast<size_t>((index - startVar) + 1));
460 var_str[(index - startVar) + 1] = 0;
466 if (strlen(key) > 0) {
467 if (0 == strcmp(
"LShoulderPitch", key)) {
469 }
else if (0 == strcmp(
"LShoulderRoll", key)) {
471 }
else if (0 == strcmp(
"LElbowRoll", key)) {
473 }
else if (0 == strcmp(
"LElbowYaw", key)) {
475 }
else if (0 == strcmp(
"RShoulderPitch", key)) {
477 }
else if (0 == strcmp(
"RShoulderRoll", key)) {
479 }
else if (0 == strcmp(
"RElbowRoll", key)) {
481 }
else if (0 == strcmp(
"RElbowYaw", key)) {
483 }
else if (0 == strcmp(
"LWristYaw", key)) {
485 }
else if (0 == strcmp(
"RWristYaw", key)) {
547 }
while(index < length);
Provides a C++ wrapper around wb_sensors_armjointsensors.
void set_LWristYaw(const float &t_newValue)
void set_RWristYaw(const float &t_newValue)
SENSORSArmJointSensors(float t_LShoulderPitch=0.0f, float t_LShoulderRoll=0.0f, float t_LElbowRoll=0.0f, float t_LElbowYaw=0.0f, float t_RShoulderPitch=0.0f, float t_RShoulderRoll=0.0f, float t_RElbowRoll=0.0f, float t_RElbowYaw=0.0f, float t_LWristYaw=0.0f, float t_RWristYaw=0.0f)
Create a new SENSORSArmJointSensors.
void from_string(const std::string &t_str)
const float & LShoulderRoll() const
const float & LWristYaw() const
const float & RElbowRoll() const
const float & LElbowYaw() const
const float & RElbowYaw() const
const float & LElbowRoll() const
SENSORSArmJointSensors & operator=(const SENSORSArmJointSensors &t_other)
Copy Assignment Operator.
void set_LShoulderRoll(const float &t_newValue)
const float & RShoulderPitch() const
void set_RShoulderRoll(const float &t_newValue)
void set_RElbowRoll(const float &t_newValue)
void set_RElbowYaw(const float &t_newValue)
SENSORSArmJointSensors(const struct wb_sensors_armjointsensors &t_other)
Copy Constructor.
SENSORSArmJointSensors(const SENSORSArmJointSensors &t_other)
Copy Constructor.
void set_LShoulderPitch(const float &t_newValue)
void set_RShoulderPitch(const float &t_newValue)
bool operator==(const SENSORSArmJointSensors &t_other) const
SENSORSArmJointSensors(const std::string &t_str)
String Constructor.
std::string description()
const float & RWristYaw() const
const float & RShoulderRoll() const
void set_LElbowRoll(const float &t_newValue)
const float & LShoulderPitch() const
bool operator!=(const SENSORSArmJointSensors &t_other) const
void set_LElbowYaw(const float &t_newValue)
WHITEBOARD_POSTER_STRING_CONVERSION.
float LWristYaw
yaw of the wrist joint (left)
float RShoulderPitch
pitch of the shoulder joint (right)
float LElbowRoll
roll of the elbow joint (left)
float RElbowRoll
roll of the elbow joint (right)
float RElbowYaw
yaw of the elbow joint (right)
float RWristYaw
yaw of the wrist joint (right)
float LElbowYaw
yaw of the elbow joint (left)
float LShoulderPitch
pitch of the shoulder joint (left)
float RShoulderRoll
roll of the shoulder joint (right)
float LShoulderRoll
roll of the shoulder joint (left)
const char * wb_sensors_armjointsensors_to_string(const struct wb_sensors_armjointsensors *self, char *toString, size_t bufferSize)
Convert to a string.
struct wb_sensors_armjointsensors * wb_sensors_armjointsensors_from_string(struct wb_sensors_armjointsensors *self, const char *str)
Convert from a string.
const char * wb_sensors_armjointsensors_description(const struct wb_sensors_armjointsensors *self, char *descString, size_t bufferSize)
Convert to a description string.
#define SENSORS_ARMJOINTSENSORS_TO_STRING_BUFFER_SIZE
#define SENSORS_ARMJOINTSENSORS_DESC_BUFFER_SIZE