File tree Expand file tree Collapse file tree 4 files changed +35
-3
lines changed
Expand file tree Collapse file tree 4 files changed +35
-3
lines changed Original file line number Diff line number Diff line change 1+ XRPLib.defaults
2+ ---------------
3+
4+ In addition to you being able to construct any of the classes in XRPLib by
5+ themselves, you are also able to import all of the default objects needed for
6+ normal robot operations, using just one line.
7+
8+ By running ``from XRPLib.defaults import * ``, you import all of the
9+ pre-constructed objects, as specified and named below:
10+
11+ .. literalinclude :: ../XRPLib/defaults.py
12+ :caption: ../XRPLib/defaults.py
13+ :linenos:
14+
15+ We use this import in most of the curriculum and example programs,
16+ which is why you will often see the DifferentialDrive class refered to as
17+ just "drivetrain".
18+
19+ Here's an example of that from ``drive_examples.py ``:
20+
21+ >>> from XRPLib.defaults import *
22+ >>> # Follow the perimeter of a square with variable sidelength
23+ >>> def square (sidelength ):
24+ >>> for sides in range (4 ):
25+ >>> drivetrain.straight(sidelength, 80 )
26+ >>> drivetrain.turn(90 )``
Original file line number Diff line number Diff line change 1+ SPDX-FileCopyrightText: 2023 Kevin Siegall, written for OpenSTEM @ WPI
2+ SPDX-FileCopyrightText: Copyright (c) 2023 Open STEM Authors for WPI
3+
4+ SPDX-License-Identifier: MIT
Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ Table of Contents
1111 self
1212
1313.. toctree ::
14- :caption: API Reference
14+ :caption: Code Documentation
1515 :maxdepth: 3
1616
1717 api
18+ defaults
1819
1920.. toctree ::
2021 :caption: Examples
Original file line number Diff line number Diff line change 1- Simple test
2- ------------
1+ Installation Verification
2+ -------------------------
33
44Ensure your device works with this simple test.
55
66.. literalinclude :: ../Examples/installation_verification.py
77 :caption: Examples/installation_verification.py
88 :linenos:
9+
You can’t perform that action at this time.
0 commit comments