ROS
Teams are not required to use the Robotics Operating System (ROS), but interfaces with ROS Melodic are made available to teams. As such, teams intending to use alternatives should expect some additional work in creating bridges equivalent to the Gemini ros_adapter. This guide is equivalent to the official guide from the ROS wiki, and is added simply for convenience.
After booting Ubuntu in your virtual environment:
  1. 1.
    Ensure your Ubuntu repositories are correctly configured. In the 'Software & Updates' application, under the 'Ubuntu Software' tab, ensure the first four checkboxes under 'Downloadable from the Internet' are checked.
  2. 2.
    Allow your computer to download software from ROS' servers by entering the following in the command prompt:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
3. Set up your keys:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4. Install ROS Melodic. You may want to install the desktop-full version by appending '-full' to the end (ros-melodic-desktop-full) which has 2D and 3D simulators and perception.
sudo apt update
sudo apt install ros-melodic-desktop
5. Automatically add ROS environment variables to new bash sessions.
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
6. Install package dependencies.
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo rosdep init
rosdep update
7. Create a catkin workspace, clone the Gemini ros_adapter and install the required dependencies.
mkdir -p catkin_ws/src
cd catkin_ws/src
git clone https://github.com/Njord-The-Autonomous-Ship-Challenge/ros_adapter.git
git clone https://github.com/Njord-The-Autonomous-Ship-Challenge/ros_clients.git
git clone https://github.com/Njord-The-Autonomous-Ship-Challenge/ros_scenario.git
pip install -r ros_adapter/requirements.txt
8. Configure the ros_adapter's network settings to match your virtual machine. First, open the network settings to find the IPv4 IP address used by your VM. Second, open the file catkin_ws/src/ros_adapter/config/server.yaml. Change the IP address to match the IP used by your VM.
9. Configure the ros_client's network settings to match your Windows operating system (not the virtual machine). This can be found by typing 'ipconfig' in a Windows terminal. The IPv4 Address will typically begin with 192.168. Enter this IP-address in the config file /catkin_ws/src/ros_clients/config/example_client.yaml.
10. Initialize the catkin workspace by running the following.
cd ~/catkin_ws
catkin_make
source devel/setup.bash
Copy link