Skip to content

Commit

Permalink
changes to Control the mock robot arm
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeViamTW authored and npentrel committed Nov 16, 2023
1 parent 541a361 commit 3248e11
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/tutorials/viam-on-a-virtual-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,19 @@ Do not share your robot secret or robot address publicly. Sharing this informati

### Control the mock robot arm

While connected to the robot, you can verify the operation of the fake arm from the **CONTROL** tab or through code, which allows you to control and observe to positioning of the arm component in the terminal and in the GUI.
While connected to the robot, you can verify the operation of the fake arm from the **CONTROL** tab or through code, which would allow you to control and observe to positioning of the arm component in the terminal and in the GUI.

In the GUI, you can click **Modify All** to change the X, Y, and Z positions for joints in the arm. Alternatively, you could download and run <file>arm_move.py</file> to programmatically perform random changes and observe the returned positional value changes in the terminal, as well as on the **CONTROL** tab.
#### Using the GUI

### Creating the arm control file
In the GUI, you can click **Modify All** to change the X, Y, and Z positions for joints in the arm.

### Using the SDK

Alternatively, you can programmatically perform random changes and observe the returned positional value changes in the terminal, as well as on the **CONTROL** tab using either the Python SDK or the GO SDK.

The next section describes the process for Python.

#### Creating the arm control code

Paste the boilerplate code from the CODE SAMPLE tab of the Viam app into a file named <file>arm-move.py</file> or into your code editor.
<file>arm_move.py</file> imports the arm component from the Viam Python SDK and imports the random and async.io libraries.
Expand Down

0 comments on commit 3248e11

Please sign in to comment.