-
Notifications
You must be signed in to change notification settings - Fork 0
How To Install
The installation process consists of installing OMPL with Python bindings, installing ROS, setting up your ROS workspace, and setting up OpenCPN for visualization.
-
Install ROS Melodic on Ubuntu 18.04 (or similar): http://wiki.ros.org/melodic/Installation
-
Find the location that you want to create a ROS workspace (eg. home directory:
cd ~
) -
Create a ROS workspace
mkdir -p catkin_ws/src cd catkin_ws catkin_make
-
Clone this repository in the src folder
cd src git clone https://github.com/UBCSailbot/local-pathfinding.git
-
Clone the sailbot-msgs repository in the src folder
git clone https://github.com/UBCSailbot/sailbot-msg.git
-
Go back to catkin_ws and build and source
cd .. catkin_make source devel/setup.bash
ROS requires Python2, so we will have a custom ompl installation script for this task. This may take 7-16 hours, as the creation of Python bindings takes a very long time. If you encounter errors in this process, try to run the commands in the script individually and identify where you are having difficulties
Installation on the host computer requires running the commands that are in the Dockerfile directly on your computer. A bash script has been made with the same instructions as the Dockerfile to run this.
-
Navigate to the
install
directory of this repositorycd src/local-pathfinding/install
-
Run the script as root
sudo ./ompl_install_instructions.bash --sudo
-
Check for errors. If none occur, it should look something like:
[ 50%] Built target geometric.h Scanning dependencies of target update_util_bindings [ 50%] Creating C++ code for Python module util (see pyplusplus_util.log) ... still alive after 120.328 seconds! still alive after 180.415 seconds!
If the script stops, copy the output to a text file. You can try running the script line by line instead to find where the error occurs. If you get stuck, you can contact Tyler Lum ([email protected]) for questions.
You can also pull a Docker image from DockerHub by running docker pull tylerlum/ros_ompl_python_2:11.2020.V2
, which was updated as of November 2020. Then you can run: docker run -it tylerlum/ros_ompl_python_2:11.2020.V2
Note: By default, the plotting will not working from a docker container because it does not have access to your screen. To fix this, you can run the following command in another terminal: xhost +local:root
(be sure to run xhost -local:root
when you are done to be safe!), then use the following command instead of the previous docker run command:
docker run -it \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
tylerlum/ros_ompl_python_2:11.2020.V2
-
Navigate to the
install
directory:cd install
-
Build the docker image by running
docker build --tag ros_ompl_python_2 .
(can replace ros_ompl_python_2 with the tag name of your choice). This operation takes about 10 hours. It creates a Docker image with all the dependencies to run the software. -
Run a docker container by running
docker run -it --name ompl --rm ros_ompl_python_2
, which creates a container from the image created from the previous step. This brings you into an environment with the desired dependencies. To get plotting working, you can runxhost +local:root
then:docker run -it \ --env="DISPLAY" \ --env="QT_X11_NO_MITSHM=1" \ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ ros_ompl_python_2