Use Case: AddTargetFromTarget

Overview

Each instance of the IF_TargetsHandler interface is linked to a tracking system and each tracking system is related to a moving system (for example, a conveyor belt) and a sensing system (for example, a camera).

In the case of a multi-robot line it is not rare to have two or more cameras monitoring the same conveyor belt: This allows you to reacquire the position of every object on the conveyor belt after they have traveled for some distance in the moving system.

For each camera-conveyor couple, you normally have a tracking system and thus a linked FB_TargetsHandler instance.

A target traveling from a tracking system to the next on the same physical conveyor needs to be created in the linked FB_TargetsHandler preserving the information already stored in the targets handler linked to the previous tracking system.

It cannot be re-created in the next targets handler list for the following reasons:

  • Every target contains a unique identifier and creating a new target linked to the same object would make such identifier equivocal.

  • The target could have been already affected by the system: for example, a specific robot owner could already be assigned to the target by a balancing policy; just creating a new target at the updated position would cause a loss of such information.

  • If a target is a place position that already contains a product, creating a new instance of this place target could cause a loss of the information that the target has already been processed.

The AddTargetFromTarget method allows you to create a target by copying the information, including the unique identifier, from an existing target and providing a new Cartesian pose for the object.

It is instead normally possible to call the method SetTargetPosition when there is the need to update the position of a target within the same instance of FB_TargetsHandler, as it could happen due to multiple acquisitions of the position of an object by a camera.