You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: graphics/README.md
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Instructions on how to use the graphical section of the toolbox below.
11
11
* Grid Updating
12
12
* On rotation/move finish
13
13
*~~Don't redraw labels, move/update them~~
14
-
* Don't redraw the grid, move/update them
14
+
*~~Don't redraw the grid, move/update them~~
15
15
* Error handling
16
16
*~~Throw custom error messages~~
17
17
* Handle vpython error messages
@@ -39,6 +39,8 @@ The `vector` class is also very crucial to the graphics. It can either represent
39
39
For convenience, some functions and variables are provided for easy use. `wrap_to_pi()` takes in an angle, and specification on degrees or radians. It returns the respective angle between -pi and pi.
40
40
Three vectors are also supplied for readability to ensure correct axes are used when referencing. `x_axis_vector`, `y_axis_vector`, `z_axis_vector` can be used when supplying the rotation axis, for example.
41
41
```python
42
+
# Wrap an angle (deg) to the range [-pi pi]. use "rad" instead of "deg" for radian angles.
43
+
wrap_to_pi("deg", 450)
42
44
# Rotate the joint around its local x-axis by 30 degrees
Now that the scene is created, a robot must be created to be displayed.
72
74
75
+
At anytime you can clear the scene of all objects (The grid will remain if visible). Note: This will note delete the objects,
76
+
they still exist, and can be rendered visible afterwards. However, overwriting/deleting the variables will free the memory.
77
+
If an object is overwritten/deleted while still visible, the objects will remain in the scene.
78
+
```python
79
+
canvas_grid.clear_scene()
80
+
```
81
+
82
+
83
+
73
84
## Displaying Robot Joints
74
85
If you want to use the example puma560 robot, simply call the creation function that will return a GraphicalRobot object. It will automatically be displayed in the canvas
0 commit comments