Skip to content

Commit

Permalink
Update web
Browse files Browse the repository at this point in the history
  • Loading branch information
costashatz committed Feb 1, 2024
1 parent c5d5c1f commit 4ede05e
Show file tree
Hide file tree
Showing 12 changed files with 269 additions and 302 deletions.
122 changes: 99 additions & 23 deletions docs/faq/index.html

Large diffs are not rendered by default.

192 changes: 60 additions & 132 deletions docs/install/index.html

Large diffs are not rendered by default.

31 changes: 23 additions & 8 deletions docs/quick_install/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@

<li class="md-nav__item">
<a href="#ubuntu-2004" class="md-nav__link">
Ubuntu 20.04
Ubuntu &gt;=20.04
</a>

</li>
Expand Down Expand Up @@ -481,7 +481,7 @@

<li class="md-nav__item">
<a href="#ubuntu-2004" class="md-nav__link">
Ubuntu 20.04
Ubuntu &gt;=20.04
</a>

</li>
Expand Down Expand Up @@ -525,22 +525,37 @@ <h1>Installation</h1>
display: none;
}
</style>

<h2 id="scripts-for-quick-installation-of-robotdart">Scripts for Quick Installation of RobotDART<a class="headerlink" href="#scripts-for-quick-installation-of-robotdart" title="Permanent link">&para;</a></h2>
<p>In this page we provide standalone scripts for installing RobotDART for <code>Ubuntu</code> (20.04) and <code>OSX</code>. The scripts will install all the required dependencies and RobotDART. Notably, all dependencies that need to be compiled by source and RobotDART will be installed inside the <code>/opt</code> folder. This way, one can be rest assured that their system will be clean.</p>
<h3 id="ubuntu-2004">Ubuntu 20.04<a class="headerlink" href="#ubuntu-2004" title="Permanent link">&para;</a></h3>
<p>To quickly install RobotDART on <code>Ubuntu 20.04</code>, we just need to run <code>./scripts/install_ubuntu.sh</code> from the root of the repo. In more detail:</p>
<p>In this page we provide standalone scripts for installing RobotDART for <code>Ubuntu</code> (&gt;=20.04) and <code>OSX</code>. The scripts will install all the required dependencies and RobotDART. Notably, all dependencies that need to be compiled by source and RobotDART will be installed inside the <code>/opt</code> folder. This way, one can be rest assured that their system will be clean.</p>
<h3 id="ubuntu-2004">Ubuntu &gt;=20.04<a class="headerlink" href="#ubuntu-2004" title="Permanent link">&para;</a></h3>
<p>To quickly install RobotDART on <code>Ubuntu &gt;=20.04</code>, we just need to run <code>./scripts/install_ubuntu.sh</code> from the root of the repo. In more detail:</p>
<ul>
<li><code>git clone https://github.com/resibots/robot_dart.git</code></li>
<li><code>cd robot_dart</code></li>
<li><code>./scripts/install_ubuntu.sh</code></li>
</ul>
<p>This will install everything needed! Once the script is successfully executed, one should add the following to their <code>~/.bashrc</code> or <code>~/.zshrc</code> file:</p>
<p>This will install everything needed! Once the script is successfully executed, one should add the following to their <code>~/.bashrc</code> or <code>~/.zshrc</code> file (you may need to swap the python version to yours<sup id="fnref:1"><a class="footnote-ref" href="#fn:1">1</a></sup>):</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span>/opt/magnum/bin:<span class="nv">$PATH</span>
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/opt/dart/lib:/opt/magnum/lib:/opt/robot_dart/lib:<span class="nv">$LD_LIBRARY_PATH</span>
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PYTHONPATH</span><span class="o">=</span>/opt/dart/lib/python3/dist-packages:/opt/robot_dart/lib/python3.8/site-packages:<span class="nv">$PYTHONPATH</span>
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/opt/magnum/lib:/opt/robot_dart/lib:<span class="nv">$LD_LIBRARY_PATH</span>
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PYTHONPATH</span><span class="o">=</span>/opt/robot_dart/lib/python3.10/site-packages:<span class="nv">$PYTHONPATH</span>
</code></pre></div>
<!-- ```bash
export PATH=/opt/magnum/bin:$PATH
export LD_LIBRARY_PATH=/opt/dart/lib:/opt/magnum/lib:/opt/robot_dart/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/dart/lib/python3/dist-packages:/opt/robot_dart/lib/python3.8/site-packages:$PYTHONPATH
``` -->

<h3 id="osx">OSX<a class="headerlink" href="#osx" title="Permanent link">&para;</a></h3>
<p><strong>Coming soon</strong></p>
<div class="footnote">
<hr />
<ol>
<li id="fn:1">
<p>You can run <code>python --version</code> to see your version. We only keep the major.minor (ignoring the patch version)&#160;<a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text">&#8617;</a></p>
</li>
</ol>
</div>



Expand Down
2 changes: 1 addition & 1 deletion docs/search/search_index.json

Large diffs are not rendered by default.

Binary file modified docs/sitemap.xml.gz
Binary file not shown.
20 changes: 4 additions & 16 deletions scripts/install_osx.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
set -x
# sudo apt-add-repository -y ppa:dartsim/ppa
# sudo apt update
# sudo apt install -y build-essential cmake pkg-config git
# sudo apt install -y libeigen3-dev libccd-dev libfcl-dev libboost-regex-dev libboost-system-dev libbullet-dev libode-dev liboctomap-dev
# sudo apt install -y libtinyxml-dev libtinyxml2-dev
# sudo apt install -y liburdfdom-dev liburdfdom-headers-dev python3-pip python3-numpy
# sudo apt install -y libxi-dev libxmu-dev freeglut3-dev libopenscenegraph-dev
# sudo apt install -y libassimp-dev pybind11-dev
# sudo apt install -y libopenal-dev libglfw3-dev libsdl2-dev libopenexr-dev
# sudo apt install -y libdevil-dev libpng-dev libfaad-dev libfreetype6-dev libglm-dev
# sudo apt install -y python-is-python3


brew install cmake eigen fcl tinyxml tinyxml2 urdfdom assimp boost numpy
brew install cmake eigen fcl tinyxml tinyxml2 urdfdom assimp boost numpy fmt
python -m pip install numpy pytest

# Remove previous attempts
Expand Down Expand Up @@ -69,7 +57,7 @@ cd ../..
git clone --depth 1 https://github.com/mosra/magnum-integration.git
cd magnum-integration
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WITH_DART=ON -DMAGNUM_WITH_EIGEN=ON -DMAGNUM_WITH_BULLET=ON -DMAGNUM_WITH_GLM=ON ..
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WITH_DART=ON -DMAGNUM_WITH_EIGEN=ON -DMAGNUM_WITH_BULLET=ON -DMAGNUM_WITH_GLM=OFF ..
make -j
sudo make install
cd ../..
Expand All @@ -78,16 +66,16 @@ pwd
export PATH=/opt/magnum/bin:$PATH
export LD_LIBRARY_PATH=/opt/magnum/lib:$LD_LIBRARY_PATH

# sudo ln -s /usr/bin/python3 /usr/bin/python
pwd
cd ../
pwd
rm -rf temp_robot_dart
cd ..
pwd

# RobotDART
./waf configure --prefix /opt/robot_dart --python --dart /opt/dart --corrade_install_dir /opt/magnum --magnum_install_dir /opt/magnum --magnum_plugins_install_dir /opt/magnum --magnum_integration_install_dir /opt/magnum
./waf -j8
./waf examples -j8
#sudo ./waf install
sudo ./waf install

63 changes: 38 additions & 25 deletions scripts/install_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,61 +1,75 @@
CLEAN=0

CLEAN=${4:-$CLEAN}

sudo apt-add-repository -y ppa:dartsim/ppa
sudo apt update
sudo apt install -y build-essential cmake pkg-config git
sudo apt install -y libeigen3-dev libccd-dev libfcl-dev libboost-regex-dev libboost-system-dev libbullet-dev libode-dev liboctomap-dev
sudo apt install -y libtinyxml-dev libtinyxml2-dev
sudo apt install -y liburdfdom-dev liburdfdom-headers-dev python3-pip python3-numpy
sudo apt install -y libboost-regex-dev libboost-system-dev libboost-test-dev
sudo apt install -y libdart-all-dev
sudo apt install -y libxi-dev libxmu-dev freeglut3-dev libopenscenegraph-dev
sudo apt install -y libassimp-dev pybind11-dev
sudo apt install -y libopenal-dev libglfw3-dev libsdl2-dev libopenexr-dev
sudo apt install -y libdevil-dev libpng-dev libfaad-dev libfreetype6-dev libglm-dev
sudo apt install -y python-is-python3
sudo apt install -y python3-pip python3-numpy python-is-python3

# Remove previous attempts
rm -rf /opt/magnum
rm -rf /opt/dart
rm -rf /opt/robot_dart
if [ $CLEAN -ne 0 ]; then
echo "-- Cleaning.."
# Remove previous attempts
sudo rm -rf /opt/magnum
# rm -rf /opt/dart
sudo rm -rf /opt/robot_dart
fi

# Make temp folder
mkdir -p temp_robot_dart
cd temp_robot_dart

# DART
git clone https://github.com/dartsim/dart.git
cd dart && git checkout v6.12.1
mkdir build && cd build
cmake -DDART_BUILD_DARTPY=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/dart ..
make -j8
sudo make install

export LD_LIBRARY_PATH=/opt/dart/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/dart/lib/python3/dist-packages:$PYTHONPATH
if [ $CLEAN -ne 0 ]; then
rm -rf corrade
rm -rf magnum
rm -rf magnum-plugins
rm -rf magnum-integration
fi

# Magnum related
cd ../..
if [ ! -d "corrade" ]
then
git clone https://github.com/mosra/corrade.git
fi
cd corrade
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum ..
make -j8
sudo make install

cd ../..
if [ ! -d "magnum" ]
then
git clone https://github.com/mosra/magnum.git
fi
cd magnum
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WITH_AUDIO=ON -DMAGNUM_WITH_DEBUGTOOLS=ON -DMAGNUM_WITH_GL=ON -DMAGNUM_WITH_MESHTOOLS=ON -DMAGNUM_WITH_PRIMITIVES=ON -DMAGNUM_WITH_SCENEGRAPH=ON -DMAGNUM_WITH_SHADERS=ON -DMAGNUM_WITH_TEXT=ON -DMAGNUM_WITH_TEXTURETOOLS=ON -DMAGNUM_WITH_TRADE=ON -DMAGNUM_WITH_GLFWAPPLICATION=ON -DMAGNUM_WITH_WINDOWLESSGLXAPPLICATION=ON -DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON -DMAGNUM_WITH_OPENGLTESTER=ON -DMAGNUM_WITH_ANYAUDIOIMPORTER=ON -DMAGNUM_WITH_ANYIMAGECONVERTER=ON -DMAGNUM_WITH_ANYIMAGEIMPORTER=ON -DMAGNUM_WITH_ANYSCENEIMPORTER=ON -DMAGNUM_WITH_MAGNUMFONT=ON -DMAGNUM_WITH_OBJIMPORTER=ON -DMAGNUM_WITH_TGAIMPORTER=ON -DMAGNUM_WITH_WAVAUDIOIMPORTER=ON -DMAGNUM_WITH_GL_INFO=ON -DMAGNUM_WITH_AL_INFO=ON ..
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WITH_AUDIO=ON -DMAGNUM_WITH_DEBUGTOOLS=ON -DMAGNUM_WITH_GL=ON -DMAGNUM_WITH_MESHTOOLS=ON -DMAGNUM_WITH_PRIMITIVES=ON -DMAGNUM_WITH_SCENEGRAPH=ON -DMAGNUM_WITH_SHADERS=ON -DMAGNUM_WITH_TEXT=ON -DMAGNUM_WITH_TEXTURETOOLS=ON -DMAGNUM_WITH_TRADE=ON -DMAGNUM_WITH_GLFWAPPLICATION=ON -DMAGNUM_WITH_WINDOWLESSGLXAPPLICATION=ON -DMAGNUM_WITH_WINDOWLESSEGLAPPLICATION=ON -DMAGNUM_WITH_OPENGLTESTER=ON -DMAGNUM_WITH_ANYAUDIOIMPORTER=ON -DMAGNUM_WITH_ANYIMAGECONVERTER=ON -DMAGNUM_WITH_ANYIMAGEIMPORTER=ON -DMAGNUM_WITH_ANYSCENEIMPORTER=ON -DMAGNUM_WITH_MAGNUMFONT=ON -DMAGNUM_WITH_OBJIMPORTER=ON -DMAGNUM_WITH_TGAIMPORTER=ON -DMAGNUM_WITH_WAVAUDIOIMPORTER=ON -DMAGNUM_WITH_GL_INFO=ON -DMAGNUM_WITH_AL_INFO=ON -DMAGNUM_TARGET_EGL=ON ..
make -j8
sudo make install

cd ../..
if [ ! -d "magnum-plugins" ]
then
git clone https://github.com/mosra/magnum-plugins.git
fi
cd magnum-plugins
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WITH_ASSIMPIMPORTER=ON -DMAGNUM_WITH_DDSIMPORTER=ON -DMAGNUM_WITH_JPEGIMPORTER=ON -DMAGNUM_WITH_OPENGEXIMPORTER=ON -DMAGNUM_WITH_PNGIMPORTER=ON -DMAGNUM_WITH_TINYGLTFIMPORTER=ON -DMAGNUM_WITH_STBTRUETYPEFONT=ON ..
make -j
sudo make install

cd ../..
if [ ! -d "magnum-integration" ]
then
git clone https://github.com/mosra/magnum-integration.git
fi
cd magnum-integration
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WITH_DART=ON -DMAGNUM_WITH_EIGEN=ON -DMAGNUM_WITH_BULLET=ON -DMAGNUM_WITH_GLM=ON ..
Expand All @@ -65,14 +79,13 @@ sudo make install
export PATH=/opt/magnum/bin:$PATH
export LD_LIBRARY_PATH=/opt/magnum/lib:$LD_LIBRARY_PATH

# sudo ln -s /usr/bin/python3 /usr/bin/python

cd ../../..
rm -rf temp_robot_dart
if [ $CLEAN -ne 0 ]; then
rm -rf temp_robot_dart
fi

# RobotDART
./waf configure --prefix /opt/robot_dart --python --dart /opt/dart --corrade_install_dir /opt/magnum --magnum_install_dir /opt/magnum --magnum_plugins_install_dir /opt/magnum --magnum_integration_install_dir /opt/magnum
./waf configure --prefix /opt/robot_dart --python --corrade_install_dir /opt/magnum --magnum_install_dir /opt/magnum --magnum_plugins_install_dir /opt/magnum --magnum_integration_install_dir /opt/magnum
./waf -j8
./waf examples -j8
sudo ./waf install

13 changes: 10 additions & 3 deletions src/docs/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ See the [robots page](robots.md) for details.

To enable graphics in your code, you need to do the following:

- Install [Magnum](http://magnum.graphics). See the [installation page](install.md) for details.
- Install [Magnum](http://magnum.graphics). See the [installation page](quick_install.md) for details.
- Create and set a graphics object in the simulation object. Here's an example:

=== "C++"
Expand Down Expand Up @@ -355,7 +355,6 @@ We can save the depth images as well:

## **How can I spawn multiple robots in parallel?**


### Robot Pool (only in C++)

The best way to do so is to create a Robot pool. With a robot pool you:
Expand Down Expand Up @@ -388,12 +387,20 @@ The `creator` function is the function responsible for loading your robot. This
=== "C++"
{{ROBOT_POOL_EVAL}}

### Python

We have not implemented this feature in `Python` yet. One can emulate the `RobotPool` behavior or create a custom parallel robot loader.

## **I need to simulate many worlds with camera sensors in parallel. How can I do this?**

On [magnum_contexts.cpp](https://github.com/resibots/robot_dart/blob/master/src/examples/magnum_contexts.cpp) you can find an example showcasing the use of many worlds with camera sensors in parallel. The main takeaway is that we need to pre-allocate OpenGL contexts so that each thread can take one and use it to render their worlds.
Below you can find an example showcasing the use of many worlds with camera sensors in parallel.

=== "C++"
{{CAMERAS_PARALLEL}}
=== "Python"
{{CAMERAS_PARALLEL_PYTHON}}

In C++ you are also able to pre-allocate a custom number of OpenGL contexts so that you can take advantage of stronger GPUs.

## **I do not know how to use waf. How can I detect RobotDART from CMake?**

Expand Down
Loading

0 comments on commit 4ede05e

Please sign in to comment.