.. _pythonexample: Simple Sine Movement in Python ============================== To show the remote access to Oncilla API Level 2 we provide an example written in Python that performs an simple sine movement, by sending commands to the Simulation over the :ref:`Robotics Service Bus ` (RSB), which is available in Python, C++, Java and Common Lisp. In order to start the example, usew Webots to open the world file *Example3.wbt* which is installed by the :ref:`Oncilla Project Wizard `. This world file will start a controller for Oncilla, that listens to commands send over RSB. You find the example Python script at ``/usr/share/cca-oncilla/examples/OncillaRemoteSimpleSineMovement.py``. Start the python script:: python /usr/share/cca-oncilla/examples/OncillaRemoteSimpleSineMovement.py The script does: #. Importing necessary :ref:`RSB ` and :ref:`RST ` modules for remote communication with the :ref:`Oncilla CCA Interface `. #. Creating an informer to send the commands to a specified scope ``/oncilla/cmd/pos/all`` (lines 27-28). #. Creating rst :py:class:`rst.kinematics.JointAngles` containing the eight joint commands (lines 52-60). #. Sending the command with the informer created above (line 62). #. Make sure you deactivate the informer at the end of your program. .. literalinclude:: ../../examples/OncillaRemoteSimpleSineMovement.py :language: python :emphasize-lines: 27-28,52-60,62 :linenos: