Wiki

Clone wiki

subt / tutorials / SystemSetupInstall

Back to Getting Started

ignition_logo_org_50x50.png

Catkin workspace setup for SubT (Ignition) Simulation

Before you start, make sure your computer satisfies the minimum System Requirements.

  1. Setup and install dependencies:

    $ 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 sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
    
    $ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
    
    $ sudo apt-get update
    
    $ sudo apt-get -y install build-essential cmake libusb-dev lsb-release mercurial pkg-config python ignition-blueprint ros-melodic-desktop \
    ros-melodic-tf2-sensor-msgs ros-melodic-robot-localization ros-melodic-ros-control ros-melodic-twist-mux ros-melodic-joy \
    ros-melodic-rotors-control python3-vcstool python3-colcon-common-extensions mercurial ros-melodic-ros1-ign
    
  2. Update all ROS and Ignition packages, in case you have some of them already pre-installed:

    $ sudo apt-get upgrade
    
  3. Create a catkin workspace, and clone the SubT repository:

    # Setup the workspace
    $ mkdir -p ~/subt_ws/src && cd ~/subt_ws/src
    
    # Clone the Tunnel Circuit release branch
    $ hg clone https://bitbucket.org/osrf/subt -b tunnel_circuit
    
  4. Build the workspace:

    # Source ROS distro's setup.bash
    $ source /opt/ros/melodic/setup.bash
    
    # Build and install into workspace
    $ cd ~/subt_ws/
    $ catkin_make install
    
  5. Launch the SubT Simulator:

    # Source SubT setup file
    $ source ~/subt_ws/install/setup.bash
    
    # Test installation
    $ ign launch -v 4 tunnel_circuit_practice.ign robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_1
    
    **NOTE**: When the Ignition Virtual Tunnel Circuit is installed and launched for the first time, the GUI will show blank panels for a few minutes until the models are downloaded.
              They are stored under the `~/.ignition/fuel/fuel.ignitionrobotics.org/openrobotics/models` directory.
    
  6. Test movement by driving the X1 robot forward

    # Open another terminal and run this command:
    $ rostopic pub /X1/cmd_vel geometry_msgs/Twist '{linear:  {x: 0.5, y: 0.0, z: 0.0}}'
    

See also:

Team Configuration to understand how to choose the robots in your team and Custom Controller for a basic example of a controller that can be used as a starting point for your solution.

Back to Getting Started

Updated