Giter Club home page Giter Club logo

norfair-ros's Introduction

Norfair by Tryolabs logo

ROS package for implementing multi-object tracking using Norfair

How to use

Norfair is a Python package that implements a multi-object tracking algorithm. This package is designed to be an interface between Norfair and ROS. The package is built into three nodes, converter, video_writer, and norfair_ros.

The typical flow of the package is reading the detections from a detector node, converting them to the Norfair format, and publishing the tracking results.

Norfair offers a drawing API to visualize the tracking results. This package uses this API to draw the tracking results and save them as a video file. This is particularly useful for the debugging process.

We build a development repository where you can find a functional environment running on Docker. This repository pretends to be an easy way to try and learn how to use the Norfair package before integrating it into your workspace.

Installation

If you like to use the Norfair package in your own ROS environment you can install it in the following way.

Building

Inside your catkin workspace clone this repo.

cd catkin_ws/src
git clone [email protected]:tryolabs/norfair-ros.git

After that, build. Depending on the versions of catkin are using you can run:

cd ..
catkin_make

Or, run this with the new catkin tools.

roscd norfair_ros
catkin build

Dependencies

This package is built on Python and depends on:

  • Norfair. You can install with pip install norfair.
  • NumPy. You can install with pip install numpy.

Also, we generate a setup.py file to install the package with pip install . in the root of the package.

Nodes

This package is built in three nodes, converter, video_writer, and norfair_ros.

The converter node is designed to be an interface to unify different input formats to a unique format to the norfair_ros node.

You can define your conversions in the converter or use the provided implementations. Now darknet_ros is supported by the converter.

The converter normalized output is read by the norfair_ros node and tracking them as output.

The video_writer node is used to save the Norfair output video.

You can find more information about each node, as subscribed/published topics, and parameters in this specific documentation.

Example usage

This package has a launch file designed to run the three nodes in a single command. A common practice in ROS is to have a startup package that launches all the nodes in a single command. In this case, you can include this launch file in your startup package.

In case you like to launch this package from the command line you can do it in the following way.

roslaunch norfair_ros norfair_ros.launch

This command initializes the converter, video_writer, and norfair_ros nodes with the default parameters defined in config files.

As mentioned before, in case you not working with the darknet_ros detector, you need to define your own conversions in the converter node. This conversion needs to transform your detector format to the Norfair format defined in the message Detections.msg.

After that, you can publish your detection to the Norfair inputs topic called norfair/input. The node process the detections and publish the tracking information to the topic norfair/output.

If you like to use the video writer node, you must publish your image to the topic camera/rgb/image_raw using the Image type and modify the path to save the output video in the config/video_writer.yaml file.

In the case that you like to change the names of the subscribed/published topics, you can do it in the config files.

Debugging

We suggest using the video_writer node to debug the tracking process.

To enable this capability you have to edit the config/video_writer.yaml file and set the output_path argument with the desired output path and change the necessary configuration to your particular case in the same file.

The output video will include the bounding boxes and the tracking information.

To prevent an unsynchronized situation you must set properly the publisher rate of your images to prevent the video_writer node is faster than the norfair_ros node, losing frames.

norfair-ros's People

Contributors

diegofernandezc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ljjtyjr cto-algo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.