Flatsim

flatsim stands for flatworld simulation and is a small simulation application which allows you to run almost the full Isaac navigation stack. The flatsim application simulates a laser range scanner by casting rays in a given occupancy grid map. This kind of simulation is extremely fast, compared to a more costly 3D ray scan in a full 3D environment used by the Unreal based simulation. It is thus a quick and highly performant way to test the navigation stack.

The flatsim application can not provide the same accuracy as a full 3D based simulation inside the actual scenario, especially in terms of accurate simulation of reflections or transparent objects.

flatsim uses the set of nodes from the navigation stack and adds two new nodes:

  • DifferentialBaseSimulator: Runs a basic differential base drive model to move the robot around based on the commands sent from the navigation stack. This provides the ground truth pose of the robot for range scan simulation. It also provides wheel odometry which is used as another input by the navigation stack.
  • RangeScanSimulator: Computes a simulated flat range scan based on the current position of the robot and the desired map.
../../../_images/image17.png

Running the Flatsim Application

  1. Start flatsim from inside the Isaac source tree with the following command:

    bob@desktop:~/isaac$ bazel run //apps/flatsim
    
  2. Load the Sight web interface at http://localhost:3000 in a web browser.

The flatsim application starts by default in random walk mode. In this mode, a dot, representing the robot, navigates to a random target on the map. When the robot reaches the target, a new target is determined and the robot moves towards that target.

Using Interactive Markers in Flatsim

As a first experiment with flatsim, perform the following steps to add an interactive marker to the map. You can click and drag this marker to different locations on the map. When you do, the robot changes course to move to the new location of the marker.

  1. If it is not already running, start flatsim with the following command:

    bob@desktop:~/isaac$ bazel run //apps/flatsim
    
  2. Load the Sight web interface at http://localhost:3000 in a web browser. The robot dot begins to navigate to the first random target.

  3. In the configuration section on the right side of the Sight web interface, in goals.goal_behavior, change the desired behavior from random to pose. The robot stops moving because you have changed its behavior but you have not yet added the interactive marker that you will configure as a goal for the new behavior.

  4. Right-click in the the flatsim - Map View window, and choose Settings.

  5. In Settings, click Select marker and choose pose_as_goal.

  6. Click Add marker.

  7. Click Update. The marker is added to the map, separate from the random walk target, which is still displayed. You may need to zoom in on the map to see the new marker. The robot does not immediately begin navigating to the marker.

  8. Click and drag the marker to a new location on the map. The robot begins to navigate to the marker location.

See Interactive Markers for more information.