Skip to content

Setting up and running the simulator

harely22 edited this page May 21, 2018 · 7 revisions

This article assumes you already finished the Installing our code base guide. If you have not, please do that now.

This is a run through the process of setting up and running the robot simulator. This is particularly useful if you want to test your code on a machine other than the robot.

Prerequisites

For your computer to run the simulator, it must:

  • Use Ubuntu 16.04
  • Have ROS Kinetic installed
  • Have Gazebo installed
  • Have the UTexas BWI codebase running

All this is covered in the Installing our code base guide

Running the Simulator

Supposing you've done all of this, you can run the simulator by running the ROS Core in a separate terminal window first. You do this by running:

roscore

NOTE: Remember to source the setup.bash file in /opt/ros/kinetic/setup.bash

Then, you run the simulator like so:

roslaunch bwi_launch simulation_v2.launch

NOTE: Remember to source the other setup.bash file in your catkin workspace (~/catkin_ws/devel/setup.bash)

That should be it. Check for any errors and warnings (red and yellow text) as they might warn you about missing dependencies.

Opening doors

If you want to open all doors in the simulator, you can simply run:

rosservice call /update_doors "door:' ' open:true all_doors: true timeout:0"

You can specify any door by specifying the door name. For example, if you want to open the largest door in GDC 3.414B (denoted door 1), you'd run:

rosservice call /update_doors "door: 'd3_414b1' open: true all_doors: false timeout:0"

Tab-complete also works for ROS commands, so if you tab after typing /update_doors, it will fill out a template argument for opening doors.

Clone this wiki locally