Skip to content

Setting up and running the simulator

Nick Walker edited this page Oct 11, 2017 · 7 revisions

This article assumes you already finished the Installing our code base (FRI) 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.

Prerequesites

For your computer to run the simulator, it must:

  • Use Ubuntu 14.04
  • Have ROS Indigo installed
  • Have Gazebo installed
  • Hove 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:

rosmaster

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

Then, you run the simulator like so:

roslaunch bwi_kr environment_krr2014.launch

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

If you are going to use the knowledge base or action executor, make sure you also launch

roslaunch bwi_kr_execution bwi_kr_execution_simulation.launch

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"

Alternatively if that doesn't work, try:

rosservice call /update_doors "door" true true

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"

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