diff --git a/doc/manual/interface.rst b/doc/manual/interface.rst index 5408cd5..e049571 100644 --- a/doc/manual/interface.rst +++ b/doc/manual/interface.rst @@ -1,14 +1,14 @@ .. _interface: Oncilla Interface ================= Following the abstractions of the :ref:`Robot Control Interface ` (RCI), the Oncilla robot is modeled by a set of specific :ref:`Resource Nodes `: -* :ref:`trunk` -* :ref:`l0` -* :ref:`l1l2` +* :ref:`trunk` -- representing the robot's trunk +* :ref:`l0` -- representing the adduction-abduction scapula joint +* :ref:`l1l2` -- representing the protraction-retraction hip joint and the flexion-extension knee joint * :ref:`l3` -* :ref:`l4` +* :ref:`l4` -- representing the foot of the robot diff --git a/doc/manual/l0.rst b/doc/manual/l0.rst new file mode 100644 index 0000000..bac668d --- /dev/null +++ b/doc/manual/l0.rst @@ -0,0 +1,27 @@ +.. _l0: + +Oncilla L0 +========== + +The Oncilla L0 joint represents the adduction-abduction scapula joint. It can be +controlled in position and sense forces along the legs. + +Joint space control and force sensing of L0: + +.. code-block:: cpp + :emphasize-lines: 5,7, 9 + + Oncilla oncilla; // get robot instance + L0::Ptr left_fore_hip = oncilla.getL0(LEFT_FORE); // get left fore l0 joint + + JointAnglesPtr command = JointAngles::fromRad(3.14); // in radians + left_fore_hip->setJointPosition(command); // send new command + + std::cout << left_fore_hip->getJointPosition(); // get current position + + std::cout << left_fore_hip->getForces(); // get current force sensing + +Refer to the API documentation of +`rci::oncilla::OncillaL0 `_ +for the full technical interface of these joints. + diff --git a/doc/manual/l1l2.rst b/doc/manual/l1l2.rst index e64f2bf..9bf5365 100644 --- a/doc/manual/l1l2.rst +++ b/doc/manual/l1l2.rst @@ -1,6 +1,30 @@ .. _l1l2: Oncilla L1 and L2 ================= -The Oncilla Joints L1 and L2 ... +The Oncilla Joints L1 and L2 provide the same (technical) interface, as they are +both realized as servo motors on the hardware platform. + +L1 represents the protraction-retraction hip joint. L2 represents the +flexion-extension knee joint. Both can be controlled in position, velocity, +torque and impedance and report current angle of of the motor axis and the +magnetic encoder. + +Simple joint space control of a L1 or L2 joint: + +.. code-block:: cpp + :emphasize-lines: 5,7 + + Oncilla oncilla; // get robot instance + L1::Ptr left_fore_hip = oncilla.getL1(LEFT_FORE); // get left fore l1 joint + + JointAnglesPtr command = JointAngles::fromRad(3.14); // in radians + left_fore_hip->setJointPosition(command); // send new command + + std::cout << left_fore_hip->getJointPosition()->deg(); // get position in degrees + +Refer to the API documentation of +`rci::oncilla::OncillaL1L2 `_ +for the full technical interface of these joints. + diff --git a/doc/manual/l4.rst b/doc/manual/l4.rst new file mode 100644 index 0000000..7460d49 --- /dev/null +++ b/doc/manual/l4.rst @@ -0,0 +1,27 @@ +.. _l4: + +Oncilla L4 +========== + +The Oncilla L4 joint represents the foot of the robot. It can't be controlled +and currently doesn't provide any sensing features. In the oncilla interface it +is therefore implemented as *supervisor*, as poses and forces can be sensed with +external sensors. This is currently implemented in simulation, which can report +the current cartesian pose and the contect forces of the foot. + +Joint space control and force sensing of L4: + +.. code-block:: cpp + :emphasize-lines: 2,4,6 + + Supervisor supervisor; // get robot instance + SupervisorL4::Ptr left_fore_foot = supervisor.getL4(LEFT_FORE); // get foot supervisor + + std::cout << left_fore_foot->getForces(); // get current force sensing + + std::cout << left_fore_foot->getPose(); // get current 6d pose + +Refer to the API documentation of +`rci::oncilla::SupervisorL4 `_ +for the full technical interface of these joints. + diff --git a/doc/manual/trunk.rst b/doc/manual/trunk.rst new file mode 100644 index 0000000..7680ea7 --- /dev/null +++ b/doc/manual/trunk.rst @@ -0,0 +1,23 @@ +.. _trunk: + +Oncilla Trunk +============= + +The Oncilla Trunk is able to sense translational acceleration and orientation +of the robot's trunk. + +To get these values: + +.. code-block:: cpp + :emphasize-lines: 4,5 + + Oncilla oncilla; // get robot instance + Trunk::Ptr trunk = oncilla.getTrunk(); // get trunk + + std::cout << trunk->getOrientation(); // gets current orientation + std::cout << trunk->getTranslationalAcceleration(); // gets current acceleration + +Refer to the API documentation of +`rci::oncilla::OncillaTrunk `_ +for the full technical interface of the trunk. +