Skip to content

Wallframe Tracker

Kel Guerin edited this page Oct 10, 2013 · 24 revisions

Out of the box, wallframe includes a tracker node in the wallframe_tracker package. This node is designed to talk to the Microsoft Kinect (or similar depth sensor) using the OpenNI and NITE middleware. For those who care, the source code for wallframe_tracker is a modified fork of openni_tracker, formally part of the ROS OpenNI package. wallframe_tracker publishes messages on the /wallframe/tracker/users topic with the wallframe_msgs/TrackerUserArray.msg type. This message is an array of wallframe_msgs/TrackerUser.msg messages, containing information about the users 3D joint position, center of mass and joint tracking confidence. More information on WallFrame messages is [here](WallFrame Message Descriptions)

Tracker_Image

Important Files


Tracker Launch File

<!-- WallFrameTracker Launch File -->
<launch>
  <!-- Set parameters -->
  <arg name="tracker_name" default="tracker" />
  <arg name="tracker_id" default="#3" />
  <!-- XnSensorServer Cleanup Helper -->
  <node name="XnSensorServerKillerNode" output="screen" pkg="modulair_tracker" type="modulair_tracker_node" launch-prefix="bash $(find modulair_tracker)/xn_sensor_server_cleanup.sh" />
  <!-- The Tracker node using the tracker parameters -->
  <node name="tracker1" output="screen" pkg="modulair_tracker" type="modulair_tracker_node" >
    <param name="device_id" type="str" value="$(arg tracker_id)" />
    <param name="tf_prefix" value="tracker" />
    <param name="relative_frame" value="/wall_frame" />
  </node>
  <!-- TF alignment file -->
  <include file="$(find modulair_tracker)/launch/wallframe_tracker_alignment.launch"/>
</launch>
  • Found in wallframe_tracker/launch/center_tracker.launch
  • This launch file brings up the tracker named tracker. The tracker_id value needs to be set to whatever ID your tracker has (usually assigned in the order it was plugged into the computer). It is shown set to #3 here.
  • Also launches a seperate launch file which aligns the tracker's coordinate system to your wall (more below)
  • The relative_frame value must match the coordinate frame (in this case /wall_frame) you are using for your display wall, as defined in the alignment file (below)

Tracker Alignment File

<!-- WallFrameTracker Alignment Launch File -->
<launch>
  <!-- offset the tracker from world coordinates to its actual position -->
  <node pkg="tf" type="static_transform_publisher" name="tracker_transformation" args=" 0 0 2.514 -1.5707  .7 0  /world /tracker_link 10"/> 
  <!-- co-align the traker and depth frames -->
  <node pkg="tf" type="static_transform_publisher" name="tracker_tracker_trans" args="0 0 0 0 0 0 /tracker_link /tracker/openni_depth_frame 10"/>
  <!-- Transform for wall to world coordinates so we can broadcast the tracker data in wall coords -->
  <node pkg="tf" type="static_transform_publisher" name="world_to_wall" args="0 0 1.0 0 0 1.5707  /world /wall_frame 10"/>
</launch>
  • Found in wallframe_tracker/launch/wallframe_tracker_alignment.launch
  • This launch file creates several static TF transforms to align your tracker to the coordinate frame of the your display wall
  • We defined the /world frame as in the center of the wall, on the floor.
  • You will need to measure the relative position and angle of your tracker (relative to world) and put that inside the tracker_transformation static transform publisher. The first six values in args are the [x, y, z, yaw, pitch, roll] offset of the tracker.
<node pkg="tf" type="static_transform_publisher" name="tracker_transformation" args=" 0 0 2.514 -1.5707  .7 0  /world /tracker_link 10"/>
  • You will also need to set up the main coordinate system for the wall (we used 1 meter up from the floor, in the center of our wall, at the image plane) and define that in the world_to_wall static transform publisher, with the Z axis pointing out of the wall, and X up. The first six values in args are the [x, y, z, yaw, pitch, roll] offset of wall coordinate frame.
<node pkg="tf" type="static_transform_publisher" name="world_to_wall" args="0 0 1.0 0 0 1.5707  /world /wall_frame 10"/>

TODO: Image of our TF Frames for our wall