<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.2">Jekyll</generator><link href="https://paul-mesnilgrente.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://paul-mesnilgrente.github.io/" rel="alternate" type="text/html" /><updated>2023-01-31T15:02:08+00:00</updated><id>https://paul-mesnilgrente.github.io/feed.xml</id><title type="html">Paul Mesnilgrente</title><subtitle>Paul Mesnilgrente's blog. It is mostly about robotics, machine learning, linux and web development.</subtitle><entry><title type="html">Install rbenv and use it</title><link href="https://paul-mesnilgrente.github.io/ruby/rbenv/installation/2018/05/03/rbenv-installation-and-use.html" rel="alternate" type="text/html" title="Install rbenv and use it" /><published>2018-05-03T00:00:00+00:00</published><updated>2018-05-03T00:00:00+00:00</updated><id>https://paul-mesnilgrente.github.io/ruby/rbenv/installation/2018/05/03/rbenv-installation-and-use</id><content type="html" xml:base="https://paul-mesnilgrente.github.io/ruby/rbenv/installation/2018/05/03/rbenv-installation-and-use.html">&lt;h2 id=&quot;i-what-is-rbenv&quot;&gt;I. What is rbenv&lt;/h2&gt;

&lt;p&gt;Rbenv is a tool to manage your ruby versions. It works in collaboration with
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundler&lt;/code&gt; which manage your development libraries versions. You can find more
information on their &lt;a href=&quot;https://github.com/rbenv/rbenv&quot;&gt;github
page&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;ii-why-i-prefer-rbenv-to-rvm&quot;&gt;II. Why I prefer rbenv to RVM&lt;/h2&gt;

&lt;p&gt;One reason can be found in the article on &lt;a href=&quot;/ruby/rvm/installation/2018/05/02/rvm-and-ruby-installation.html&quot;&gt;RVM&lt;/a&gt;: there is a bug. But actually, rbenv
themselves are explaining it well
&lt;a href=&quot;https://github.com/rbenv/rbenv/wiki/Why-rbenv%3F&quot;&gt;here&lt;/a&gt;. The &lt;strong&gt;main&lt;/strong&gt; reason is
that I don’t like to change my shell (RVM overrides cd!) only to have a ruby
version manager. I think it is an overkill in comparison of rbenv and this is
dangerous as well.&lt;/p&gt;

&lt;p&gt;Another point is, python has used the same mechanism as Ruby, the project is
called &lt;a href=&quot;https://github.com/pyenv/pyenv&quot;&gt;pyenv&lt;/a&gt;. So it will be very easy to
understand how pyenv works if you have understood how rbenv works. Even if
python includes the concept of virtual environemnts.&lt;/p&gt;

&lt;h2 id=&quot;iii-install-and-use-rbenv&quot;&gt;III. Install and use rbenv&lt;/h2&gt;

&lt;h3 id=&quot;iii1-install-rbenv&quot;&gt;III.1. Install rbenv&lt;/h3&gt;

&lt;p&gt;Rbenv provides an installation script which include a plugin to facilitate the
ruby installation. You can find the repository on
&lt;a href=&quot;https://github.com/rbenv/rbenv-installer&quot;&gt;github&lt;/a&gt;. To summarize it in a bash
script:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# prepare the installation to avoid warnings from rbenv-doctor&lt;/span&gt;
curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'export PATH=&quot;$HOME/.rbenv/bin:$PATH&quot;'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'eval &quot;$(rbenv init -)&quot;'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc
&lt;span class=&quot;c&quot;&gt;# if you want to be sure that rbenv is correctly installed:&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#     - close the terminal and open a new one, or&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#     - source your ~/.bashrc&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#     - check that everything is OK in the result of the following command:&lt;/span&gt;
curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;iii2-use-rbenv-to-install-ruby&quot;&gt;III.2. Use rbenv to install ruby&lt;/h3&gt;

&lt;p&gt;When you wan to install Ruby on your OS, you have the choice. You can install
ruby from your package manager (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt install ruby&lt;/code&gt;), rbenv will take it
into account. Or you can install a specific ruby version (for development
maybe) with: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv install 2.4.2&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After installing a new version with rbenv, you should execute &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv rehash&lt;/code&gt; to
install/update the shims in your new version. More information about shims &lt;a href=&quot;https://github.com/rbenv/rbenv#understanding-shims&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;iii3-use-rbenv-to-develop-your-jekyll-website&quot;&gt;III.3. Use rbenv to develop your jekyll website&lt;/h3&gt;

&lt;p&gt;One powerfull feature of rbenv is to set default (global) and local ruby
versions easily. For example, if you want to let your default ruby version to
be the one installed by the package manager, run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv global system&lt;/code&gt;. But if
you want to develop your jekyll website and make it work on github, you will
need to:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;set a ruby version for the development&lt;/li&gt;
  &lt;li&gt;manage jekyll dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is a script to retrieve your jekyll website, install everything and begin
to write articles:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# install the currently ruby version supported by github-pages&lt;/span&gt;
rbenv &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;2.5.3
rbenv rehash
&lt;span class=&quot;c&quot;&gt;# retrieve your website&lt;/span&gt;
git clone git@github.com:/user/project.github.io
&lt;span class=&quot;c&quot;&gt;# set your ruby environment to 2.4.2 in this folder&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;project.github.io
rbenv &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;2.5.3
&lt;span class=&quot;c&quot;&gt;# install bundler, the ruby library package manager&lt;/span&gt;
gem &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;bundler
bundle &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--path&lt;/span&gt; vendor
&lt;span class=&quot;c&quot;&gt;# add vendor to .gitignore if not already done&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; vendor .gitignore&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-eq&lt;/span&gt; 0 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;vendor &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; .gitignore
&lt;span class=&quot;c&quot;&gt;# star the jekyll built-in server&lt;/span&gt;
bundle &lt;span class=&quot;nb&quot;&gt;exec &lt;/span&gt;jekyll serve
&lt;span class=&quot;c&quot;&gt;# if you want to show the drafts&lt;/span&gt;
bundle &lt;span class=&quot;nb&quot;&gt;exec &lt;/span&gt;jekyll serve &lt;span class=&quot;nt&quot;&gt;--drafts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You should update your packages versions in Gemfile to make it match
the one from github-pages. You can check github-pages package versions
&lt;a href=&quot;https://pages.github.com/versions/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/rbenv/rbenv&quot;&gt;https://github.com/rbenv/rbenv&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/rbenv/rbenv-installer&quot;&gt;https://github.com/rbenv/rbenv-installer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/rbenv/rbenv/wiki/Why-rbenv%3F&quot;&gt;https://github.com/rbenv/rbenv/wiki/Why-rbenv%3F&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://gist.github.com/MicahElliott/2407918&quot;&gt;https://gist.github.com/MicahElliott/2407918&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://pages.github.com/versions/&quot;&gt;https://pages.github.com/versions/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/pyenv/pyenv&quot;&gt;https://github.com/pyenv/pyenv&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Paul Mesnilgrente</name></author><category term="ruby" /><category term="rbenv" /><category term="installation" /><summary type="html">I. What is rbenv</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://paul-mesnilgrente.github.io/assets/images/rbenv_logo.png" /><media:content medium="image" url="https://paul-mesnilgrente.github.io/assets/images/rbenv_logo.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">RVM and Ruby installation</title><link href="https://paul-mesnilgrente.github.io/ruby/rvm/installation/2018/05/02/rvm-and-ruby-installation.html" rel="alternate" type="text/html" title="RVM and Ruby installation" /><published>2018-05-02T00:00:00+00:00</published><updated>2018-05-02T00:00:00+00:00</updated><id>https://paul-mesnilgrente.github.io/ruby/rvm/installation/2018/05/02/rvm-and-ruby-installation</id><content type="html" xml:base="https://paul-mesnilgrente.github.io/ruby/rvm/installation/2018/05/02/rvm-and-ruby-installation.html">&lt;h2 id=&quot;basic-installation&quot;&gt;Basic installation&lt;/h2&gt;

&lt;p&gt;As stated on the RVM &lt;a href=&quot;https://rvm.io/rvm/install&quot;&gt;website&lt;/a&gt;. You can find the following instructions &lt;a href=&quot;https://github.com/rvm/ubuntu_rvm&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# install prerequisites&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;software-properties-common
&lt;span class=&quot;c&quot;&gt;# add the PPA&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-add-repository &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; ppa:rael-gc/rvm
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;rvm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; you don’t need to update the package list because adding a PPA does it automatically in Ubuntu 18.04.&lt;/p&gt;

&lt;p&gt;The webpage says that you should add all the user that are going to use RVM to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rvm group&lt;/code&gt;. Normally, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt install rvm&lt;/code&gt; did it for your current user. You can check it by typing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;groups $USER&lt;/code&gt;. If you want to add another user, you can do it with this command: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo usermod -a -G rvm &amp;lt;username&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The website says as well to change the configuration of your terminal by “Running command as a login shell”. This is under “Edit - Preferences - Command”:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/run_command_as_login_shell.png&quot; alt=&quot;run_command_as_login_shell.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then you need to log off and log in again in order to make some changes of your environment effective. You can restart as well instead of log off and log in.&lt;/p&gt;

&lt;h2 id=&quot;post-installation-instructions&quot;&gt;Post installation instructions&lt;/h2&gt;

&lt;p&gt;I highly recommend, once the installation are done, to install the latest stable ruby using rvm. To do so: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ruby install 2.5.1&lt;/code&gt;, you can check the version number &lt;a href=&quot;https://www.ruby-lang.org/en/downloads/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If by mistake, you installed another version and you don’t figure out how to make your desired ruby version the default (in my case, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ruby --default use 2.5.1&lt;/code&gt; didn’t work), you can put this line at the end of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.profile&lt;/code&gt;: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source $(rvm 1.9.3 do rvm env --path)&lt;/code&gt;. I had to add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rvm_silence_path_mismatch_check_flag=1&lt;/code&gt; to my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.rvmrc&lt;/code&gt; as well to get rid of a warning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you see what I have done wrong, you can drop me a comment and I will update the article :)&lt;/p&gt;

&lt;h2 id=&quot;manage-your-ruby-versions&quot;&gt;Manage your ruby versions&lt;/h2&gt;

&lt;p&gt;To install a ruby version: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ruby install 2.5.1&lt;/code&gt;&lt;br /&gt;
To make it default: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ruby --default use 2.5.1&lt;/code&gt;&lt;/p&gt;</content><author><name>Paul Mesnilgrente</name></author><category term="ruby" /><category term="rvm" /><category term="installation" /><summary type="html">Basic installation</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://paul-mesnilgrente.github.io/assets/images/rvm_logo.png" /><media:content medium="image" url="https://paul-mesnilgrente.github.io/assets/images/rvm_logo.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Why I use sublime text</title><link href="https://paul-mesnilgrente.github.io/jekyll/update/2018/02/21/why-i-use-sublime-text.html" rel="alternate" type="text/html" title="Why I use sublime text" /><published>2018-02-21T00:00:00+00:00</published><updated>2018-02-21T00:00:00+00:00</updated><id>https://paul-mesnilgrente.github.io/jekyll/update/2018/02/21/why-i-use-sublime-text</id><content type="html" xml:base="https://paul-mesnilgrente.github.io/jekyll/update/2018/02/21/why-i-use-sublime-text.html">&lt;p&gt;&lt;a href=&quot;http://www.sublimetext.com/&quot;&gt;Sublime text&lt;/a&gt; is a rich text editor that can turn into a real IDE in a few
minutes. Its most powerfull feature is the package control which enables plugin
installation very easily. I present here my favourites plugins.&lt;/p&gt;

&lt;h1 id=&quot;table-editor&quot;&gt;Table Editor&lt;/h1&gt;

&lt;p&gt;I use &lt;a href=&quot;https://github.com/vkocubinsky/SublimeTableEditor&quot;&gt;Table editor&lt;/a&gt; for writing Markdown. It implements
some very usefull formating in your markdown tables. You can pass from:&lt;/p&gt;

&lt;div class=&quot;language-markdown highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;| Column 1 | Column 2 |
|-|-|
| First line | First line second column |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to this:&lt;/p&gt;

&lt;div class=&quot;language-markdown highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;|  Column 1  |         Column 2         |
|------------|--------------------------|
| First line | First line second column |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;simply by pressing enter. But this is not the only feature that there is. I hardly recommend to check
its documentation.&lt;/p&gt;

&lt;h1 id=&quot;php-twig&quot;&gt;PHP-Twig&lt;/h1&gt;

&lt;p&gt;As a Symfony programmer, I am quite used to write Twig templates. And for this, nothing is better than
this plugin. It does the syntax highlighting and it adds some usefull snippets. For example, you can type
simply &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;b&amp;lt;tab&amp;gt;&lt;/code&gt; and it will complete with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{% block ... %}{% endblock %}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/Anomareh/PHP-Twig.tmbundle&quot;&gt;PHP-Twig&lt;/a&gt; is the plugin that you must have if you are
front-end developper in Symfony or other PHP project using this template engine.&lt;/p&gt;

&lt;h1 id=&quot;less&quot;&gt;LESS&lt;/h1&gt;

&lt;p&gt;LESS is a simple syntax highlighter for the well known less syntax. Even if I tend to use Sass
these days, the package is still installed! I have some projects that were using bootstrap 3.4
and it still compiles with the less npm package.&lt;/p&gt;

&lt;h1 id=&quot;sass&quot;&gt;Sass&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://packagecontrol.io/packages/Sass&quot;&gt;Sass&lt;/a&gt; is a syntax highlither for Sass files. It even has a
support for CSS 4! At least, they have an active development.&lt;/p&gt;

&lt;h1 id=&quot;markdown-preview&quot;&gt;Markdown Preview&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/revolunet/sublimetext-markdown-preview&quot;&gt;MarkdownPreview&lt;/a&gt;
is compatible with MathJax. For example, you can type:&lt;/p&gt;

&lt;div class=&quot;language-markdown highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Inline formula &lt;span class=&quot;se&quot;&gt;\(&lt;/span&gt;x = 2 &lt;span class=&quot;se&quot;&gt;\t&lt;/span&gt;imes x + 10&lt;span class=&quot;se&quot;&gt;\)&lt;/span&gt; for example

Here is a block formula:

$$x = 2.x + 10$$
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And it will render:&lt;/p&gt;

&lt;p&gt;Inline formula \(x = 2 \times x + 10\) for example&lt;/p&gt;

&lt;p&gt;Here is a block formula:&lt;/p&gt;

\[x = 2.x + 10\]</content><author><name>Paul Mesnilgrente</name></author><category term="jekyll" /><category term="update" /><summary type="html">Sublime text is a rich text editor that can turn into a real IDE in a few minutes. Its most powerfull feature is the package control which enables plugin installation very easily. I present here my favourites plugins.</summary></entry><entry><title type="html">Installation script</title><link href="https://paul-mesnilgrente.github.io/bash/terminal/installation/2018/02/15/my-installation_script.html" rel="alternate" type="text/html" title="Installation script" /><published>2018-02-15T00:00:00+00:00</published><updated>2018-02-15T00:00:00+00:00</updated><id>https://paul-mesnilgrente.github.io/bash/terminal/installation/2018/02/15/my-installation_script</id><content type="html" xml:base="https://paul-mesnilgrente.github.io/bash/terminal/installation/2018/02/15/my-installation_script.html">&lt;p&gt;I use this script after setting up my terminal on a fresh installation.
It installs all the basics things that I usually need on my Ubuntu. It
removes all the useless softwares as well (as amazon plugins).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You may find some scripts that you know. This is probably
because it is part of my scripts that you can find
&lt;a href=&quot;https://github.com/paul-mesnilgrente/bin&quot;&gt;here&lt;/a&gt; or from any other
thing that is setup in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setup_terminal.sh&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-e&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;require_action &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    log.py &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt; ERROR &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;printf&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Press enter to continue... &quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;read &lt;/span&gt;y
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; python python-pip python3 python3-pip

log.py &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt; ERROR &lt;span class=&quot;s1&quot;&gt;'Removing useless packages'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt autoremove &lt;span class=&quot;nt&quot;&gt;--purge&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; unity-webapps-common totem shotwell shotwell-common

log.py &lt;span class=&quot;s1&quot;&gt;'Adding sublime text ppa'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; apt-transport-https
wget &lt;span class=&quot;nt&quot;&gt;-qO&lt;/span&gt; - https://download.sublimetext.com/sublimehq-pub.gpg | &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-key add -
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;deb https://download.sublimetext.com/ apt/stable/&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;sudo tee&lt;/span&gt; /etc/apt/sources.list.d/sublime-text.list

&lt;span class=&quot;c&quot;&gt;# log.py 'Adding oracle java ppa'&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# sudo add-apt-repository -y ppa:webupd8team/java&lt;/span&gt;

log.py &lt;span class=&quot;s1&quot;&gt;'Adding nextcloud ppa'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; ppa:nextcloud-devs/client

log.py &lt;span class=&quot;s1&quot;&gt;'Adding darktable ppa'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; ppa:pmjdebruijn/darktable-release

log.py &lt;span class=&quot;s1&quot;&gt;'Adding Telegram ppa'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; ppa:atareao/telegram

log.py &lt;span class=&quot;s1&quot;&gt;'Adding LibreOffice ppa'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; ppa:libreoffice/ppa

log.py &lt;span class=&quot;s1&quot;&gt;'Adding NodeJS ppa'&lt;/span&gt;
curl &lt;span class=&quot;nt&quot;&gt;-sL&lt;/span&gt; https://deb.nodesource.com/setup_8.x | &lt;span class=&quot;nb&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-E&lt;/span&gt; bash -

log.py &lt;span class=&quot;s1&quot;&gt;'Update and upgrade packages'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt update &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; upgrade

log.py &lt;span class=&quot;s1&quot;&gt;'Install basic softwares and libraries'&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;# oracle-java8-installer \&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; nautilus-dropbox &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    easytag vim tree ttf-mscorefonts-installer &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    vlc gimp xournal gnome-chess grisbi gparted &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    libreoffice-java-common &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    git sublime-text nextcloud-client &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    nextcloud-client-nautilus curl libgnome2-bin &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    darktable python-pygments telegram &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    php mysql-server php-mysql php-xml php-intl nodejs

log.py &lt;span class=&quot;s1&quot;&gt;'Installing composer'&lt;/span&gt;
install_composer.sh

log.py &lt;span class=&quot;s1&quot;&gt;'Installing symfony'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;curl &lt;span class=&quot;nt&quot;&gt;-LsS&lt;/span&gt; https://symfony.com/installer &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; /usr/local/bin/symfony
&lt;span class=&quot;nb&quot;&gt;sudo chmod &lt;/span&gt;a+x /usr/local/bin/symfony

log.py &lt;span class=&quot;s1&quot;&gt;'Installing NPM'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;npm &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;npm &lt;span class=&quot;nt&quot;&gt;-g&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo chown&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-R&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$USER&lt;/span&gt;:&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-gn&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$USER&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/.config
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;npm &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;less &lt;span class=&quot;nt&quot;&gt;-g&lt;/span&gt;

log.py &lt;span class=&quot;s1&quot;&gt;'Installing Messenger'&lt;/span&gt;
wget &lt;span class=&quot;s1&quot;&gt;'https://updates.messengerfordesktop.com/download/linux/latest/beta?arch=amd64&amp;amp;pkg=deb'&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
 &lt;span class=&quot;nt&quot;&gt;-O&lt;/span&gt; messenger.deb
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; ./messenger.deb
&lt;span class=&quot;nb&quot;&gt;rm &lt;/span&gt;messenger.deb

log.py &lt;span class=&quot;s1&quot;&gt;'Installing Whatsapp'&lt;/span&gt;
log.py &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt; ERROR &lt;span class=&quot;s1&quot;&gt;'Nothing working without installing google chrome'&lt;/span&gt;

log.py &lt;span class=&quot;s1&quot;&gt;'Installing Skype'&lt;/span&gt;
wget &lt;span class=&quot;s1&quot;&gt;'https://go.skype.com/skypeforlinux-64.deb'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; ./skypeforlinux-64.deb
&lt;span class=&quot;nb&quot;&gt;rm &lt;/span&gt;skypeforlinux-64.deb

log.py &lt;span class=&quot;s1&quot;&gt;'Installing Slack'&lt;/span&gt;
wget &lt;span class=&quot;s1&quot;&gt;'https://downloads.slack-edge.com/linux_releases/slack-desktop-3.0.5-amd64.deb'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; ./slack-desktop-3.0.5-amd64.deb
&lt;span class=&quot;nb&quot;&gt;rm &lt;/span&gt;slack-desktop-3.0.5-amd64.deb

require_action &lt;span class=&quot;s1&quot;&gt;'System :
    - Install languages
    - Modify the background
    - Add workspaces
    - Install proprietary softwares (e.g):
        - Intel microcode,
        - NVidia drivers
    - Put sleep mode to never'&lt;/span&gt;

require_action &lt;span class=&quot;s1&quot;&gt;'Mozilla thunderbird :
    - Add email accounts
    - Install extensions :
        - Lightning, 
        - Enigmail,
        - CardBook.'&lt;/span&gt;

require_action &lt;span class=&quot;s1&quot;&gt;'Mozilla firefox :
    - Install lastpass,
    - Remove bookmarks,
    - Synchro firefox,
    - Go on https://startpage.com/ and set it up,
    - Add starpage as default search engine,
    - Remove other search engines,
    - Configure wallabag,
    - Add the bookmark toolbar,
    - Enable &quot;use autoscrolling&quot;,
    - Add the search bar,
    - Configure vertical bar.'&lt;/span&gt;

require_action &lt;span class=&quot;s1&quot;&gt;'Sublime text :
    - Install the package control (one click in sublime),
    - Install markdown preview, LESS.'&lt;/span&gt;

require_action &lt;span class=&quot;s1&quot;&gt;'Install language tools.'&lt;/span&gt;

require_action &lt;span class=&quot;s1&quot;&gt;'Launch and configure Nextcloud.'&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; examples.desktop &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-rf&lt;/span&gt; examples.desktop
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; Templates &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-rf&lt;/span&gt; Templates
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; Public &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-rf&lt;/span&gt; Public
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; ~/.hidden &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;bin &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.hidden
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'^bin$'&lt;/span&gt; ~/.hidden&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-eq&lt;/span&gt; 0 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;bin &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.hidden

require_action &lt;span class=&quot;s2&quot;&gt;&quot;End of the script.&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Paul Mesnilgrente</name></author><category term="bash" /><category term="terminal" /><category term="installation" /><summary type="html">I use this script after setting up my terminal on a fresh installation. It installs all the basics things that I usually need on my Ubuntu. It removes all the useless softwares as well (as amazon plugins).</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://paul-mesnilgrente.github.io/assets/images/cmatrix.jpg" /><media:content medium="image" url="https://paul-mesnilgrente.github.io/assets/images/cmatrix.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Forward kinematic equations of a PRPRR</title><link href="https://paul-mesnilgrente.github.io/robotics/maths/2018/01/15/forward-kinematic-equations-of-a-prprr.html" rel="alternate" type="text/html" title="Forward kinematic equations of a PRPRR" /><published>2018-01-15T00:00:00+00:00</published><updated>2018-01-15T00:00:00+00:00</updated><id>https://paul-mesnilgrente.github.io/robotics/maths/2018/01/15/forward-kinematic-equations-of-a-prprr</id><content type="html" xml:base="https://paul-mesnilgrente.github.io/robotics/maths/2018/01/15/forward-kinematic-equations-of-a-prprr.html">&lt;p&gt;Forward kinematics refers to the use of the kinematic equations of a robot to
compute the position of the end-effector from specified values for the joint
parameters.&lt;/p&gt;

&lt;h1 id=&quot;1-preferential-jacobian-calculation&quot;&gt;1. Preferential jacobian calculation&lt;/h1&gt;

&lt;h2 id=&quot;a-calculation-of-p-i-j&quot;&gt;(a) Calculation of \(p, i, j\)&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;n = number of links = 5&lt;/li&gt;
  &lt;li&gt;p = integer part of (n / 2) = 2&lt;/li&gt;
  &lt;li&gt;i = p + 1 = 3&lt;/li&gt;
  &lt;li&gt;j = p&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;b-calculations-of-z_kj&quot;&gt;(b) Calculations of \(z_{k(j)}\)&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Formula# :&lt;/strong&gt; \(z_{k(j)} = R_{kj}.O_kO_j(j)\)&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;\(z_{1(2)} = R_{12}.\begin{pmatrix}0 &amp;amp; 0 &amp;amp; 1\end{pmatrix}^T\)&lt;/li&gt;
  &lt;li&gt;\(z_{2(2)} = R_{22}.\begin{pmatrix}0 &amp;amp; 0 &amp;amp; 1\end{pmatrix}^T\)&lt;/li&gt;
  &lt;li&gt;\(z_{3(2)} = R_{32}.\begin{pmatrix}0 &amp;amp; 0 &amp;amp; 1\end{pmatrix}^T\)&lt;/li&gt;
  &lt;li&gt;\(z_{4(2)} = R_{42}.\begin{pmatrix}0 &amp;amp; 0 &amp;amp; 1\end{pmatrix}^T\)&lt;/li&gt;
  &lt;li&gt;\(z_{5(2)} = R_{52}.\begin{pmatrix}0 &amp;amp; 0 &amp;amp; 1\end{pmatrix}^T\)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;\(R_{12} = 
\begin{pmatrix}
  c2 &amp;amp; -s2 &amp;amp; 0 \newline
  s2 &amp;amp; c2  &amp;amp; 0 \newline
  0  &amp;amp; 0   &amp;amp; 1
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(R_{22} = 
\begin{pmatrix}
  1 &amp;amp; 0 &amp;amp; 0\newline
  0 &amp;amp; 1 &amp;amp; 0\newline
  0 &amp;amp; 0 &amp;amp; 1
\end{pmatrix} \rightarrow\) no rotation&lt;/p&gt;

&lt;p&gt;\(R_{32} = R_{23}^{-1} = R_{23}^T =
\begin{pmatrix}
  1 &amp;amp; 0 &amp;amp; 0\newline
  0 &amp;amp; 0 &amp;amp; -1\newline
  0 &amp;amp; 1 &amp;amp; 0
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(R_{42} = R_{43}.R_{32} = R_{34}^T.R_{32} = 
\begin{pmatrix}
  c4 &amp;amp; 0  &amp;amp; s4\newline
  s4 &amp;amp; 0  &amp;amp; c4\newline
  0  &amp;amp; -1 &amp;amp; 0
\end{pmatrix}.
\begin{pmatrix}
  1 &amp;amp; 0 &amp;amp; 0\newline
  0 &amp;amp; 0 &amp;amp; -1\newline
  0 &amp;amp; 1 &amp;amp; 0
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(R_{42} = 
\begin{pmatrix}
  c4 &amp;amp; s4 &amp;amp; 0\newline
  s4 &amp;amp; c4 &amp;amp; 0\newline
  0  &amp;amp; 0  &amp;amp; 1
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(R_{52} = R_{54}.R_{43} = R_{45}^T.R_{42} = 
\begin{pmatrix}
  c5  &amp;amp; 0 &amp;amp; -s5\newline
  -s5 &amp;amp; 0 &amp;amp; -c5\newline
  0   &amp;amp; 1 &amp;amp; 0
\end{pmatrix}.
\begin{pmatrix}
  c4 &amp;amp; s4 &amp;amp; 0\newline
  s4 &amp;amp; c4 &amp;amp; 0\newline
  0  &amp;amp; 0  &amp;amp; 1
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(R_{52} = 
\begin{pmatrix}
  c4.c5  &amp;amp; c5.s4 &amp;amp; -s5\newline
  -c4.s5 &amp;amp; -s4.s5 &amp;amp; -c5\newline
  s4 &amp;amp; c4 &amp;amp; 0
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(z_{1(2)} = \begin{pmatrix}0 &amp;amp; 0 &amp;amp; 1\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(z_{2(2)} = \begin{pmatrix}0 &amp;amp; 0 &amp;amp; 1\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(z_{3(2)} = \begin{pmatrix}0 &amp;amp; 0 &amp;amp; 0\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(z_{4(2)} = \begin{pmatrix}0 &amp;amp; 0 &amp;amp; 1\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(z_{5(2)} = \begin{pmatrix}-s5 &amp;amp; -c5 &amp;amp; 1\end{pmatrix}^T\)&lt;/p&gt;

&lt;h2 id=&quot;c-calculations-of-p_kij&quot;&gt;(c) Calculations of \(p_{ki(j)}\)&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Formula# :&lt;/strong&gt; \(p_{ki(j)} = O_kO_i(j)\)&lt;/p&gt;

&lt;p&gt;\(O_1O_3(2) = O_1O_2(2) + O_2O_3(2) = 0 + \begin{pmatrix}0 &amp;amp; q3 &amp;amp; 0\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(O_2O_3(2) = \begin{pmatrix}0 &amp;amp; q3 &amp;amp; 0\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(O_3O_3(2) = \begin{pmatrix}0 &amp;amp; 0 &amp;amp; 0\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(O_4O_3(2) = \begin{pmatrix}0 &amp;amp; 0 &amp;amp; 0\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(O_5O_3(2) = \begin{pmatrix}0 &amp;amp; 0 &amp;amp; 0\end{pmatrix}^T\)&lt;/p&gt;

&lt;h2 id=&quot;d-calculations-of-z_kj-land-p_kij&quot;&gt;(d) Calculations of \(z_{k(j)} \land p_{ki(j)}\)&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Formula# :&lt;/strong&gt;
\(\begin{pmatrix}a \newline b \newline c\end{pmatrix} \land \begin{pmatrix}d \newline e \newline f\end{pmatrix}
= 
\begin{pmatrix}
  b.f - c.e\newline
  c.d - a.f\newline
  a.e - b.d
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(z_{1(2)} \land p_{13(2)} = \begin{pmatrix}0 \newline 0 \newline 1\end{pmatrix} \land \begin{pmatrix}0 \newline q3 \newline 0\end{pmatrix} =
\begin{pmatrix}
  -q3\newline
  0\newline
  0
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(z_{2(2)} \land p_{23(2)} = \begin{pmatrix}0 \newline 0 \newline 1\end{pmatrix} \land \begin{pmatrix}0 \newline q3 \newline 0\end{pmatrix} =
\begin{pmatrix}
  -q3\newline
  0\newline
  0
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(z_{3(2)} \land p_{33(2)} = \begin{pmatrix}0 \newline 0 \newline 0\end{pmatrix} \land \begin{pmatrix}0 \newline 0 \newline 0\end{pmatrix} =
\begin{pmatrix}
  0\newline
  0\newline
  0
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(z_{4(2)} \land p_{43(2)} = \begin{pmatrix}0 \newline 0 \newline 1\end{pmatrix} \land \begin{pmatrix}0 \newline 0 \newline 0\end{pmatrix} =
\begin{pmatrix}
  0\newline
  0\newline
  0
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;\(z_{5(2)} \land p_{53(2)} = \begin{pmatrix}-s5 \newline -c5 \newline 1\end{pmatrix} \land \begin{pmatrix}0 \newline 0 \newline 0\end{pmatrix} =
\begin{pmatrix}
  0\newline
  0\newline
  0
\end{pmatrix}\)&lt;/p&gt;

&lt;h2 id=&quot;writing-of-the-preferential-jacobian&quot;&gt;Writing of the preferential jacobian&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Formula# :&lt;/strong&gt; \(J_{i(j)} = 
\begin{pmatrix}
  \sigma_1.z_1 + \bar{\sigma_1}.z_{1(j)}\land p_{1i(j)} &amp;amp; \dots &amp;amp; \sigma_n.z_{n(j)} + \bar{\sigma_{n(j)}}.z_{n(j)}\land p_{ni(j)} \newline
  \bar{\sigma_1}.z_{1(j)} &amp;amp; \dots &amp;amp; \bar{\sigma_n}.z_{n(j)}
\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;Simplification with the nature link knowledge.&lt;/p&gt;

\[\begin{align}
  J_{3(2)} &amp;amp;= 
  \begin{pmatrix}
    z_{1(2)}\land p_{13(2)} &amp;amp; z_{2(2)}\land p_{23(2)} &amp;amp; z_{3(2)} &amp;amp; z_{4(2)}\land p_{43(2)} &amp;amp; z_{5(2)}\land p_{53(2)}\newline
    z_{1(2)} &amp;amp; z_{2(2)} &amp;amp; O_{3\times1} &amp;amp; z_{4(2)} &amp;amp; z_{5(2)}
  \end{pmatrix}\newline
  &amp;amp;=
  \begin{pmatrix}
    -q3 &amp;amp; -q3 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
      0 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
      0 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
      0 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; -s5\newline
      0 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; -c5\newline
      1 &amp;amp;   1 &amp;amp; 0 &amp;amp; 1 &amp;amp; 1
  \end{pmatrix}
\end{align}\]

&lt;h1 id=&quot;2-calculations-of-hatp_inj-by-the-vector-p_inj&quot;&gt;2. Calculations of \(\hat{P}_{in(j)}\) by the vector \(p_{in(j)}\)&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Formula# :&lt;/strong&gt; \(\hat{P}_{in(j)} =
\begin{pmatrix}
  0  &amp;amp; -z &amp;amp; y\newline
  z  &amp;amp;  0 &amp;amp; -x\newline
  -y &amp;amp;  x &amp;amp; 0
\end{pmatrix}\)
avec \(p_{in(j)} = \begin{pmatrix}x &amp;amp; y &amp;amp; z\end{pmatrix}^T\)&lt;/p&gt;

&lt;p&gt;\(p_{35(2)} = \begin{pmatrix}0\newline0\newline0\end{pmatrix}\) so \(\hat{P}_{in(j)} = O_{3\times3}\)&lt;/p&gt;

&lt;h1 id=&quot;3-calculations-of-dp_0-and-dvarphi_0&quot;&gt;3. Calculations of \(dp_{(0)}\) and \(d\varphi_{(0)}\)&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Formula# :&lt;/strong&gt;
\(\begin{pmatrix}dp_{(0)} \newline d\varphi_{(0)}\end{pmatrix} =
\begin{pmatrix}
  R_{03} &amp;amp; O_{33}\newline
  O_{33} &amp;amp; R_{03}
\end{pmatrix}.
\begin{pmatrix}
  I_{33} &amp;amp; -\hat{P}_{in(j)}\newline
  O_{33} &amp;amp; I_{33}
\end{pmatrix}.J_{3(2)}.dq\)
avec
\(dq = \begin{pmatrix}dq1 \newline \vdots \newline dqn\end{pmatrix}\)&lt;/p&gt;

&lt;p&gt;or \(\hat{P}_{in(j)} = O_{3\times3}\) so
\(\begin{pmatrix}dp_{(0)} \newline d\varphi_{(0)}\end{pmatrix} =
\begin{pmatrix}
  R_{03} &amp;amp; O_{33}\newline
  O_{33} &amp;amp; R_{03}
\end{pmatrix}.J_{3(2)}.dq\)&lt;/p&gt;

&lt;p&gt;\(R_{03} = R_{12}.R_{23}.R_{34} =
\begin{pmatrix}
  1 &amp;amp; 0 &amp;amp; 0\newline
  0 &amp;amp; 1 &amp;amp; 0\newline
  0 &amp;amp; 0 &amp;amp; 1
\end{pmatrix}.
\begin{pmatrix}
  c2 &amp;amp; -s2 &amp;amp; 0 \newline
  s2 &amp;amp;  c2 &amp;amp; 0 \newline
  0  &amp;amp;   0 &amp;amp; 1
\end{pmatrix}.
\begin{pmatrix}
  1 &amp;amp;  0 &amp;amp; 0\newline
  0 &amp;amp;  0 &amp;amp; 1\newline
  0 &amp;amp; -1 &amp;amp; 0
\end{pmatrix} = 
\begin{pmatrix}
  c2 &amp;amp;  0 &amp;amp; -s2\newline
  s2 &amp;amp;  0 &amp;amp;  c2\newline
   0 &amp;amp; -1 &amp;amp;   0
\end{pmatrix}\)&lt;/p&gt;

\[\begin{align}
\begin{pmatrix}dp\_{(0)} \newline d\varphi\_{(0)}\end{pmatrix} &amp;amp;=
\begin{pmatrix}
  c2 &amp;amp;  0 &amp;amp; -s2 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
  s2 &amp;amp;  0 &amp;amp;  c2 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
   0 &amp;amp; -1 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
  0 &amp;amp; 0 &amp;amp; 0 &amp;amp; c2 &amp;amp;  0 &amp;amp; -s2\newline
  0 &amp;amp; 0 &amp;amp; 0 &amp;amp; s2 &amp;amp;  0 &amp;amp;  c2\newline
  0 &amp;amp; 0 &amp;amp; 0 &amp;amp;  0 &amp;amp; -1 &amp;amp;   0
\end{pmatrix}.
\begin{pmatrix}
  -q3 &amp;amp; -q3 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
    0 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
    0 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\newline
    0 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; -s5\newline
    0 &amp;amp;   0 &amp;amp; 0 &amp;amp; 0 &amp;amp; -c5\newline
    1 &amp;amp;   1 &amp;amp; 0 &amp;amp; 1 &amp;amp; 1
\end{pmatrix}.
\begin{pmatrix}
  dq1\newline dq2\newline dq3\newline dq4\newline dq5
\end{pmatrix}\newline
&amp;amp;=
\begin{pmatrix}
                       - c2.dq1.q3 - c2.dq2.q3\newline
                       - dq1.q3.s2 - dq2.q3.s2\newline
                                             0\newline
 - dq1.s2 - dq2.s2 - dq4.s2 - dq5.(s2 + c2.s5)\newline
   c2.dq1 + c2.dq2 + c2.dq4 + dq5.(c2 - s2.s5)\newline
                                        c5.dq5
\end{pmatrix}
\end{align}\]</content><author><name>Paul Mesnilgrente</name></author><category term="robotics" /><category term="maths" /><summary type="html">Forward kinematics refers to the use of the kinematic equations of a robot to compute the position of the end-effector from specified values for the joint parameters.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://paul-mesnilgrente.github.io/assets/images/robotic_arm.jpg" /><media:content medium="image" url="https://paul-mesnilgrente.github.io/assets/images/robotic_arm.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>