Skip to content

Commit

Permalink
[doc] Update install instructions
Browse files Browse the repository at this point in the history
Include Homebrew and vcpkg instructions
  • Loading branch information
gergondet committed Aug 10, 2021
1 parent 3f63c71 commit b5f2e69
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 14 deletions.
12 changes: 7 additions & 5 deletions doc/_includes/show_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
{% endif %}
{% highlight text %}{{ source }}{% endhighlight %}
{% endif %}
{% if include.copy %}
{% capture id %}{{ include.id }}{{ include.lang }}CopySource{% endcapture %}
<div class="text-right">
<pre id="{{id}}" class="offscreen" aria-hidden=true>{{ source }}</pre>
<button class="btn btn-primary copy-button" data-clipboard-target="#{{id}}">{% octicon copy %}</button>
</div>
{% endif %}
</div>
</div>
{% if include.copy %}
{% capture id %}{{ include.id }}{{ include.lang }}CopySource{% endcapture %}
<pre id="{{id}}" class="offscreen" aria-hidden=true>{{ source }}</pre>
<button class="btn btn-primary copy-button" data-clipboard-target="#{{id}}">Copy to clipboard</button>
{% endif %}
9 changes: 7 additions & 2 deletions doc/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@

{% if site.use_local_libraries %}
<link rel="stylesheet" href="{{site.baseurl}}/assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="{{site.baseurl}}/assets/css/octicons.css" />

<script src="{{site.baseurl}}/assets/js/jquery.min.js"></script>
<script src="{{site.baseurl}}/assets/js/popper.min.js"></script>
<script src="{{site.baseurl}}/assets/js/bootstrap.min.js"></script>
<script src="{{site.baseurl}}/assets/js/clipboard.min.js"></script>
{% else %}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.0.0/build.css" integrity="sha256-iPUhChwurLRCrDCM1+2a2LDe9pfW6Je29o/oA5VPr28=" crossorigin="anonymous" />

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
Expand Down Expand Up @@ -99,4 +97,11 @@
</div>
</body>

<script type="text/javascript">
$(document).ready(function()
{
new ClipboardJS('.copy-button');
});
</script>

</html>
2 changes: 0 additions & 2 deletions doc/_layouts/json.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,5 @@
}
window.location.hash = $this.data("permalink");
});

new ClipboardJS('.copy-button');
});
</script>
7 changes: 7 additions & 0 deletions doc/_layouts/tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,11 @@ <h1>{{tutorial.title}}{% if is_sources %} (sources){% endif %}</h1>
</div>
</body>

<script type="text/javascript">
$(document).ready(function()
{
new ClipboardJS('.copy-button');
});
</script>

</html>
7 changes: 7 additions & 0 deletions doc/css/mc_rtc.css
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,10 @@ body
margin-top: 20px;
margin-bottom: 20px;
}

.octicon {
display: inline-block;
vertical-align: text-top;
fill: currentColor;
overflow: visible;
}
1 change: 0 additions & 1 deletion doc/setup-local-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ mkdir -p $doc_dir/assets/css
mkdir -p $doc_dir/assets/js
cd $doc_dir/assets/css
wget -O bootstrap.min.css $BOOTSTRAP_CSS
wget -O octicons.css https://cdnjs.cloudflare.com/ajax/libs/octicons/8.0.0/build.css
cd $doc_dir/assets/js
wget -O jquery.min.js $JQUERY
wget -O popper.min.js $POPPER
Expand Down
66 changes: 62 additions & 4 deletions doc/tutorials/introduction/installation-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ install_apt:
# Install packages
sudo apt install libmc-rtc-dev mc-rtc-utils
# Assuming you have a ROS distribution mirror setup
sudo apt install ros-${ROS_DISTRO}-mc-rtc-plugin
sudo apt install ros-${ROS_DISTRO}-mc-rtc-plugin ros-${ROS_DISTRO}-mc-rtc-tools
- name: Install head version
lang: bash
source: |
Expand All @@ -18,7 +18,7 @@ install_apt:
# Install packages
sudo apt install libmc-rtc-dev mc-rtc-utils
# Assuming you have a ROS distribution mirror setup
sudo apt install ros-${ROS_DISTRO}-mc-rtc-plugin
sudo apt install ros-${ROS_DISTRO}-mc-rtc-plugin ros-${ROS_DISTRO}-mc-rtc-tools
toc: true
---

Expand All @@ -30,14 +30,72 @@ mc\_rtc is an interface for simulation and robot control systems. These systems

## Installation instruction

We provide binary installation for current Ubuntu LTS releases. We also provide a source release using an easy-to-use script for Ubuntu, macOS and Windows.
We provide binaries for the current Ubuntu LTS releases and macOS via [Homebrew](https://brew.sh/). We also provide a source release using an easy-to-use script for Ubuntu, macOS and Windows and a [vcpkg](https://vcpkg.io/en/index.html) registry.

Binaries are recommended for Ubuntu users and macOS users. vcpkg is recommended for Windows users.

### Ubuntu LTS (16.04, 18.04, 20.04)

{% include show_sources.html sources=page.install_apt copy=false id="install_apt" %}
{% include show_sources.html sources=page.install_apt copy=false id="install_apt" copy=true %}

*Note: the distributed version of mc\_rtc runs with the QLD QP solver through [eigen-qld](https://github.com/jrl-umi3218/eigen-qld). If you have access to the LSSOL solver and thus can install [eigen-lssol](https://gite.lirmm.fr/multi-contact/eigen-lssol) then you can build [Tasks](https://github.com/jrl-umi3218/Tasks) with LSSOL support and install it in `/usr`. The two versions are binary compatible.*

### Homebrew (macOS)

Follow the official instructions to install [Homebrew](https://brew.sh/). Then:

{% capture source %}
brew tap mc-rtc/mc-rtc
brew install mc_rtc
{% endcapture %}

{% include show_source.html id="brew" lang="bash" source=source copy=true %}

### vcpkg

Follow [vcpkg](https://vcpkg.io/) instruction to install vcpkg on your system.

You can then setup our registry by creating a `vcpkg-configuration.json` file either alongside the `vcpkg` binary or alongside your `vcpkg.json` manifest:

{% capture source %}
{
"registries": [
{
"kind": "git",
"baseline": "{see below}",
"repository": "https://github.com/mc-rtc/vcpkg-registry",
"packages": [ "spacevecalg", "rbdyn", "eigen-qld", "sch-core", "tasks",
"mc-rbdyn-urdf", "mc-rtc-data", "eigen-quadprog", "state-observation",
"hpp-spline", "mc-rtc" ]
}
]
}
{% endcapture %}

{% include show_source.html id="vcpkg-configuration" lang="json" source=source copy=true %}

Where `baseline` should be the latest commit sha1 on [mc-rtc/vcpkg-registry](https://github.com/mc-rtc/vcpkg-registry/)

You can then either:

- install mc_rtc via the `vcpkg` command: `vcpkg install mc_rtc`
- use the mc_rtc package in your manifest (`vcpkg.json` file), such as the following example:

{% capture source %}
{
"name": "my-package",
"version-string": "1.0.0",
"homepage": "https://my.home",
"description": "My package description",
"dependencies": [
"mc-rtc"
]
}
{% endcapture %}

{% include show_source.html id="vcpkg-json" lang="json" source=source copy=true %}


### Building from source (script)

If you are building on Linux or macOS you can skip to the Building section. However, Windows users have to follow extra-instructions.
Expand Down

0 comments on commit b5f2e69

Please sign in to comment.