Skip to content

Commit e5fcfd5

Browse files
author
Murilo M. Marinho
committed
[book.md] Added instructions and further information about making your own book,
1 parent f8ae43c commit e5fcfd5

File tree

4 files changed

+128
-10
lines changed

4 files changed

+128
-10
lines changed

basic_lessons/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
---
2-
title: Introduction
3-
...
1+
# The Basics of Kinematic Modeling and Control of Serial-link Manipulators Using `numpy`
42

5-
## The Basics of Kinematic Modeling and Control of Serial-link Manipulators Using `numpy`
6-
7-
In this five-lesson tutorial, we start from the very basics of scalar and matricial operations in Python using `numpy`,
8-
all the way until the basics of kinematic control. Until kinematic control, most is based on [@spong2020robot].
3+
In this five-lesson tutorial, we start from the very basics of scalar and matricial operations in Python using `numpy`,
4+
all the way until the basics of kinematic control. Until kinematic control, most is based on [@spong2020robot].
95

106
# Using this book
117

book.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Making your own executable book
2+
3+
```{warning}
4+
This notebook is a work in progress. This is based on `Jupyter Book 2.0` which is currently in alpha, meaning that
5+
it might change considerably before release.
6+
```
7+
8+
```{seealso}
9+
- Jupyter book: https://next.jupyterbook.org
10+
- MyST: https://mystmd.org/guide/
11+
```
12+
13+
## Dependencies
14+
15+
Remember to set a `venv` first. The Python policies are becoming evermore stringent in this regard.
16+
17+
```commandline
18+
python -m venv venv
19+
source venv/bin/activate
20+
```
21+
22+
Installation can be done as follows.
23+
24+
```{important}
25+
The `--pre` flag is important while this version is not released.
26+
```
27+
28+
```commandline
29+
python -m pip install jupyter-book --pre
30+
```
31+
32+
## Cloning or downloading the repository
33+
34+
To clone, please use the usual.
35+
36+
```commandline
37+
git clone https://github.com/MarinhoLab/OpenExecutableBooksRobotics.git
38+
```
39+
40+
Further, the package can be downloaded from [here](https://github.com/MarinhoLab/OpenExecutableBooksRobotics/archive/refs/heads/main.zip).
41+
42+
## Building the book
43+
44+
### Live document
45+
46+
```commandline
47+
jupyter book start
48+
```
49+
50+
Then click on the link, output below
51+
52+
```
53+
✨✨✨ Starting Book Theme ✨✨✨
54+
55+
56+
57+
🔌 Server started on port 3000! 🥳 🎉
58+
59+
60+
👉 http://localhost:3000 👈
61+
62+
```
63+
64+
which usually, as described, connects to `http://localhost:3000`.
65+
66+
### Building the HTML
67+
68+
```
69+
jupyter book build --html
70+
```
71+
72+
If needed, the page can be opened at `_build/html/index.html`.
73+
74+
## Notebook configuration
75+
76+
In this version of jupyter notebook, `myst.yml` is the soul of the book. It is very uncommon that `conf.py` is needed.
77+
78+
```{literalinclude} myst.yml
79+
```
80+
81+
Everything in `myst.yml` is standard, aside from the following block.
82+
83+
```{literalinclude} myst.yml
84+
:start-at: #USING DQROBOTICS DEVEL [START]
85+
:end-at: #USING DQROBOTICS DEVEL [END]
86+
```
87+
88+
This is a temporary solution to address notebooks that do not play well together. Currently, a jupyter book spawns one process
89+
of each notebook and results can be nondeterministic if notebooks can affect each other. More information can be seen
90+
[here](https://github.com/jupyter-book/mystmd/issues/1794).
91+
92+
I'm combining that block with a simple use of `sed` to guarantee the initial lessons that use the stable version of `dqrobotics`
93+
run before lessons that need the development version of `dqrobotics.` For more information, see the file below.
94+
95+
```{literalinclude} build_html.sh
96+
```
97+
98+
We currently only need `conf.py` below for math commands in MySt documents.
99+
100+
```{literalinclude} conf.py
101+
```
102+
103+
## Deployment in GitHub
104+
105+
```{important}
106+
It is very common for GitHub Actions to change how it works internally. This can affect, for instance, the version of the
107+
images run by the GitHub Actions runners, how GitHub Pages works, or how artifact upload works. If the workflow mentioned
108+
herein no longer works in the future, it is important to look at initially newer versions of the imported actions.
109+
Currently:
110+
- `actions/checkout@v4`
111+
- `actions/upload-pages-artifact@v3`
112+
- `actions/configure-pages@v4`
113+
- `actions/deploy-pages@v4`
114+
```
115+
116+
This workflow is straightforward and effective. The only external action needed is to set, in your repository,
117+
`⚙Settings > Pages > Build and deployment > Source > GitHub Actions`.
118+
119+
120+
```{literalinclude} .github/workflows/notebook_to_html.yml
121+
```
122+
123+

dqrobotics/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Introduction
2-
3-
## Kinematic modeling and control of serial-link robotic manipulators using `dqrobotics` Python: From zero to hero.
1+
# Kinematic modeling and control of serial-link robotic manipulators using `dqrobotics` Python: From zero to hero.
42

53
This executable book contains eight lessons representing serial-link manipulator modeling in dual quaternions using `dqrobobotics` described in http://doi.org/10.1109/MRA.2020.2997920. It is a derivative
64
work of a [`dqrobotics` MATLAB course](https://github.com/dqrobotics/learning-dqrobotics-in-matlab/tree/master/robotic_manipulators) from Murilo M. Marinho.

myst.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ project:
5050
- file: dqrobotics/lesson6/lesson_dq6_robot_control_basics_part2.ipynb
5151
- file: dqrobotics/lesson7/lesson_dq7_robot_control_basics_part3.ipynb
5252
- file: dqrobotics/lesson8/lesson_dq8_optimization_based_robot_control.ipynb
53+
- file: book.md
5354
- file: CHANGELOG.md
5455
- file: TODO.md
5556
#USING DQROBOTICS DEVEL [START]

0 commit comments

Comments
 (0)