Linux distributions such as Wily (Ubuntu 15.10), Xenial (Ubuntu 16.04) and Jessie (Debian 8)
C++ 11 compiler or newer.
This should take no more than 3 minutes. If you have another version of linux but Ubuntu, follow this guide: http://wiki.ros.org/melodic/Installation. It is very important that you follow the installation guide and instructions on how to run the guide EXACTLY as stated or you will get running errors. Simply copy and paste the commands to your terminal command window
Robot operating system (ROS) provides services designed for heterogeneous computer cluster such as hardware abstraction, low-level device control, implementation of commonly used functionality, message-passing between processes, and package management. The main ROS client libraries (C++, Python, and Lisp) are geared toward a Unix-like system, primarily because of their dependence on large collections of open-source software dependencies.
-
Setup your computer to accept software from packages.ros.org:
$ 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-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
-
Update:
$ sudo apt-get update
-
Installation:
$ sudo apt-get install ros-melodic-desktop-full
-
Before you can use ROS, you will need to initialize rosdep:
$ sudo rosdep init $ rosdep update
-
Environment setup:
$ echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc $ source ~/.bashrc
- Install the protobuf library, which is used as interface to Gazebo.:
$ sudo apt-get install protobuf-compiler
- Install tf. tf is a package that lets the user keep track of multiple coordinate frames over time:
$ sudo apt-get install ros-melodic-geographic-msgs
- Install move-base-msgs. This is necessary to perform some actions:
$ sudo apt-get install ros-melodic-move-base $ sudo apt-get install ros-melodic-move-base-msgs
-
installing catkin tools:
$ sudo apt install python-catkin-tools
-
creating a catkin workspace:
$ mkdir -p ~/manta_ws/src $ cd ~/manta_ws/src $ catkin_init_workspace
-
building the workspace created:
$ cd ~/manta_ws/ $ catkin build
-
source the current workspace and Gazebo model (replace YOUR_USER):
$ echo "source manta_ws/devel/setup.bash" >> ~/.bashrc $ echo "export GAZEBO_MODEL_PATH=/home/YOUR_USER/manta_ws/src/manta_gazebo:$GAZEBO_MODEL_PATH" >> ~/.bashrc $ echo "export ROS_PACKAGE_PATH=/home/YOUR_USER/manta_ws:$ROS_PACKAGE_PATH" >> ~/.bashrc
-
close the current window.
-
Open a new window. To make sure the workspace is properly overlayed run the following command and check that the output matches the next line:
$ echo $ROS_PACKAGE_PATH /home/YOUR_USER/manta_ws:/opt/ros/melodic/share
-
Enter the folder where you want to clone the repostory:
$ cd manta_ws/src
-
Clone the repositories:
$ git clone https://github.com/vortexntnu/Manta-AUV.git $ git clone https://github.com/vortexntnu/uuv-simulator.git $ git clone https://github.com/vortexntnu/vortex_msgs.git
Ps. You can also manually download the zip-folder in the up-right corner and extract the file
inside the src-folder of you workspace
-
Additionally install message_to_tf from hector_localization:
$ cd ~/Downloads $ git clone https://github.com/tu-darmstadt-ros-pkg/hector_localization.git $ mv hector_localization/message_to_tf ~/manta_ws/src/message_to_tf
-
Compile the code by running "catkin build" inside the workspace:
$ cd ~/manta_ws/ $ catkin build vortex_msgs $ catkin build
-
Open a window and run Gazebo world, spawn Manta, thruster manager and navigation by executing:
$ source ~/manta_ws/devel/setup.bash $ roslaunch simulator_launch robosub.launch
-
Open a second window and run dp-controller:
$ roslaunch vortex dp_control.launch
-
Open a third window and launch the path generator client (this is not necessary for now).
$ roslaunch waypoint_action_client send_waypoints_file.launch
- Open a fourth and final window, and run the following line to change mode of controller:
$ rosrun finite_state_machine service_client.py