Documentation Status

Package Summary

Documented

Skeleton Tracker Teleop Package for the Pi Robot Project

Package Summary

Documented

Skeleton Tracker Teleop Package for the Pi Robot Project

Package Summary

Documented

Skeleton Tracker Teleop Package for the Pi Robot Project

Package Summary

Documented

Skeleton Tracker Teleop Package for the Pi Robot Project

Package Summary

Continuous integration Documented

Skeleton Tracker Teleop Package for the Pi Robot Project

  • Maintainer status: end-of-life (No longer developed or maintained.)
  • Maintainer: Patrick Goebel <patrick AT pirobot DOT org>
  • Author: Patrick Goebel <patrick AT pirobot DOT org>
  • License: BSD
  • Source: git https://github.com/pirobot/pi_tracker.git (branch: indigo-devel)
Cannot load information on name: pi_tracker, distro: jade, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: pi_tracker, distro: kinetic, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: pi_tracker, distro: lunar, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: pi_tracker, distro: melodic, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.

End of Life

The pi_tracker package was created a long time ago as an entry for the early ROS 3D contest and I don't have plans to develop it in the future.

Note that the pi_tracker package depends on either the openni_tracker package or the skeleton_markers package. Under ROS Indigo, I have only had success using a Microsoft Kinect with these package. It seems the Asus Xtion Pro Live can be difficult to get working with skeleton tracking on newer USB 3.0 machines and Ubuntu 14.04.

Overview

The pi_tracker package uses four interrelated but independent ROS nodes that communicate over ROS topics and services:

  • skeleton_tracker (from the skeleton_markers package) for talking to the OpenNI skeleton tracking API and publishing the joint configuration and tf frames. Publishes joints names, positions, orientations and confidence values to the /skeleton topic.

  • tracker_command for detecting gesture commands and connecting to services that control the robot. Subscribes to the /skeleton topic and makes calls to services on other nodes. New gestures and commands can be added easily by defining simple functions over the joint configurations.

  • tracker_base_controller for controlling the movements of a differential drive (either holonomic or non-holonomic) mobile base. Subscribes to /skeleton and publishes to /cmd_vel.

  • tracker_joint_controller for teleoperating the joints of the robot including arms, torso and head. Subscribes to /skeleton and publishes to /cmd_joints.

Skeleton Tracker Node (from the skeleton_markers package)

skeleton_tracker

(This description is copied from the skeleton_markers package.) A ROS node written in C++ for talking to the OpenNI skeleton tracking API and publishing the joint configuration and tf frames. Based on Taylor Veltrop's teleop_kinect.cpp source at veltrobot_teleop.

Published Topics

/skeleton (pi_tracker/Skeleton)
  • Joint names, positions, orientations and confidence values.

Parameters

~tracking_rate (int, default: 1)
  • Rate to publish skeleton data.
~fixed_frame (string, default: "openni_depth")
  • The fixed reference frame when computing the joint frame transforms.

Provided tf Transforms

fixed_framehead
  • Head transform
fixed_frameneck
  • Neck transform
fixed_frametorso
  • Torso transform
fixed_frameleft_shoulder
  • Left shoulder transform
fixed_frameleft_elbow
  • Left elbow transform
fixed_frameleft_hand
  • Left hand transform
fixed_frameright_shoulder
  • Right shoulder transform
fixed_frameright elbow
  • Right elbow transform
fixed_frameright_hand
  • Right hand transform
fixed_frameleft_hip
  • Left hip transform
fixed_frameleft_knee
  • Left knee transform
fixed_frameleft_foot
  • Left foot transform
fixed_frameright_hip
  • Right hip transform
fixed_frameright_knee
  • Right knee transform
fixed_frameright_foot
  • Right foot transform

Tracker Command Node

tracker_command

A ROS node written in Python for detecting gesture commands and connecting to services that control the robot. New gestures and commands can be easily added by defining simple functions over the joint configurations.

Subscribed Topics

/skeleton (pi_tracker/Skeleton)
  • Joint names, positions, orientations and confidence values.

Parameters

~command_rate (int, default: 1)
  • Rate to compute gestures from the skeleton tracker data.

Tracker Command Required Services

Tracker command requires one or more services from each node it commands. In its current form, the tracker command node sends simple string commands to control nodes via their set_command service. For example, sending the command "STOP" to the tracker_base_controller node (see below) tells the base to stop moving.

Tracker Base Controller Node

tracker_base_controller

A ROS node written in Python for controlling the movements of a wheeled robot (holonomic or non-holonomic) using either the hands or the feet.

Subscribed Topics

/skeleton (pi_tracker/Skeleton)
  • Joint names, positions, orientations and confidence values.

Published Topics

/cmd_vel (geometry_msgs/Twist)
  • Command the robot base to move forward/backward or rotate in place. For a holonomic robot, both x and y linear components of the velocity are available.

Services

~set_command (pi_tracker/SetCommand)
  • Set the mode command to control the base. Commands include: "STOP", "DRIVE_BASE_HANDS" or "DRIVE_BASE_FEET"

Parameters

~base_controller_rate (int, default: 1)
  • Rate to send motion commands to the base.
~max_drive_speed (double, default: 0.3)
  • Maximum forward/backward speed allowed.
~maximum_rotation_speed (double, default: 0.5)
  • Maximum rotation speed allowed.
~base_control_side (string, default: "right")
  • Are you left handed/legged or right?
~scale_drive_speed (double, default: 1.0)
  • Some robot drivers may require a scale factor to get speed in m/s
~scale_rotation_speed (double, default: 1.0)
  • Some robot drivers may require a scale factor to get angular speed in rad/s
~holonomic (boolean, default: False)
  • The tracker_base_controller will send separate x and y components in the Twist message for holonomic robots.

Tracker Joint Controller Node

tracker_joint_controller

A ROS node written in Python for teleoperating the joints of a multi-jointed robot, typically humanoid in form with arms, torso and a pan and tilt head.

Subscribed Topics

/skeleton (pi_tracker/Skeleton)
  • Joint names, positions, orientations and confidence values.

Published Topics

/cmd_joints (sensor_msgs/JointState)
  • Command the robot's joints to move to goal positions at a designated speed.

Services

~set_command (pi_tracker/SetCommand)
  • Set the mode command to control the joints. Commands include: "STOP", "TELEOP_JOINTS"

Parameters

~joint_controller_rate (int, default: 5)
  • Rate to publish the joint updates.
~default_joint_speed (double, default: 0.5)
  • Default movement speed for the joints in rad/s.
~use_real_robot (boolean, default: True)
  • Whether or not there is a real robot on the other end. Otherwise, the joint commands are published on the /joint_state topic so the result can be viewed in RViz.
~skel_to_joint_map (dict, default: Based on URDF for Pi Robot. Adjust for your robot!)
  • A dictionary mapping skeleton frames to joint names for the given robot.

Example Launch File

It is recommended to split the launch process into two launch files. The first launch file brings up the Kinect, robot state publisher and skeleton publisher. The second launch file fires up the various tracker nodes. This way you can play with variations on the tracker nodes without having to disconnect and reconnect to the Kinect camera. Also, note that neither launch file brings up a real joint controller or base controller since these will depend on your hardware.

Sample Skeleton/Kinect Launch File:

<launch>
  <arg name="fixed_frame" value="camera_depth_frame" />
 
  <param name="/use_sim_time" value="False" />
 

  <arg name="debug" value="False" />
  <arg name="launch_prefix" value="xterm -e gdb --args" />
 
  <param name="robot_description" command="$(find xacro)/xacro.py '$(find pi_tracker)/urdf/pi_robot/pi_robot_with_two_arms.xacro'" />
 
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
    <param name="publish_frequency" value="20.0"/>
  </node>
    
  <include file="$(find rgbd_launch)/launch/kinect_frames.launch" />

  <group if="$(arg debug)">
    <node launch-prefix="$(arg launch_prefix)" pkg="skeleton_markers" name="skeleton_tracker" type="skeleton_tracker" output="screen"    >
      <param name="fixed_frame" value="$(arg fixed_frame)" />
      <param name="load_filepath" value="$(find pi_tracker)/params/SamplesConfigNewOpenNI.xml" />
    </node>
  </group>
  <group unless="$(arg debug)">
    <node name="skeleton_tracker" pkg="skeleton_markers" type="skeleton_tracker">
      <param name="fixed_frame" value="$(arg fixed_frame)" />
      <param name="load_filepath" value="$(find pi_tracker)/params/SamplesConfigNewOpenNI.xml" />
    </node>
  </group>
</launch>

Sample Tracker Nodes Launch File:

<launch>
    <node name="tracker_command" pkg="pi_tracker" type="tracker_command.py" output="screen">
        <rosparam command="load" file="$(find pi_tracker)/params/tracker_params.yaml" />
    </node>
    <node name="tracker_base_controller" pkg="pi_tracker" type="tracker_base_controller.py" output="screen">
        <rosparam command="load" file="$(find pi_tracker)/params/tracker_params.yaml" />
    </node>
    <node name="tracker_joint_controller" pkg="pi_tracker" type="tracker_joint_controller.py" output="screen">
        <rosparam command="load" file="$(find pi_tracker)/params/tracker_params.yaml" />
    </node>
</launch>

Example YAML File

command_rate: 2
tracking_rate: 2
base_controller_rate: 2
joint_controller_rate: 2
default_joint_speed: 0.6
max_drive_speed: 0.3
max_rotation_speed: 0.3
base_control_side: right

use_real_robot: True

# Use these values for a typical non-holonomic robot.
scale_drive_speed: 1.0
scale_rotation_speed: 1.0
reverse_rotation: False
holonomic: False

# Use the following scale factors for the Rovio.
#scale_drive_speed: 4.0
#scale_rotation_speed: 0.4
#reverse_rotation: True
#holonomic: True

fixed_frame: openni_depth

skel_to_joint_map: {
   head: head_pan_joint,
   neck: head_tilt_joint,
   torso: torso_joint,
   left_shoulder: left_shoulder_lift_joint,
   left_elbow: left_elbow_joint,
   left_hand: left_hand_joint,
   right_shoulder: right_shoulder_joint,
   right_elbow: right_elbow_joint,
   right_hand: right_hand_joint,
   left_hip: no_joint,
   left_knee: no_joint,
   left_foot: no_joint,
   right_hip: no_joint,
   right_knee: no_joint,
   right_foot: no_joint
}

Wiki: pi_tracker (last edited 2016-06-22 00:25:29 by Patrick Goebel)