Developper setup - robotique-udes/zeus_rover GitHub Wiki

Developper setup

Tested with ROS Melodic running on Ubuntu 18.04.*

Note: If you are installing this on a Jetson computer, follow these instructions first to properly it up before doing the rest of the steps.

  1. Install ROS Melodic

  2. If you don't already have one, create a catkin workspace by following this guide

  3. Add your catkin_ws source to your .bashrc file.

    echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
    
  4. Clone this repo in ~catkin_ws/src/. It is recommended that you clone it in SSH instead of HTTPS since you don't to enter a user and password every time you commit. Connecting to GitHub with SSH

  5. Install non-ros dependencies:

    cd ~catkin_ws/src/zeus_rover
    ./installation.sh
    
  6. Clone the other repos using vcstool. (Note: there are two dependency lists, one in SSH and the other in HTTPS. For development, SSH is recommended):

    cd ~catkin_ws/src/
    vcs import < zeus_rover/dependencies_ssh.repos
    

    All of the dependent repos should now be cloned on the right branches

    • If you need to pull all of the repos at once:

      cd ~catkin_ws/src/
      vcs pull
      
    • If you have added a repo and need to add it to the list of dependencies, first clone it, then:

      cd ~catkin_ws/src/
      vcs export > zeus_rover/dependencies_ssh.repos
      

      Important: When modifying the dependency list, make sure that the HTTPS AND SSH lists are identical except for the url prefixes. Important: This repo should not be in the list since it is already cloned when importing.

  7. Install the official ROS package dependencies with rosdep:

    rosdep install --from-paths src --ignore-src -r -y
    

    Note: you may need to install rosdep first. Command to install rosdep:

    sudo apt-get install python-rosdep
    

    Initialize rosdep once after the installation:

    sudo rosdep init
    rosdep update
    

    If you need to add and official ROS package as a dependency, you must add it to the package.xml of the relevant package.

  8. Install the ZED SDK. If CUDA is not installed, follow the instructions. Then download and install ZED SDK ≥ 3.5. Make sure to choose the right version for your platform and CUDA version.

  9. Go to the root of the workspace and execute catkin_make to compile the packages.

    Note 1: Compiling ROS packages that require opencv as an include directory will return an error on a Jetson because it is not installed at the same place it usually is on other systems. To fix this, run this line:

    sudo ln -s /usr/include/opencv4/opencv2/ /usr/include/opencv
    

    source: https://answers.ros.org/question/199279/installation-from-source-fails-because-of-cv_bridge-include-dir/

    Note 2: It is possible that the compilation saying that it can't find a file related to the ros_talon package. To fix this, launch the compilation with a single worker with the following command:

    catkin_make -j1
    

    After the first successful compilation, you should be able to use as many workers as you want without any issues.

Launching the Gazebo simulation

To launch the gazebo simulation, execute this command

roslaunch zeus_gazebo zeus_mars1.launch

To view the robot and sensor data in RViz:

roslaunch zeus_viz rviz.launch

To view only the rover model without gazebo:

roslaunch zeus_viz model.launch

To control the rover with a gamepad:

roslaunch zeus_control teleop_gamepad.launch