Difference between revisions of "RoboRacing Software Installation Instructions"

From RoboJackets Wiki
Jump to navigation Jump to search
(Step 14 - Run the Code)
Line 2: Line 2:
 
Welcome!
 
Welcome!
 
   
 
   
Robojackets RoboRacing currently supports an Ubuntu 18.04 and ROS-melodic environment. The project may build/run in other environments, but we can't guarantee it.  
+
Robojackets RoboRacing currently supports an Ubuntu 20.04 and ROS-noetic environment. The project may build/run in other environments, but we can't guarantee it.  
  
 
Let's begin the installation process.
 
Let's begin the installation process.
  
 +
= Install ROS Noetic =
 +
== Step 1 - ROS Installation ==
 +
We will be using the instructions found on the ROS Noetic Ubuntu [http://wiki.ros.org/noetic/Installation/Ubuntu Guide]
 +
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 +
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' <br>
 +
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 <br>
 +
sudo apt update <br>
 +
sudo apt install ros-noetic-desktop-full --yes <br>
 +
</span></div>
  
== Step 1 - Get Terminator ==
+
== Step 2 - Environment Variable Setup ==
 +
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 +
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc <br>
 +
source ~/.bashrc
 +
</span></div>
  
We primarily use terminator instead of the default terminal since it allows for both horizontal and vertical splitting (which obviously increases overall productivity). Start up the default terminal and type:
+
== Step 3 - Get Terminator ==
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">sudo apt install terminator</span><br/></div>
+
We primarily use terminator instead of the default terminal since it allows for both horizontal and vertical splitting (which ''obviously'' increases overall productivity). Start up the default terminal and type:
You should now be using this from now on, it will help later.
+
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 +
sudo apt install terminator
 +
</span></div>
  
== Step 2 - Set up your sources.list ==
 
  
Now for these next steps you don't need to understand what they do, only make sure they complete properly. So if you see any errors come up, tell one of us immediately. Copy this into your terminal:
+
= Setup Workspace =
 +
== Step 4 - Make File Structure ==
 
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
+
mkdir -p ~/catkin_ws/src <br>  
</div>
+
cd ~/catkin_ws/src <br>  
== Step 3 - Set up your keys ==
+
git clone https://github.com/RoboJackets/roboracing-software.git --recursive
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
+
</span></div>
</div>
+
 
== Step 4 - Update your Debian packages ==
+
== Step 5 - Install Dependencies ==
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">sudo apt update</span><br/></div>
 
== Step 5 - Get Ros melodic ==
 
 
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
sudo apt install ros-melodic-desktop-full<br /></div>
+
cd ~/catkin_ws <br>  
== Step 6 - Initialize rosdep ==
+
sudo apt install python3-rosdep python-is-python3 python3-catkin-tools --yes <br>  
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">sudo rosdep init</span><br/></div><div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">rosdep update</span><br/></div>
+
rosdep install --from-path src --ignore-src -y <br>  
== Step 7 - Environment Variable Setup ==
+
</span></div>
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace;">echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc</span><br/></div><div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace;">source ~/.bashrc</span><br/></div>
 
== Step 8 - Initialize catkin workspace ==
 
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">cd ~ </span></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">mkdir catkin_ws</span></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;"><span style="line-height: 20.8px;">cd catkin_ws</span></span></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;"><span style="line-height: 20.8px;">mkdir src</span></span><br/></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;"><span style="line-height: 20.8px;">cd src</span></span><br/></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;"><span style="line-height: 20.8px;">catkin_init_workspace</span></span><br/></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;"><span style="line-height: 20.8px;">cd ..</span></span><br/></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;"><span style="line-height: 20.8px;">catkin_make</span></span><br/></div>
 
*Command should complete and not really do anything
 
*If init_catkin_workspace failed then ROS did not install correctly and/or try "sudo apt-get update" which may fix the issue where catkin_init_workspace command can not be found
 
  
== Step 9&nbsp;- Clone RoboRacing Repository ==
+
== Step 6 - Building the Code ==
 +
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 +
catkin_make <br>
 +
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
 +
</span></div>
  
*Clone RoboRacing Github Repository  (with the git submodules)
+
== Step 7 - Dependencies Problems ==
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">cd src</span></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;"><span style="line-height: 20.8px;">git clone https://github.com/RoboJackets/roboracing-software.git --recursive</span></span></div>
+
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 +
sudo apt install ros-noetic-costmap-2d <br>  
 +
sudo apt install ros-noetic-effort-controller <br>  
 +
sudo apt install ros-noetic-robot-localization
 +
</span></div>
  
== Step 10&nbsp;- Install ROS Dependencies ==
 
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><font face="courier new, courier, monospace">cd ..</font></div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc</span>
 
</div><div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace">rosdep install --from-path src --ignore-src -y<br/></div>
 
*rosdep will download and install all of the necessary ros package dependencies, type "y" whenever it asks if it is ok to continue installation
 
  
== Step 11&nbsp;- Install Python  Dependencies ==
+
== Step 8- Run the Code ==
*Install python dependencies (for Python 2) which are not in ROS:
+
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">
+
roscore &
pip install keras numpy pynput matplotlib</span></div>
+
</span></div>
 +
*Then press [Enter]
 +
=== IARRC Simulation  ===
 +
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 +
roslaunch rr_gazebo macaroni_iarrc_circuit.launch
 +
</span></div>
  
== Step 12&nbsp;- Install FlyCapture SDK ==
+
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
* Download the [https://www.flir.com/products/flycapture-sdk SDK] and unpack it
+
roslaunch rr_iarrc test_circuit_sim.launch
<div style="line-height: 18.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">
 
sudo apt-get install libraw1394-11 libavcodec57 libavformat57        \<br>
 
libswscale4 libswresample2 libavutil55 libgtkmm-2.4-1v5              \<br>
 
libglademm-2.4-1v5 libgtkglextmm-x11-1.2-0v5 libgtkmm-2.4-dev        \<br> 
 
libglademm-2.4-dev libgtkglextmm-x11-1.2-dev libusb-1.0-0
 
 
</span></div>
 
</span></div>
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">
+
 
cd <downloaded flycapture2 folder>
+
=== EVGP Simulation ===
 +
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 +
roslaunch rr_gazebo evgp.launch
 
</span></div>
 
</span></div>
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">
+
 
sudo sh install_flycapture.sh
+
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span style="font-family:courier new,courier,monospace">
 +
roslaunch rr_evgp evgp_planning_demo.launch
 
</span></div>
 
</span></div>
  
== Step 13&nbsp;- Build the Code ==
+
* Remeber to do ''source ~/catkin_ws/devel/setup.bash'' if the launch file can't be found in package (you should add this to ~/.bashrc if you haven't already)
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">catkin_make</span></div>
+
* Gazebo usually freezes when loading right after installation so just run it, wait, kill it with [Ctrl-C], wait until it is dead, then retry!
*If this fails the first time try running catkin_make again
 
 
 
== Step 14&nbsp;- Run the Code ==
 
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="font-family:courier new,courier,monospace;">roscore & </span></div>
 
*Then press [Enter]
 
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="line-height: 20.8px;"><span style="font-family:courier new,courier,monospace;">roslaunch rr_gazebo macaroni_iarrc_circuit.launch</span></span></div>
 
<div style="line-height: 20.8px; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; background: rgb(238, 238, 238);"><span style="line-height: 20.8px;"><span style="font-family:courier new,courier,monospace;">roslaunch rr_iarrc test_circuit_sim.launch</span></span></div>
 
* Remeber to do ''source ~/.bashrc'' if the launch file can't be found in package
 
*Gazebo usually freezes when loading right after installation so just run it, wait, kill it with [Ctrl-C], wait until it is dead, then retry!
 

Revision as of 19:58, 28 September 2020

Welcome!

Robojackets RoboRacing currently supports an Ubuntu 20.04 and ROS-noetic environment. The project may build/run in other environments, but we can't guarantee it.

Let's begin the installation process.

Install ROS Noetic

Step 1 - ROS Installation

We will be using the instructions found on the ROS Noetic Ubuntu Guide

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install ros-noetic-desktop-full --yes

Step 2 - Environment Variable Setup

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Step 3 - Get Terminator

We primarily use terminator instead of the default terminal since it allows for both horizontal and vertical splitting (which obviously increases overall productivity). Start up the default terminal and type:

sudo apt install terminator


Setup Workspace

Step 4 - Make File Structure

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/RoboJackets/roboracing-software.git --recursive

Step 5 - Install Dependencies

cd ~/catkin_ws
sudo apt install python3-rosdep python-is-python3 python3-catkin-tools --yes
rosdep install --from-path src --ignore-src -y

Step 6 - Building the Code

catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

Step 7 - Dependencies Problems

sudo apt install ros-noetic-costmap-2d
sudo apt install ros-noetic-effort-controller
sudo apt install ros-noetic-robot-localization


Step 8- Run the Code

roscore &

  • Then press [Enter]

IARRC Simulation

roslaunch rr_gazebo macaroni_iarrc_circuit.launch

roslaunch rr_iarrc test_circuit_sim.launch

EVGP Simulation

roslaunch rr_gazebo evgp.launch

roslaunch rr_evgp evgp_planning_demo.launch

  • Remeber to do source ~/catkin_ws/devel/setup.bash if the launch file can't be found in package (you should add this to ~/.bashrc if you haven't already)
  • Gazebo usually freezes when loading right after installation so just run it, wait, kill it with [Ctrl-C], wait until it is dead, then retry!