Infantile/toddler masturbation/grinding

Infantile masturbation or genital grinding. has anyone had this habit of humping on toys, furniture or things as a child or has anyone noticed their toddler/chiLd in this habit? Specially if the child has autism and lacks understanding. How to deal it?