Skip to content

Commit

Permalink
write up joint-indexes.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
ijnek committed May 15, 2021
1 parent 4b20946 commit 50e0b2b
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion joint-indexes.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,50 @@
.. _joint_indexes:

Joint Indexes
#############
#############

The list at the bottom shows the joint indexes copied from `Joints.msg`.

An example of accessing an angle for a specific joint:

.. code-block:: cpp
joints.angles[nao_interfaces::msg::Joints::HEADYAW]
``nao_interfaces::msg::Joints::NUM_JOINTS`` can be for iterating over all joints, as following:

.. code-block:: cpp
for (unsigned i = 0; i < nao_interfaces::msg::Joints::NUMJOINTS; ++i)
{
// do something for each joint
}
.. code-block:: cpp
int32 HEADYAW=0
int32 HEADPITCH=1
int32 LSHOULDERPITCH=2
int32 LSHOULDERROLL=3
int32 LELBOWYAW=4
int32 LELBOWROLL=5
int32 LWRISTYAW=6
int32 LHIPYAWPITCH=7
int32 LHIPROLL=8
int32 LHIPPITCH=9
int32 LKNEEPITCH=10
int32 LANKLEPITCH=11
int32 LANKLEROLL=12
int32 RHIPROLL=13
int32 RHIPPITCH=14
int32 RKNEEPITCH=15
int32 RANKLEPITCH=16
int32 RANKLEROLL=17
int32 RSHOULDERPITCH=18
int32 RSHOULDERROLL=19
int32 RELBOWYAW=20
int32 RELBOWROLL=21
int32 RWRISTYAW=22
int32 LHAND=23
int32 RHAND=24
int32 NUMJOINTS=25

0 comments on commit 50e0b2b

Please sign in to comment.