100%
grisp_robot PCB_V2 view
Description

Imported from GitHub: Nicodaube/Grisp_robot · commit 925afbc · license Apache-2.0

Description

Repository of the self balancing robot originally designed by Cédric Ponsard and Francois Goens. It is now extended with the work of Nicolas Daube and Thomas Vanbever for the localisation of the robot in rooms

README

balancing_robot

Hardware Files

All the non GRiSP related files as well as the prototyping files are in this directory : https://github.com/7dric/Opensource_self_balancing_robot

Disclaimer

This is what worked for us, no assurance it will work for anybody with other packages and dependencies version. Don't hesitate to follow the tutorials on the grisp wiki page and to join the GRiSP slack if you have any question.

Requirements (not necessary if you did the tutorials)

The deployment of the software on the GRiSP2 board is a bit of a headache. This is a step by step instructions that worked for us, using Ubuntu 24.04.

First, be sure you have the latest version of all the basic packages:

sudo apt-get update
sudo apt-get upgrade
sudo apt install -y libncurses5-dev libncursesw5-dev curl build-essential libssl-dev

Installing Kerl

Kerl is used to build and install Erlang/OTP instances.

First we need to download kerl in the /usr/bin folder and give it write permission. :

cd /usr/local/bin
sudo curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
sudo chmod a+x ./kerl

Then we need to add it to our path:

nano ~/.bashrc

Add the following line

#KERL
export PATH="$PATH:/usr/local/bin/kerl"

Save and exit the file and then refresh the path :

source ~/.bashrc

Ensure that kerl is well installed and up to date with

kerl version
kerl upgrade

Install Erlang/OTP

Erlang is the main tool to use in this project, we will here use kerl to build it. First find the latest release with :

kerl update releases
kerl list releases all

Then use the following command to build a release (changing ${RELEASE_NUM} by the latest supported release number (27.2.2) for me):

kerl build ${RELEASE_NUM} ${RELEASE_NUM}

Then install the build :

kerl install ${RELEASE_NUM} /usr/local/lib/erlang/${RELEASE_NUM}

If you don't have yet the permission to write in /usr/local/lib use :

sudo chown -R $USER:$USER /usr/local/lib

You must then activate the erlang install :

Either for the current session :

. /usr/local/lib/erlang/${RELEASE_NUM}/activate

Or for all time :

. /usr/local/lib/erlang/${RELEASE_NUM}/activate
nano ~/.bashrc

And add

#ERL
export PATH="$PATH:/usr/local/lib/erlang/27.2.2/bin"

Then update path with:

source ~/.bashrc

Install rebar3

Download the rebar3 e-script from here

Then, install using :

cd ~/Downloads
chmod a+x ./rebar3
./rebar3 local install

Then add it to your path:

nano ~/.bashrc

And add at the end :

#REBAR
export PATH="export PATH=/home/${username}/.cache/rebar3/bin:$PATH"

Then update rebar3 using :

rebar3 local upgrade

Then, we need to install globally the plugins required for grisp devellopment with rebar3.

create the file rebar.config in ~/.config/rebar3/. Fill it with :

{plugins, [
    rebar3_hex,
    rebar3_grisp
]}.

Then update your plugins:

rebar3 update
rebar3 plugins upgrade rebar3_grisp

At this point you should be able to deploy the demo app in the grisp tutorials.

Requirements for the balancing robot

For the Lilygo code deployment, see this other repository. It contains all the code and the tutorials to setup your two LilyGo.

Now, we will install the GRISP toolchain. Due to an issue when trying to build the toolchain with the docker image, we will use a prebuilt image of the toolchain, available here.

In the rebar.config, you can then modify the toolchain path like so : alt text

Now, modify all the rebar.config file to suit your path and your OTP version.

Deploying the software to an SD card

go to the balancing_robot directory and run the following command :

rebar3 grisp build
rebar3 grisp deploy
Comments
Sign in to comment

No comments yet. Be the first to ask about this board.