<commit_before>/* 
 * File:   JointData.h
 * Author: <NAME>
 *
 * Created on 2. Januar 2009, 16:15
 */

#ifndef _JointData_H_
#define _JointData_H_

#include <string>

#include "Tools/DataStructures/Printable.h"
#include "Tools/DataStructures/Serializer.h"

namespace naoth
{

class JointData
{
  public:
    enum JointID
    {
      HeadPitch,
      HeadYaw,

      RShoulderRoll,
      LShoulderRoll,
      RShoulderPitch,
      LShoulderPitch,

      RElbowRoll,
      LElbowRoll,
      RElbowYaw,
      LElbowYaw,

      RHipYawPitch, // doesn't exist on Nao
      LHipYawPitch,
      RHipPitch,
      LHipPitch,
      RHipRoll,
      LHipRoll,
      RKneePitch,
      LKneePitch,
      RAnklePitch,
      LAnklePitch,
      RAnkleRoll,
      LAnkleRoll,

      // NOTE: those values don't exist on the old V3.2/V3.3 robots
      //       so, we pu them at the end for easier support for the old format
      LWristYaw,
      RWristYaw,
      LHand,
      RHand,

      numOfJoint //error value
    };

    // 'safe' cast operator for int
    // it maps any int value outside the range to numOfJoint
    static inline JointData::JointID getJointID (int n)
    {
      return (n >= 0 && n <= numOfJoint)?(JointID)n:numOfJoint;
    }

    double position[numOfJoint];
    double stiffness[numOfJoint];
    double dp[numOfJoint]; // speed
    double ddp[numOfJoint]; // acceleration

    // joint limits
    static double min[numOfJoint];
    static double max[numOfJoint];

    JointData();<commit_msg>marked as HACK - initialization of configuration parameters needs to be solved better<commit_after>/* 
 * File:   JointData.h
 * Author: <NAME>
 *
 * Created on 2. Januar 2009, 16:15
 */

#ifndef _JointData_H_
#define _JointData_H_

#include <string>

#include "Tools/DataStructures/Printable.h"
#include "Tools/DataStructures/Serializer.h"

namespace naoth
{

class JointData
{
  public:
    enum JointID
    {
      HeadPitch,
      HeadYaw,

      RShoulderRoll,
      LShoulderRoll,
      RShoulderPitch,
      LShoulderPitch,

      RElbowRoll,
      LElbowRoll,
      RElbowYaw,
      LElbowYaw,

      RHipYawPitch, // doesn't exist on Nao
      LHipYawPitch,
      RHipPitch,
      LHipPitch,
      RHipRoll,
      LHipRoll,
      RKneePitch,
      LKneePitch,
      RAnklePitch,
      LAnklePitch,
      RAnkleRoll,
      LAnkleRoll,

      // NOTE: those values don't exist on the old V3.2/V3.3 robots
      //       so, we pu them at the end for easier support for the old format
      LWristYaw,
      RWristYaw,
      LHand,
      RHand,

      numOfJoint //error value
    };

    // 'safe' cast operator for int
    // it maps any int value outside the range to numOfJoint
    static inline JointData::JointID getJointID (int n)
    {
      return (n >= 0 && n <= numOfJoint)?(JointID)n:numOfJoint;
    }

    double position[numOfJoint];
    double stiffness[numOfJoint];
    double dp[numOfJoint]; // speed
    double ddp[numOfJoint]; // acceleration

    // HACK: joint limits
    static double min[numOfJoint];
    static double max[numOfJoint];

    JointData();
{'fraction_non_alphanumeric': 0.0881399870382372, 'fraction_numerical': 0.009073233959818535, 'mean_word_length': 2.3300970873786406, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6346325', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1046, 'n_words': 271}