Using Raspberry Pi 4 With Ubuntu Ros Rplidar Ardui
Using Raspberry Pi 4 With Ubuntu Ros Rplidar Ardui
by s.a.alghamdi94
Raspberry Pi 4 is the version of the Raspberry Pi single-board computer. 2GB, 4GB, and 8GB RAM version of Raspberry Pi
4. in this project we description
Download 3 di erent versions of ubuntu (16..04,18.04,20.04) ,Install of ROS and Using (RPlidar & arduino)
Step 1: Components
1- A Raspberry pi 4 (8GB)
8- Cable
9-Arduino
Step 3:
This system has already Ros kinetic. Therefore, we started with Connect to the WiFi
roscore
If you get warning/errors, try stopping ROS and starting it again with
killall -9 roscore
Run
roscore
So we will start by install the cmake 3.7.2 Installation by a PPA (Upgrade to 3.7)
sudo add-apt-repository
ppa:george-edison55/cmake-3.x
wget http://www.cmake.org/files/v3.7/cmake-3.7.2.tar.gz
tar xf cmake-3.7.2.tar.gz
cd cmake-3.7.2
./configure
make
sudo checkinstall
cd catkin_ws
cd src
cd ..
catkin_make
Move into catkin_ws/src, clone the source les and then make them
cd catkin_ws
cd src
cd ..
catkin_make
For a quick test of the hector_mapping two launch les needs to be modi ed.
Go to home le > catkin_ws > src >hector_ slam > hector _mapping
Step 8:
Go to home le > catkin_ws > src > hector_ slam > hector _ slam_launch >launch > tutorial.launch
NOTE: when you want to start the mapping process you should run the Rivs in another terminal.
the Ethernet to install the Ubuntu on raspberry pi 4, after nish Installation it's
prompted to log in, we used “ubuntu” for the username , password and current password.
sudo reboot
lsb_release –a
There are two types of ROS (ROS1.ROS2). We are using ROS (1) ,another thing the ROS has several versions, It is related to
the version of the system you are using , so we chose the ROS melodic which is available on Ubuntu 18.04 version
Note: you should write the important code in the table before run any code from ros wiki Website.
cd /
The cd (“change directory”) command is used to change the current working directory in Linux and other Unix-like
operating systems. It is one of the most basic and frequently used commands when working on the Linux terminal. ...
Each time you interact with your command prompt, you are working within a directory.
sudo sh -c 'echo "deb <a href="http://packages.ros.org/ros/ubuntu" rel="nofollow">http://packages.ros.org/ros/ubuntu </a> $(lsb_release -sc) main" > /etc/apt/sources.list.d/ro
s-latest.list'
rosdep update
Note: You have successfully installed ROS , if you would like to make sure if the ROS Working open the terminal again and
just write
roscore
We Connected our RPLiDAR to Raspberry Pi 4 Model B using Micro USB Cable. Flashing green light indicates normal
activity of sensor. Following command line to check the permissions:
Now you are able to read and write with this device using the USB port.
sudo apt-get install cmake python-catkin-pkg python-empy python- nose python-setuptools libgtest-dev python-rosinstall python- rosinstall-generator python-wstool build-ess
ential git
mkdir -p ~/catkin_ws/src
This workspace can be compiled even it is empty. Go to the source folder of the catkin workspace that you just created In
your terminal, run
cd ~/catkin_ws/src
And then
catkin_make
Then run to source the environment with your current terminal. Don't close the terminal.
source devel/setup.bash
roscore
In the terminal which you sourced the environment, run below command
An instance of Rviz will then open with a map of the RPLIDAR’s surroundings.
Move into catkin_ws/src, clone the source les and then make them
cd ~/catkin_ws/src
cd ~/catkin_ws
catkin_make
You have to go back to step 7 and do same thing to modify the les
Start with Arduino IDE installed, download it from the Arduino website Go to software > download > in the right side
choose linux32 ,After nish, extract the le on download.
Using Raspberry Pi 4, With Ubuntu , Ros , Rplidar , Arduino: Page 12
Open the terminal and write this code :
cd Downloads
cd arduino-1.8.13
sudo ./install.sh
Then
cd catkin_ws
cd src
cd catkin_ws
catkin_make
catkin_make install
cd snap
cd arduino
cd current
cd arduino
cd libraries
rm -rf ros_lib
First, update the APT package repository cache with the following command
Reference
For the changes to take e ect, reboot your Raspberry Pi 4 with the following command:
Desktop-Full Install:
You must source this script in every bash terminal you use ROS in.
source /opt/ros/noetic/setup.bash
source ~/.bashrc
The dependencies here include ROS speci c tools (rosdep, rosintall_generator and ws_tool) and some essential build
tools like make and cmake.
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
rosdep update
Next we run rosdep update to fetch package information from the repos that are just initialized.
rosdep update
mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_init_workspace
Go to the source folder of the catkin workspace that you just created:
cd src
Clone the ROS node for the Lidar in the catkin workspace.
catkin_make
Then run to source the environment with your current terminal. Don't close the terminal.
source devel/setup.bash
https://ubuntu.com/download/raspberry-pi
//www.youtube.com/embed/Cao1ZRjb2E0
//www.youtube.com/embed/vfqN-RRt84Q
http://wiki.ros.org/melodic/Installation/Ubuntu
//www.youtube.com/embed/Ac9UXXnSCDM
https://maker.pro/raspberry-pi/projects/getting-st...
http://thomas-messmer.com/index.php/14-free-
http://wiki.ros.org/rosserial_arduino/Tutorials/He...
knowle...
http://wiki.ros.org/rosserial_arduino/Tutorials/Bl...
http://wiki.ros.org/rosserial_arduino/Tutorials/Ar...
//www.youtube.com/embed/Qrtz0a7HaQ4
https://downloads.ubiquityrobotics.com/pi.html
http://wiki.ros.org/rplidar
https://levelup.gitconnected.com/build-a-thermal-c...
https://askubuntu.com/questions/610291/how-to-inst...
https://www.hackster.io/shahizat005/lidar-integrat...
//www.youtube.com/embed/Y6oo_2qHJII
https://linuxhint.com/install-ubuntu-desktop-20-04...