.. _glossary: Example ======= This examples builds on the Oncilla API Level 0, which is the lowest Oncilla interface level. The examples was written for the Oncilla Simulation, but should work exactly the same later on the real hardware platform. Simple Sine Movement -------------------- To show basic movement using the Oncilla interface, we provide a simple example performing a sine-movement on the Oncilla joint in position control, to generate a simple walking movement. The source code below shows the example implementation. To perform the simple movement the following basic steps are done: #. The actual robot object is instantiated (line 26). This connected either to the simulation backend or the real hardware. #. We then grab the Synchronizer so that in the case of Simulation we can control the actual stepping of the Simulator by our own (line 30). #. From the robot we take the joints we awant to use for the movement, in this case the Oncilla joints :ref:`L1 and L2 ` and give them meaningful names. #. To perform the actual movement we generate the desired JointAngles and set them as new position in the joints (examplary for two joints in lines 51-53). #. Finally after we set new commands, we perform one simulation step (line 68) to let the commands have effect and to get current sensor values .. literalinclude:: ../../examples/SimpleSineMovement.cpp :language: c :emphasize-lines: 26,30,33-40,51-53,68 :linenos: ...