imo robots on the battlefield would be effective in certain roles - you kind of have to think of them the same way you'd think of how a helicopter would be effective - in certain scenarios, it outperforms everything else (in the case of helicopters, ATGM/fire support on open field, extended reconnaissance although they're slowly being beaten out by drones, logistics and transport), but only in those certain scenarios, which pretty much can be said for anything on the battlefield. If you were to have a squad-level mech that wasn't insanely tall(let's say, around nine feet tall) that was used as a mobile weapons platform to support infantry(HMG/AGL/AT or even light mortar/rocket artillery, potentially) akin to light vehicle support like a Humvee, it'd probably be pretty effective because of the ability to move faster than tripod emplacements, especially in urban scenarios. Atlas and BigDog are both meant for logistical purposes, so it's not much of a stretch to say that you could see heavier versions of those platforms providing logistical support in the field.
The giant mechs you see on TV, however, are totally impractical.