60#ifndef guWhiteboard_SENSORSTorsoJointSensors_h
61#define guWhiteboard_SENSORSTorsoJointSensors_h
63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
73#undef guWhiteboard_SENSORSTorsoJointSensors_DEFINED
74#define guWhiteboard_SENSORSTorsoJointSensors_DEFINED
76#undef SENSORSTorsoJointSensors_DEFINED
77#define SENSORSTorsoJointSensors_DEFINED
91 void init(
float t_HeadYaw = 0.0f,
float t_HeadPitch = 0.0f,
float t_LShoulderPitch = 0.0f,
float t_LShoulderRoll = 0.0f,
float t_LElbowYaw = 0.0f,
float t_LElbowRoll = 0.0f,
float t_RShoulderPitch = 0.0f,
float t_RShoulderRoll = 0.0f,
float t_RElbowYaw = 0.0f,
float t_RElbowRoll = 0.0f,
float t_LWristYaw = 0.0f,
float t_RWristYaw = 0.0f) {
111 SENSORSTorsoJointSensors(
float t_HeadYaw = 0.0f,
float t_HeadPitch = 0.0f,
float t_LShoulderPitch = 0.0f,
float t_LShoulderRoll = 0.0f,
float t_LElbowYaw = 0.0f,
float t_LElbowRoll = 0.0f,
float t_RShoulderPitch = 0.0f,
float t_RShoulderRoll = 0.0f,
float t_RElbowYaw = 0.0f,
float t_RElbowRoll = 0.0f,
float t_LWristYaw = 0.0f,
float t_RWristYaw = 0.0f) {
112 this->init(t_HeadYaw, t_HeadPitch, t_LShoulderPitch, t_LShoulderRoll, t_LElbowYaw, t_LElbowRoll, t_RShoulderPitch, t_RShoulderRoll, t_RElbowYaw, t_RElbowRoll, t_LWristYaw, t_RWristYaw);
119 this->init(t_other.
HeadYaw(), t_other.
HeadPitch(), t_other.
LShoulderPitch(), t_other.
LShoulderRoll(), t_other.
LElbowYaw(), t_other.
LElbowRoll(), t_other.
RShoulderPitch(), t_other.
RShoulderRoll(), t_other.
RElbowYaw(), t_other.
RElbowRoll(), t_other.
LWristYaw(), t_other.
RWristYaw());
126 this->init(t_other.
HeadYaw, t_other.
HeadPitch, t_other.
LShoulderPitch, t_other.
LShoulderRoll, t_other.
LElbowYaw, t_other.
LElbowRoll, t_other.
RShoulderPitch, t_other.
RShoulderRoll, t_other.
RElbowYaw, t_other.
RElbowRoll, t_other.
LWristYaw, t_other.
RWristYaw);
133 this->init(t_other.
HeadYaw(), t_other.
HeadPitch(), t_other.
LShoulderPitch(), t_other.
LShoulderRoll(), t_other.
LElbowYaw(), t_other.
LElbowRoll(), t_other.
RShoulderPitch(), t_other.
RShoulderRoll(), t_other.
RElbowYaw(), t_other.
RElbowRoll(), t_other.
LWristYaw(), t_other.
RWristYaw());
141 this->init(t_other.
HeadYaw, t_other.
HeadPitch, t_other.
LShoulderPitch, t_other.
LShoulderRoll, t_other.
LElbowYaw, t_other.
LElbowRoll, t_other.
RShoulderPitch, t_other.
RShoulderRoll, t_other.
RElbowYaw, t_other.
RElbowRoll, t_other.
LWristYaw, t_other.
RWristYaw);
163 return !(*
this == t_other);
173 return !(*
this == t_other);
356#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
366#ifdef USE_WB_SENSORS_TORSOJOINTSENSORS_C_CONVERSION
369 std::string descr = buffer;
372 std::ostringstream ss;
373 ss <<
"HeadYaw=" << this->
HeadYaw();
401#ifdef USE_WB_SENSORS_TORSOJOINTSENSORS_C_CONVERSION
404 std::string toString = buffer;
407 std::ostringstream ss;
435#ifdef USE_WB_SENSORS_TORSOJOINTSENSORS_C_CONVERSION
440 char * str_cstr =
const_cast<char *
>(t_str.c_str());
441 size_t temp_length = strlen(str_cstr);
442 int length = (temp_length <= INT_MAX) ? static_cast<int>(
static_cast<ssize_t
>(temp_length)) : -1;
447 char* var_str = &var_str_buffer[0];
449 char* key = &key_buffer[0];
456 if (index == 0 && str_cstr[0] ==
'{') {
462 for (
int i = index; i < length; i++) {
464 if (bracecount == 0 && str_cstr[i] ==
'=') {
469 if (bracecount == 0 && isspace(str_cstr[i])) {
476 if (bracecount == 0 && str_cstr[i] ==
',') {
480 if (str_cstr[i] ==
'{') {
484 if (str_cstr[i] ==
'}') {
486 if (bracecount < 0) {
491 if (i == length - 1) {
495 if (endKey >= startKey && endKey - startKey < length) {
496 strncpy(key, str_cstr + startKey,
static_cast<size_t>((endKey - startKey) + 1));
497 key[(endKey - startKey) + 1] = 0;
501 strncpy(var_str, str_cstr + startVar,
static_cast<size_t>((index - startVar) + 1));
502 var_str[(index - startVar) + 1] = 0;
508 if (strlen(key) > 0) {
509 if (0 == strcmp(
"HeadYaw", key)) {
511 }
else if (0 == strcmp(
"HeadPitch", key)) {
513 }
else if (0 == strcmp(
"LShoulderPitch", key)) {
515 }
else if (0 == strcmp(
"LShoulderRoll", key)) {
517 }
else if (0 == strcmp(
"LElbowYaw", key)) {
519 }
else if (0 == strcmp(
"LElbowRoll", key)) {
521 }
else if (0 == strcmp(
"RShoulderPitch", key)) {
523 }
else if (0 == strcmp(
"RShoulderRoll", key)) {
525 }
else if (0 == strcmp(
"RElbowYaw", key)) {
527 }
else if (0 == strcmp(
"RElbowRoll", key)) {
529 }
else if (0 == strcmp(
"LWristYaw", key)) {
531 }
else if (0 == strcmp(
"RWristYaw", key)) {
541 this->
set_HeadYaw(
static_cast<float>(atof(var_str)));
603 }
while(index < length);
Provides a C++ wrapper around wb_sensors_torsojointsensors.
void set_RElbowRoll(const float &t_newValue)
const float & LElbowRoll() const
SENSORSTorsoJointSensors(const struct wb_sensors_torsojointsensors &t_other)
Copy Constructor.
void set_RWristYaw(const float &t_newValue)
void set_LElbowRoll(const float &t_newValue)
void set_RShoulderRoll(const float &t_newValue)
void set_LWristYaw(const float &t_newValue)
SENSORSTorsoJointSensors(const std::string &t_str)
String Constructor.
void set_HeadYaw(const float &t_newValue)
SENSORSTorsoJointSensors(const SENSORSTorsoJointSensors &t_other)
Copy Constructor.
void set_HeadPitch(const float &t_newValue)
const float & RWristYaw() const
void set_LShoulderRoll(const float &t_newValue)
void set_RElbowYaw(const float &t_newValue)
const float & LElbowYaw() const
const float & RShoulderPitch() const
bool operator==(const SENSORSTorsoJointSensors &t_other) const
const float & RShoulderRoll() const
const float & LShoulderRoll() const
void set_RShoulderPitch(const float &t_newValue)
const float & LShoulderPitch() const
bool operator!=(const SENSORSTorsoJointSensors &t_other) const
SENSORSTorsoJointSensors(float t_HeadYaw=0.0f, float t_HeadPitch=0.0f, float t_LShoulderPitch=0.0f, float t_LShoulderRoll=0.0f, float t_LElbowYaw=0.0f, float t_LElbowRoll=0.0f, float t_RShoulderPitch=0.0f, float t_RShoulderRoll=0.0f, float t_RElbowYaw=0.0f, float t_RElbowRoll=0.0f, float t_LWristYaw=0.0f, float t_RWristYaw=0.0f)
Create a new SENSORSTorsoJointSensors.
const float & RElbowRoll() const
void set_LElbowYaw(const float &t_newValue)
const float & HeadPitch() const
const float & HeadYaw() const
const float & LWristYaw() const
void from_string(const std::string &t_str)
SENSORSTorsoJointSensors & operator=(const SENSORSTorsoJointSensors &t_other)
Copy Assignment Operator.
std::string description()
const float & RElbowYaw() const
void set_LShoulderPitch(const float &t_newValue)
WHITEBOARD_POSTER_STRING_CONVERSION.
float LElbowRoll
roll of the elbow joint (left) RAD
float RShoulderPitch
pitch of the shoulder joint (right) RAD
float HeadYaw
Head pos in RAD.
float LWristYaw
yaw of the wrist joint (left)
float LShoulderPitch
pitch of the shoulder joint (left) RAD
float RShoulderRoll
roll of the shoulder joint (right) RAD
float RElbowRoll
roll of the elbow joint (right) RAD
float LElbowYaw
yaw of the elbow joint (left) RAD
float RElbowYaw
yaw of the elbow joint (right) RAD
float HeadPitch
Head pos in RAD.
float RWristYaw
yaw of the wrist joint (right)
float LShoulderRoll
roll of the shoulder joint (left) RAD
struct wb_sensors_torsojointsensors * wb_sensors_torsojointsensors_from_string(struct wb_sensors_torsojointsensors *self, const char *str)
Convert from a string.
const char * wb_sensors_torsojointsensors_to_string(const struct wb_sensors_torsojointsensors *self, char *toString, size_t bufferSize)
Convert to a string.
const char * wb_sensors_torsojointsensors_description(const struct wb_sensors_torsojointsensors *self, char *descString, size_t bufferSize)
Convert to a description string.
#define SENSORS_TORSOJOINTSENSORS_TO_STRING_BUFFER_SIZE
#define SENSORS_TORSOJOINTSENSORS_DESC_BUFFER_SIZE