Skip to content

Implementation of Autonomous system with ROS on a Minicar provided of a Raspberry Pi 3.

Notifications You must be signed in to change notification settings

sGraffione/ROS_Minicar_AutonomousVehicle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS_Minicar_AutonomousVehicle

Implementation of Autonomous system with ROS on a Minicar provided of a Raspberry Pi 3.

Dependencies

Install IPOPT to solve non-linear problems

sudo apt-get install coinor-libipopt-dev

Install casadi by compiling from source

sudo apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config --install-recommends
sudo apt-get install swig ipython python-dev python-numpy python-scipy python-matplotlib

git clone https://github.com/casadi/casadi.git -b main casadi

cd casadi
mkdir build
cd build

cmake -DWITH_PYTHON=ON -DWITH_IPOPT=true ..

To compile Casadi, it is required cmake version > 3.15. To update your cmake version to the latest one, follow this guide.

Now build from source and install

make
sudo make install

Full installation guide at https://github.com/casadi/casadi/wiki/InstallationLinux

Download cmake files from use_ext_libraries directory

Open a terminal

cd /opt/ros/melodic/share/cmake_modules/cmake/Modules/
sudo cp ~/Downloads/FindEigen.cmake .
sudo cp ~/Downloads/FindCASADI.cmake .

Run commands

It is necessary to run the system as the root user. First, use

sudo -s

to set the command window as root user. Then run,

roslaunch package_name minicar.launch

to run each module and make it follow a path defined in control.cpp.

Common issues

Missing bcm2835.h

Install the missing library with the following commands

cd ~                  
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.58.tar.gz                       
tar xvfz bcm2835-1.58.tar.gz;                      
cd bcm2835-1.58;                       
./configure;                      
make;        
sudo make install

Missing i2c/*.h

If you have any library of i2c missing, it means that you have to check if you have installed i2c-tools and if i2c interface is enabled.

First, install these packages

sudo apt install -y i2c-tools python3-smbus
sudo apt install libi2c-dev

Then, run the command

sudo raspi-config

Go to 5 Interfacing options, select I2C and choose Enable

Finally, reboot your system to apply changes.

Missing MPU6050.h

To correct this error, go to the include folder and run the commands

make all
sudo make install

Undefined reference to ...

Try to recompile the package with the additional

catkin_make --force-cmake

WiFi module missing

If the WiFi module is not detected, first check with

dmesg | grep mmc1

It can happen to have missing files. If the command returns a missing firmware like the brcm/brcmfmac43430-sdio.txt you need to copy the file from here and create a new file in brcm folder:

sudo nano /lib/firmware/brcm/brcmfmac43430-sdio.txt

and paste the content from the previous link.

Raspi-Config does something weird

If the raspi-config works but the selection of the menu does not work properly, update and/or reinstall raspi-config. The compatibility between raspi-config and Ubuntu is not assured, but this utility tool could be useful for a fast setting of your Raspberry Pi board. To update/install raspi-config, follow the instructions at this page

About

Implementation of Autonomous system with ROS on a Minicar provided of a Raspberry Pi 3.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published