Infrared and optical observations of Herbig--Haro objects