Setup Kaarta Stencil/Traak and subscribe to it's mapping and localization data on an external computer on the same network over ROS

The Kaarta Stencil/Traak helps localize the user's pose (position and orientation) in a pre-built map using a Velodyne VLP16 and an XSens IMU. The Stencil runs a local ROS master with which the ROS nodes for mapping and localization are registered. This guide will help setup the Stencil and access it's mapping and localization data on an external computer connected to the Track using Ethernet interfaces using ROS.

Stencil Setup and Operation


  1. Kaarta Traak/Stencil (with a VLP16 and an XSens IMU)


XSens IMU Setup

  • On the Stencil download the xsens_config folder from here.
  • Open a terminal and change directory to ~/Downloads/xsens_config/mt_sdk/mt_sdk_4.2.1
  • Run make
  • Run sudo make install
  • Add user to dialout group like this: sudo adduser <UsernameOnStencil> dialout
  • Connect the XSens IMU to the Stencil  using the LEMO connector on the side of the Stencil and launch MT Manager. (In xsens_config/mt_manager)
  • Configure the Xsens IMU to match the settings in the following image:


Stencil Operation (RViz Pictures coming soon)

  • Connect the VLP16 to the Traack/Stencil using the circular LEMO connector port on the Stencil
  • Open a terminal on the Stencil and run rosrun clay_launch If everything is setup right, you should see the mapping start and an RViz window with the mapping pointcloud data and the IMU pose.
  • Make sure to make a note of the pose from where the mapping nodes were just launched. Walk around the area you want to be mapped with the Stencil (The computer+ IMU + VLP16) with the mapping nodes running.
  • Once you cover all the area you would like to be mapped, kill the mapping nodes from the terminal (Ctrl + C)
  • Now run rosrun clay_launch
  • Next run rosrun clay_launch
  • Then go back to the same position and orientation that the mapping was run in and run rosrun clay_launch You should see an RViz screen with the real-time VLP16 points aligned with the pre-built map.  If the real-time points don't align with the pre-built map, kill the localization nodes, make sure your position and orientation are as close as possible (to the pose when mapping nodes were launched) and re-run rosrun clay_launch Now as you move, the IMU pose on RViz window should follow indicating your pose in the mapped area. 

Network Setup

If the mapping and localization runs successfully on the Stencil, it can now be setup for an external computer running ROS to have access to the mapping and localization data over a network connection.


  1. Stencil running mapping and localization described in the previous section
  2. External computer running Ubuntu 14.04/16.04 with ROS and an Ethernet interface
  3. Ethernet Cable


  • Set up static IP addresses on the same subnet for the Ethernet interfaces on both the computer and the Stencil. As an example for this guide, lets say they are (Computer) and (Stencil)
  • Now connect the computers over these Ethernet ports using an Ethernet cable
  • Add the host names and IP addresses of both the computers to the /etc/hosts file on both the computers. For example, on the Stencil and the external computer add the following lines to the /etc/hosts file:



  • Save and close the /etc/interfaces file. You should now be able to ping and ssh to the computers from one another using host names.

Remember to go through the two steps above on both the Stencil and the external computer. Make sure to test by pinging and SSH'ing into both the computers from one another.

  • Now, run "roscore" in a terminal on the external computer only.     
  • Now, only on the Stencil set the ROS master to the computer- Open a terminal and run export ROS_MASTER_URI=http://<ExternalComputerName>:11311  and then export ROS_IP=
  • In the same terminal on the Stencil, run rosrun clay_launch
  • On the external computer, run rostopic list and you should be able to see and subscribe to all the messages over the topics published by the ROS nodes on the Stencil on the external computer. You can visualize the data in real time on the external computer using RViz.
  • You should be able to go through the steps Stencil Operation sub-section in the previous section while subscribing to and visualizing the data on the external computer.

  • The VLP16 and the IMU should be as close as possible to each other, not more than a few cm. They can of course be  mounted away from the Stencil computer.
  • If they are mounted on a vehicle, and you would like the coordinate system of the vehicle to be localized (instead of the VLP16 coordinate frame called "/sensor"), set up a static transform publisher in the start_localization.launch like this:

          <node pkg="tf" type="static_transform_publisher" name="kaarta2car" args="x y z yaw pitch roll /sensor /vehicle_frame 1000"/>

  • The scripts are all in ~/realearth/stencil/install/lib/clay_launch/scripts
  • "realearth" and "clay" are all old/different names used by Kaarta for their products, they are being phased out.