Skip to content

Commit

Permalink
Merge branch 'main' into DOCS-1069/session-apis
Browse files Browse the repository at this point in the history
  • Loading branch information
sguequierre authored Sep 5, 2023
2 parents ef609d7 + c0d168e commit 3400631
Show file tree
Hide file tree
Showing 56 changed files with 750 additions and 181 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
uses: actions/configure-pages@v2

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true

- name: Build
run: make build-prod

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ IgnoreURLs:
- "slamtec.com"
- "softroboticsinc.com"
- "universal-robots.com"
- "digikey.com"
- "ufactory.cc"
IgnoreDirs:
- "lib"
Expand Down
Binary file added assets/components/base/base-control-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
162 changes: 162 additions & 0 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,12 @@ END MARKETING CSS
.hover-card.tutorial {
background-color: white;
padding: 10px;
margin: 1rem 0.8rem 1rem 0.2rem;
}

.hover-card.tutorial > a {
width: 100%;
text-decoration: none;
}

// Text is black
Expand Down Expand Up @@ -644,6 +646,11 @@ END MARKETING CSS
font-weight: 400 !important;
}

.hover-card.tutorial * .pills > .pill.pill-highlight {
background-color: #000;
color: white;
}

.hover-card.tutorial * .pill.pill-lang {
border-color: #00e8e8;
}
Expand Down Expand Up @@ -1130,3 +1137,158 @@ ul.sectionlist > li:hover {
padding: 0;
font-size: 30px;
}

.td-sidebar__toggle {
float: right;
}

// Tutorials page start

.search-panel__results.card-container {
max-width: 100%;
}

#tutorial-menu {
display: flex;
flex-direction: column;
max-width: 600px;
}

#tutorial-filters, #tutorial-filter-items {
display: flex;
flex-wrap: wrap;
}

#tutorial-filters > .filter {
text-decoration: none;
color: black;
padding: 0.2rem 1rem;
margin: 0.2rem;
border: 1px solid black;
}

.ais-Hits-item {
display: flex;
}

#hits .ais-Hits-list {
list-style-type: none;
display: flex;
flex-wrap: wrap;
width: 100%;
}

.search-panel__filters {
display: flex;
}

.search-facets {
width: 100%;
border: 1px solid black;
margin: 0.2rem;
padding: 0.2rem;
}

.search-facets > ul {
display: flex;
flex-wrap: wrap;
margin: 0.2rem;
padding: 0;
}

.search-facets * li {
list-style: none;
margin: 0.2rem
}

.search-facets * label {
margin: 0;
}

.search-facets * input {
padding: 0.1rem 0.25rem;
border: 1px solid black;
margin: 0.1rem;
font-size: 0.833rem !important;
font-weight: 400 !important;
line-height: 1.4375em;
background-color: whitesmoke;
}

.search-facets * input.refined {
background-color: #000;
color: white;
}

#components-list * input,
#services-list * input {
border-color: #a51aff;
}

#languages-list * input {
border-color: #00e8e8;
}

.ais-Hits-list {
padding: 0;
}

// Pagination CSS start

#pagination {
margin: 2rem auto;
}

.ais-Pagination-item {
display: inline-block;
}

span.ais-Pagination-link {
background-color: #e7e5e4;
}

.ais-Pagination-item.ais-Pagination-item--selected > a.ais-Pagination-link {
background-color: #000;
color: white;
}

.ais-Pagination-link {
text-decoration: none;
color: black;
padding: 0.2rem 1rem;
margin: 0 0.2rem;
border: 1px solid black;
}

a.ais-Pagination-link:hover {
color: black;
background-color: #e7e5e4;
}

.ais-Pagination-list {
text-align: center;
padding: 0;
}
// Pagination CSS end

// Tutorials page end

// Search-autocomplete start

.algolia-autocomplete {
flex-grow: 1;
}

// Search-autocomplete end

// Make videos work without js

.no-js * .lozad {
display: none;
}

// ensure tutorials page is 100% of height

.row.flex-xl-nowrap {
min-height: 100%;
}
8 changes: 7 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ weight = 1
codeFences = true

[outputs]
section = ["HTML"]
section = ["HTML", "Typesense"]

[outputFormats.Typesense]
baseName = "typesense"
isPlainText = true
mediaType = "application/json"
notAlternative = true

[params]
copyright = "Viam, Inc. - Documentation is licensed under Creative Commons ShareAlike License. "
Expand Down
4 changes: 4 additions & 0 deletions docs/components/base/agilex-limo.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ The following attributes are available for `agilex-limo` bases:
| ---- | ---- | --------- | ----------- |
| `drive_mode` | string | **Required** | LIMO [steering mode](https://docs.trossenrobotics.com/agilex_limo_docs/operation/steering_modes.html#switching-steering-modes). Options: `differential`, `ackermann`, `omni` (mecanum). |
| `serial_path` | string | **Required** | The full filesystem path to the serial device, starting with <file>/dev/</file>. With your serial device connected, you can run `sudo dmesg \| grep tty` to show relevant device connection log messages, and then match the returned device name, such as `ttyTHS1`, to its device file, such as <file>/dev/ttyTHS1</file>. If you omit this attribute, Viam will attempt to automatically detect the path.<br>Default: `/dev/ttyTHS1` |

## Test the base

{{< readfile "/static/include/components/base-control.md" >}}
4 changes: 4 additions & 0 deletions docs/components/base/boat.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ Each [motor](/components/motor/) inside of `Motors` has the following attributes
| `y_offset_mm` | int | **Required** | |
| `angle_degs` | int | **Required** | |
| `Weight` | int | **Required** | |

## Test the base

{{< readfile "/static/include/components/base-control.md" >}}
4 changes: 4 additions & 0 deletions docs/components/base/fake.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ Click **Create component**.

No attributes are available for `fake` bases.
See [GitHub](https://github.com/viamrobotics/rdk/blob/main/components/base/fake/fake.go) for API call return specifications.

## Test the base

{{< readfile "/static/include/components/base-control.md" >}}
4 changes: 4 additions & 0 deletions docs/components/base/wheeled.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,7 @@ An example wiring diagram for a base with one motor on each side:
![Wiring diagram showing a Raspberry Pi, motor drivers, motors, power supply, and voltage regulator for the rover](/components/base/base-wiring-diagram.png)

Note that your base's wiring will vary depending on your choice of board, motors, motor drivers, and power supply.

## Test the base

{{< readfile "/static/include/components/base-control.md" >}}
13 changes: 11 additions & 2 deletions docs/extend/modular-resources/create/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,18 @@ Your options for completing this step are flexible, as this file does not need t
One option is to create and save a new shell script (<file>.sh</file>) that runs your module at your entry point (main program) file.

Make sure that you set up a Python virtual environment in the directory your module is in to compile your resource properly at execution.
See the [Python Documentation](https://docs.python-guide.org/dev/virtualenvs/) for help with this.
See the [Python virtual environment documentation](https://docs.python-guide.org/dev/virtualenvs/) for more information.

Include `venv` set-up and manage dependencies in your script as in the following template:
You will also need to create a `requirements.txt` file containing a list of all the dependencies your module relies on.
For example, a `requirements.txt` file with the following contents ensures that the Viam Python SDK (`viam-sdk`) is installed. You may also add additional dependencies as needed:

``` sh {id="terminal-prompt" class="command-line" data-prompt="$"}
viam-sdk
```

See the [pip `requirements.txt` file documentation](https://pip.pypa.io/en/stable/reference/requirements-file-format/) for more information.

The following template sets up a new virtual enviroment (`venv`), installs the dependencies listed in `requirements.txt`, and runs the module entry point file `main.py`:

``` sh {id="terminal-prompt" class="command-line" data-prompt="$"}
#!/bin/sh
Expand Down
4 changes: 2 additions & 2 deletions docs/extend/modular-resources/upload/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ To upload your custom module to the Viam Registry, either as a public or private
tar -czf module.tar.gz run.sh requirements.txt src
```
Where `run.sh` is your [entrypoint file](/extend/modular-resources/create/#compile-the-module-into-an-executable), `requirements.txt` is your Python dependency list, and `src` is the source directory of your module.
Where `run.sh` is your [entrypoint file](/extend/modular-resources/create/#compile-the-module-into-an-executable), `requirements.txt` is your [pip dependency list file](/extend/modular-resources/create/#compile-the-module-into-an-executable), and `src` is the source directory of your module.
1. Run `viam module upload` to upload the updated custom module to the Viam Registry:
Expand Down Expand Up @@ -214,7 +214,7 @@ You can also use the [Viam CLI](/manage/cli/) to update an existing custom modul
tar -czf module.tar.gz run.sh requirements.txt src
```
Where `run.sh` is your [entrypoint file](/extend/modular-resources/create/#compile-the-module-into-an-executable), `requirements.txt` is your Python dependency list, and `src` is the source directory of your module.
Where `run.sh` is your [entrypoint file](/extend/modular-resources/create/#compile-the-module-into-an-executable), `requirements.txt` is your [pip dependency list file](/extend/modular-resources/create/#compile-the-module-into-an-executable), and `src` is the source directory of your module.
1. Run `viam module upload` to upload the updated custom module to the Viam Registry:
Expand Down
6 changes: 3 additions & 3 deletions docs/note.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The following is an example of the <file>secret-share.md</file> alert added usin

- **Markdown Image Example**<br>
![expand example](/general/expander-markdown.png)<br>
- **HTML Image Example*- (with border)<br>
- **HTML Image Example** (with border)<br>
{{<imgproc src="/general/expander-markdown.png" resize="800x" declaredimensions=true alt="Screen capture of Tab/Tabs Shortcode Usage">}}

</div>
Expand Down Expand Up @@ -254,12 +254,12 @@ Use to notify the reader of information to avoid loss of life, personal injury,
## Using the Figure Shortcode

The figure shortcode enhances the existing figure and figurecaption html tags.
Figure supports the standard html attributes associated with the html img and figure tags, as well as an **attr*- element for attribution text and **attrlink*- if you wish to add a link to the attribution text.
Figure supports the standard html attributes associated with the html img and figure tags, as well as an **attr** element for attribution text and **attrlink** if you wish to add a link to the attribution text.

{{< figure src="/general/figure-shortcode.png" alt="The shortcode used to display an image, its caption, and its attribution." title="Figure Shortcode" >}}

This shortcode places the caption (that is the "title") above the table.
The **title*- is set in 12pt italic with a green underline.
The **title** is set in 12pt italic with a green underline.

Figure styles the Attribution text as body text.

Expand Down
Loading

0 comments on commit 3400631

Please sign in to comment.