<commit_before>//
// Copyright (c) 2016 CNRS
// Author: NMansard from <NAME>
//
//
// This file is part of hpp-pinocchio
// hpp-pinocchio is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// hpp-pinocchio is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Lesser Public License for more details.  You should have
// received a copy of the GNU Lesser General Public License along with
// hpp-pinocchio  If not, see
// <http://www.gnu.org/licenses/>.

#ifndef HPP_PINOCCHIO_JOINT_HH
# define HPP_PINOCCHIO_JOINT_HH

# include <cstddef>
# include <hpp/pinocchio/fwd.hh>
# include <hpp/pinocchio/config.hh>

namespace hpp {
  namespace pinocchio {
    /// Robot joint
    ///
    /// A joint maps an input vector to a transformation of SE(3) from the
    /// parent frame to the joint frame.
    ///
    /// The input vector is provided through the configuration vector of the
    /// robot the joint belongs to. The joint input vector is composed of the
    /// components of the robot configuration starting at
    /// Joint::rankInConfiguration.
    ///
    /// The joint input vector represents a element of a Lie group, either
    /// \li a vector space for JointTranslation, and bounded JointRotation,
    /// \li the unit circle for non-bounded JointRotation joints,
    /// \li an element of SO(3) for JointSO3, represented by a unit quaternion.
    ///
    /// Operations specific to joints (uniform sampling of input space, straight
    /// interpolation, distance, ...) are performed by a JointConfiguration
    /// instance that has the same class hierarchy as Joint.
    class HPP_PINOCCHIO_DLLAPI Joint {
    public:
      /// \name Construction and copy and destruction
      /// \{

      /// Create a new joint
      /// Returns a null pointer if indexInJointList is 0.
      static JointPtr_t create (DeviceWkPtr_t device, JointIndex indexInJointList );

      /// Constructor
      /// \param device pointer on the device the joint is belonging to.
      /// \param indexInJointList index of the joint, i.e. joint = device.model.joints[index]
      Joint (DeviceWkPtr_t device, JointIndex indexInJointList );

      ~Joint() {}
      /// \}
      // -----------------------------------------------------------------------
      /// \name Name
      /// \{

      /// Get name
      const std::string& name() const;

      /// \}
      // -----------------------------------------------------------------------
      /// \name Position
      /// \{

      /// Joint transformation
      const Transform3f& currentTransformation () const { return currentTransformation(data()); }

      /// Joint transformation
      const Transform3f& currentTransformation (const DeviceData& data) const;

      ///\}
      // -----------------------------------------------------------------------
      /// \name Size and rank<commit_msg>[Doc] document class Joint.<commit_after>//
// Copyright (c) 2016 CNRS
// Author: NMansard from <NAME>
//
//
// This file is part of hpp-pinocchio
// hpp-pinocchio is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// hpp-pinocchio is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Lesser Public License for more details.  You should have
// received a copy of the GNU Lesser General Public License along with
// hpp-pinocchio  If not, see
// <http://www.gnu.org/licenses/>.

#ifndef HPP_PINOCCHIO_JOINT_HH
# define HPP_PINOCCHIO_JOINT_HH

# include <cstddef>
# include <hpp/pinocchio/fwd.hh>
# include <hpp/pinocchio/config.hh>

namespace hpp {
  namespace pinocchio {
    /// Robot joint
    ///
    /// A joint maps an input vector to a transformation of SE(3) from the
    /// parent frame to the joint frame.
    ///
    /// The input vector is provided through the configuration vector of the
    /// robot the joint belongs to. The joint input vector is composed of the
    /// components of the robot configuration starting at
    /// Joint::rankInConfiguration.
    ///
    /// The joint input vector represents an element of a Lie group, either
    /// \li a vector space for JointTranslation, and bounded JointRotation,
    /// \li the unit circle for non-bounded JointRotation joints,
    /// \li an element of SO(3) for JointSO3, represented by a unit quaternion.
    ///
    /// This class is a wrapper to pinocchio::JointModelTpl.
    class HPP_PINOCCHIO_DLLAPI Joint {
    public:
      /// \name Construction and copy and destruction
      /// \{

      /// Create a new joint
      /// \param indexInJointList index in pinocchio vector of joints
      ///        (pinocchio::ModelTpl::joints)
      /// \return shared pointer to result if indexInJointList > 0, empty
      ///         shared pointer if indexInJointList == 0.
      /// \note indices of device start at 1 since 0 corresponds to "universe".
      static JointPtr_t create (DeviceWkPtr_t device, JointIndex indexInJointList );

      /// Constructor
      /// \param indexInJointList index in pinocchio vector of joints
      ///        (pinocchio::ModelTpl::joints). Should be > 0.
      /// \note indices of device start at 1 since 0 corresponds to "universe".
      Joint (DeviceWkPtr_t device, JointIndex indexInJointList );

      ~Joint() {}
      /// \}
      // -----------------------------------------------------------------------
      /// \name Name
      /// \{

      /// Get name
      const std::string& name() const;

      /// \}
      // -----------------------------------------------------------------------
      /// \name Position
      /// \{

      /// Joint transformation
      const Transform3f& currentTransformation () const { return currentTransformation(data()); }

      /// Joint transformation
      const Transform3f& currentTransformation (const DeviceData& data) const;

      ///\}
      // -----------------------------------------------------------------------
      /// \name Size and rank
{'fraction_non_alphanumeric': 0.15924736117485086, 'fraction_numerical': 0.004283310387027689, 'mean_word_length': 1.9148461881408827, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5424817', 'n_tokens_mistral': 1716, 'n_tokens_neox': 1621, 'n_words': 684}