CloudPendulum — Do your first cloud experiment

Do your first cloud experiment

  1. Click on the Terminal button on the user dashboard called “Launcher”. It appears under the “Other” section.
    Step 1 screenshot
    Terminal view on JupyterHub
  2. Visit our github page (https://github.com/cloudpendulum/) and clone the example that you would like to use using the terminal command: git clone https://github.com/cloudpendulum/sp_energyshaping_lqr.git
  3. The repository should appear on the file browser on the left as shown below:
    Step 3 screenshot
    Clone your repository
  4. Double-click the repository folder on the left and open the Python Notebook with extension “.ipynb”.
    Step 4 screenshot
    Jupyter Notebook
  5. Run the cells by pressing Shift + Enter. The cells where the animation of the simulation is being generated (e.g., HTML(anim.to_html5_video())) might be a bit slow. It is not the simulation that is slow but the video generation for embedding into HTML.
    Step 5 screenshot
    Simulation and Animation
  6. If you do not have the patience, you can skip those cells which use the pendulum.simulate_and_animate() function and instead use the pendulum.simulate() function. That should work instantly.
    Step 6 screenshot
    Simulation only
  7. Eventually, you will arrive at the remote hardware experiments section which looks like this:
    Step 7 screenshot
    User Token for Hardware Experiments
  8. You should replace the text “YOUR_USER_TOKEN_HERE” with your user token. You can find it by clicking on File -> Hub Control Panel and then by clicking on the button “CP Token and Compute Status”.
  9. When you run the cell containing pendulum.run_on_hardware() function, you will get connected to the requested hardware and you will be provided with a weblink to watch the livestream.
    Step 9 screenshot
    Output of run on hardware function
  10. In this function call, you can adjust the preparation time parameter (defaults to 5 seconds in this case) if you need more time to open the livestream link. You should see the livestream of your experiment like this:
    Step 10 screenshot
    Camera livestream view on a browser tab
  11. At the end of the experiment, you will see the plot of the sensor and command data along with a time clipped video of your experiment which you can watch repeatedly and analyze.
    Step 11 screenshot
    Hardware experiment results