How Setup your Ubuntu 20.04 - Insper/insperbot GitHub Wiki
We are going to do install:
- OpenCV 4.5+
- Ros Noetic
NOTE: Use this code below if you want to automatize all the process of installation
Run in your terminal:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Insper/404/master/scripts_robotica/install_ros_noetic.sh)"
To do step by step:
To install opencv4+, use this commands below:
sudo apt update
sudo apt install libopencv-dev python3-opencv
sudo apt install python3-pip
pip3 install --user opencv-contrib-python
Test if worked:
python3 -c "import cv2; print(cv2.__version__)"
Expected result is 4.5.0 or +
Install Ros Noetic
Setup your sources.list
It's always a good idea to backup a configuration file like sources.list before you edit it. To do so, issue the following command:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
By editing these files from the command line, we can add, remove, or temporarily disable software repositories.
Adding the Universe and Multiverse Repositories
You may use the add-apt-repository command. If your release is 'saucy':
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ saucy universe multiverse"
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ saucy-updates universe multiverse"you may use the add-apt-repository command. If your release is 'saucy':
Setup your sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Set up your keys
sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
Don't forget to retrieve the updated package lists:
sudo apt update
Installation of ROS Noetic
sudo apt install ros-noetic-desktop-full
Install build tools:
sudo apt install -y python3-rosdep
sudo apt install -y python3-rosinstall-generator
sudo apt install -y python3-rosinstall
sudo apt install -y ros-noetic-joy
sudo apt install -y ros-noetic-teleop-tools
sudo apt install -y ros-noetic-teleop-twist-keyboard
sudo apt install -y ros-noetic-laser-proc
Build Rosserial:
sudo apt install -y ros-noetic-rosserial-arduino
sudo apt install -y ros-noetic-rosserial-python
sudo apt install -y ros-noetic-amcl
Build Navigation:
sudo apt install -y ros-noetic-slam-gmapping
sudo apt install -y ros-noetic-map-server
sudo apt install -y ros-noetic-move-base
sudo apt install -y ros-noetic-urdf
sudo apt install -y ros-noetic-xacro
sudo apt install -y ros-noetic-navigation
sudo apt install -y ros-noetic-interactive-markers
sudo apt install -y ros-noetic-kobuki-ftdi
Build Image tools:
sudo apt install -y ros-noetic-compressed-image-transport
sudo apt install -y ros-noetic-rqt-image-view
sudo apt install -y ros-noetic-opencv-apps
sudo apt install -y ros-noetic-opencv-apps-dbgsym
sudo apt install -y ros-noetic-vision-opencv
sudo apt install -y ros-noetic-eigen-conversions
sudo apt install -y ros-noetic-eigen-conversions-dbgsym
sudo apt install -y ros-noetic-eigen-stl-containers
sudo apt install -y ros-noetic-rgbd-launch
sudo apt install -y libgstreamer1.0-dev
sudo apt install -y gstreamer1.0-libav
sudo apt install -y gdal-bin
Build Turtlebot3 tools:
sudo apt install -y ros-noetic-turtlebot3
sudo apt install -y ros-noetic-ddynamic-reconfigure
Install GIT and GIT LFS and other tools:
sudo apt install -y git
sudo apt install -y curl
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get -y install git-lfs
git lfs install
sudo apt-get install -y python3-pip
pip3 install --upgrade imutils
sudo -H pip3 install jupyter
python3 -m pip install -U matplotlib
Environment Setup
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Insper/404/master/scripts_robotica/robotica.sh)
sh -c 'echo "source robotica.sh" >> ~/.bashrc'
source ~/.bashrc
source /opt/ros/noetic/setup.bash
Create and Build a Workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
Download InsperBot repository and dependencies:
cd ~/catkin_ws/src
git clone https://github.com/ros-teleop/teleop_twist_keyboard.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3_applications.git
rm -rf turtlebot3_applications/turtlebot3_panorama
rm -rf turtlebot3_applications/turtlebot3_automatic*
git clone https://github.com/Insper/insperbot.git
cd ~/catkin_ws
catkin_make
Initializing Rosdep
sudo rosdep init
rosdep update
Launch your virtual robot
roslaunch insperbot circuito.launch