Clone wiki

subt / tutorials / SystemSetupInstall

Back to Getting Started


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 $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    $ sudo apt-key adv --keyserver hkp:// --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    $ sudo sh -c 'echo "deb `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
    $ wget -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 -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/` 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