Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

recognition_objects_classifier

milesial edited this page May 30, 2018 · 3 revisions

Description

This C++ package's job is to classify objects, as either in map or unknown.

  • map : The object is mainly intersecting with the walls, or ouside-the-map sections. It is considered that this object was created from a sensor detecting a static object that we are aware of.
  • unknown : The object does not correspond with known static shapes, and is mainly overlapping with the working area.

The objects that are processed are :

If you followed along, you've figured out that the output message published on the topic has 6 parts : 3 types of objects, each either map or unknown.

Each published object has its own header, as it helps distinguishing objects coming from different sources, or at different timestamps.

The choice was made to make sure all published objects are in the /map frame.

The objects (rectangles, segments and circles) are published on rviz : green if it is classified as map, red if it is unknown.

Authors and versions

  • v1.0 (P18) : @milesial
    • Classifies circles, rects and segments
  • v2.0 (P18) : @milesial
    • C++ migration, multithreading

Configuration

There is no special external configuration for this package.

Communication

Servers

Server name Type Function
/recognition/objects_classifier/objects Topic The sorted lists of circles, rectangles and segments are published here

Clients and subscriptions

Server name Type Function
/memory/map/get Service The node uses the map package to get shapes that make the static map.
/processing/belt_interpreter/rects Topic The node listens for rectangles processed from belt data.
/processing/lidar_objects/obstacles Topic The node listens for circles and segments processed from lidar data.

Running the package

rosrun recognition_objects_classifier objects_classifier_node

How it works

Circles

If the center of a circle is inside a map object, it is classified as map. If a circle has a speed greater than a constant, it is considered unknown.

Segments

If both points of a segment are inside a map object, it is classified as map.

## Rectangles Rectangle classification is not simple: classifying only with the center would have lead to many false classifications. The idea is that if more than a certain percentage of a rectangle's area intersects with the map, then it is in the map. To compute this approximation of the area, the rectangles is discretized, and the created points are each classified as in the map or as unknown. If the ratio of map points is greater than the percentage constant in the code (35%), it is classified as map.

The classification of the points happen on several threads, and a main thread manages the discretization and the final classification of the objects.

Notes

  • As of today, the node removes segments that are full inside a circle, and thus generated it (see the processing_lidar_objects package. This can be changed in the lidar_objects parameters so the transformed segments are not published, so the piece of code in this node is useless.

  • A margin is applied on the map walls (rectangles) so the walls are correctly detected even if the rectangle / segment is not precise.