Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 1.62 KB

README.md

File metadata and controls

19 lines (15 loc) · 1.62 KB

viam-python

Try out the Python Viam SDK and use code to control a robot in our lab!

Get Started

  1. Access this repo in a web browser at: https://github.com/viam-labs/try-viam-codespace .

  2. Open a new GitHub Codespace using this repo as a template by clicking the green Use this template button, and selecting Open in a codespace.

  3. In a separate browser window, head to Try Viam, start a new session by clicking Try Now. If you haven’t already, you will need to create a Viam account. Wait for configuration to complete, then click Try My Rover when ready.

  4. Switch to the Code sample tab, and enable the Include secret toggle.

  5. Copy the location secret, (the payload) shown in the Code sample tab and paste it between the single quotes for SECRET_FROM_VIAM_APP in drive.py.

  6. Similarly, copy the robot address within RobotClient.at_address() shown in the Code sample tab and paste it between the single quotes for ADDRESS_FROM_VIAM_APP in drive.py. Only copy the hostname, ending with viam.cloud.

  7. Next, in the Control tab, find the viam_base control panel, and enable the cam and overhead-cam:overheadcam cameras. You should see live feeds from its forward-facing webcam, as well as an external overhead camera.

  8. Return to the Terminal in your GitHub editor window, and run the Python code:

    python drive.py

You should see the robot move in the controls tab of the Try Viam app!