Yes, "rób" is imperative and therefore it translates simply to "do". Just like "Do it" is imperative.
"Better not to do this" means "It is inadvisable to do this", right? So it's "Lepiej tego nie robić".
You can easily imagine that there's nothing wrong about 'this' generally, but 'you' shouldn't do it. So in this sentence it's really too much.
Would tend to agree, for the male voice at least. Compare with https://translate.google.com/#view=home&op=translate&sl=auto&tl=en&text=Lepiej (and click the speaker button)