Note: Start here if you want to learn how to track an object.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Getting started with the ViSP moving edge tracker

Description: How to track an object using a recorded video sequence.

Tutorial Level: BEGINNER

Next Tutorial: Tracking your own model

Starting the video sequence

The package comes with a sample bag file in bag/tutorial-static-box.bag.

It stores synchronized messages for a monocular camera and its associated camera information.

You can launch rosbag replay, the tracker node and a client by typing:

# If you are using ROS Groovy or later:
roslaunch visp_tracker tutorial.launch
# If you are using ROS Fuerte or later:
roslaunch visp_tracker tutorial-fuerte.launch
# If you are using ROS Diamondback or before:
roslaunch visp_tracker tutorial.launch

Setting the initial pose

The client will launch automatically and display the following image.

ViSP box tracking

- You must first right-click to enter in the manual pose initialization stage, then left-click on four of the box corners in the order illustrated by the following screenshot:

ViSP box tracking

- If the initial pose is satisfactory (ie. the green lines of the model match the object edges) you have to validate the initial pose with a left-click. Note that with a right-click you enter again in the previous stage where you have to left-click on the four points.

- Before validating the initial pose, you can tune the tracking parameters:

rosrun rqt_reconfigure rqt_reconfigure /tracker_mbt_client

- Finally a new left-click closes the initialization stage and start the tracker.

Monitoring the tracking

You can then monitor the tracker by running:

rosrun visp_tracker visp_tracker_viewer _camera_prefix:=/wide_left/camera

The viewer should display a result similar to this screenshot: ViSP box tracking

To plot the object position, type:

rqt_plot topics /object_position/transform/translation/x:y:z

Fine tuning the tracking parameters

Additionally, the tracking parameters can be changed online using rqt_reconfigure:

rosrun rqt_reconfigure rqt_reconfigure /tracker_mbt

Wiki: visp_tracker/Tutorials/Getting started (last edited 2015-11-02 18:02:12 by FabienSpindler)