This caterpillar has an interesting profile. I’ve seen caterpillars with enlarged thoracic segments, but I don’t recall ever seeing a geometrid like this. I assume this is a geometrid because it only has two pairs of prolegs.
I was just about to publish this and I decided to look through my copy of Caterpillars of Eastern North America to see if I saw anything similar in the section on geometrids. This is not unlike the caterpillar of the Tulip-tree Beauty (Epimecis hortaria). I’ve never actually seen one of those, even though I often see the adults. Wagner says the odd proportions are distinctive for that species for North America. Perhaps this is a Brazilian species in that genus.