Retaining blob tracking X & Y values after blob disappears

RPLiDAR-DiscordEdit-Jan20.3.toe (21.8 KB)

I’m running into a bit of an issue getting blob tracking data to persist after a blob disappears. I’m hoping to retain the X, Y, & Active values from the last blob tracked in Row 1 of the Blob Track DAT. In a situation where all there are no blobs present, I would want to retain the last set of values from row 1 until a new blob appeared.

In the attached .toe I’m gathering RPLiDAR data from a Slamtec A1M8, sending it through an instancing network, then running blob tracking on it, before shipping the CHOP data off to another .toe that’s handling the projected visuals. Currently all the logic after the blob tracking DAT is created in CHOPs, I’m guessing that DAT logic might be the solution here, but haven’t been able to figure it out yet. Thanks for any advice

Hi @Brad_Emery,

the second docked DAT on the Blob Track TOP is a callback DAT with 2 functions you could use to write a blob into a custom table and remove it from it when opportune to your case.

Hope this helps
Markus

I was trying to solve the same problem and here’s what I came up with. In my case I only care about tracking 1 blob so I’m pulling blob0:u and blob0:v from the Blob Track. I’m holding onto the coordinates when the channel gets lost so I can slew back to a default value.

I’m inexperienced with DATs and Python - I don’t know how to call up a value from a specific channel so I used 2 CHOP Execute DATs instead of 1. If anyone has insight on how to clean up the logic in this network I’d be happy to hear it. I want to keep getting better at this side of things.
BlobLogic.toe (6.5 KB)

Hi @ch.hainsworth,

you can use the onBlobTrack() callback attached to the Blob Track CHOP to write out the positional data of your blob rendering the CHOP Execute DATs unnecessary:

def onBlobTrack(blobTrackTop, blobs):
	# get the first blob from the blobs list
	trackedBlob = blobs[0]
	# replace the second row in the table with the uv coordinates of the blob
	op('table1').replaceRow(1, [trackedBlob.u, trackedBlob.v])
	return

Hope this helps
cheers
Markus

2 Likes