Skip to content

Commit 1716a96

Browse files
authored
Update README with gif admonition (#561)
1 parent 5d9c8ed commit 1716a96

2 files changed

Lines changed: 43 additions & 2 deletions

File tree

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,44 @@ moveit_tutorials/doc/
9595
├── <tutorial_name>_tutorial_test.py # Python tests for tutorial
9696
└── <tutorial_name>_tutorial_test.cpp # C++ tests for tutorial
9797
```
98+
99+
### Including Images and Videos
100+
#### Images
101+
The standard way to include an image in reStructuredText is
102+
```
103+
.. image:: filename.png
104+
:width: 700px
105+
```
106+
107+
This assumes that `filename.png` is in the same folder as the source `.rst` file. Images linked in this way will automatically be copied to the appropriate folder in the build.
108+
109+
[External Documentation](https://sublime-and-sphinx-guide.readthedocs.io/en/latest/images.html)
110+
111+
Do **not** include animated gifs as the file format leads to very large files. Use a video format like `webm` and see the section on local video below.
112+
113+
#### YouTube and other External Video
114+
You can embed video with raw html, like in this example from the Pick and Place Tutorial.
115+
```
116+
.. raw:: html
117+
118+
<div style="position: relative; padding-bottom: 5%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
119+
<iframe width="700px" height="400px" src="https://www.youtube.com/embed/QBJPxx_63Bs?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
120+
</div>
121+
```
122+
This includes [Youtube's suggested embed html](https://support.google.com/youtube/answer/171780?hl=en).
123+
124+
#### Local Video
125+
To embed a video that is included in this repository, you also will use raw html, like this example from the Quickstart in RViz tutorial.
126+
127+
```
128+
.. raw:: html
129+
130+
<video width="700px" nocontrols="true" autoplay="true" loop="true">
131+
<source src="../../_static/rviz_joints_nullspace.webm" type="video/webm">
132+
The joints moving while the end effector stays still
133+
</video>
134+
```
135+
136+
Note that the video file is in the `_static` folder instead of the same folder.
137+
138+
[External Documentation on &lt;video&gt; tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video)

doc/quickstart_in_rviz/quickstart_in_rviz_tutorial.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ You can use the **Joints** tab to move single joints and the redundant joints of
137137
.. raw:: html
138138

139139
<video width="700px" nocontrols="true" autoplay="true" loop="true">
140-
<source src="../../_static/rviz_joints_nullspace.webm" type="video/webm">
141-
The joints moving while the end effector stays still
140+
<source src="../../_static/rviz_joints_nullspace.webm" type="video/webm">
141+
The joints moving while the end effector stays still
142142
</video>
143143

144144
Step 4: Use Motion Planning with the Panda

0 commit comments

Comments
 (0)