Skip to content

Try out the Python Viam SDK and use code to control a robot in our lab: app.viam.com/try

Notifications You must be signed in to change notification settings

andf-viam/viam-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

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/hexbabe/viam-python.
  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 the Terminal pane at the bottom of the editor, run pip install viam-sdk to install the latest version of Viam's Python SDK.
  4. 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.
  5. 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.
  6. Next, switch to the Code sample tab, and enable the Include secret toggle.
  7. 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.
  8. 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.
  9. 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!

About

Try out the Python Viam SDK and use code to control a robot in our lab: app.viam.com/try

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%