My DS did listen when he was two...for the most part

. He was (still is) very verbal & I always expected him to understand me. Although, for directives/rules I simplified things: "Gentle touch for the kitties". I think what worked was just repetition, repetition, repetition...and repetition. He's a super persistant, intense, strong willed child & I needed to out persist him. Other things that helped were singing the direction ("Shoes on, shoes on") & gently, but physically, guiding him while doing so. Also, saying the directive in the positive (Gentle touch) rather than negative (Don't hit).
For important things, like stopping at the street, holding hands, etc., we would practice over & over again. This was actually fun for my DS. He would walk a little bit, I would call out "stop!", he would stop in an exagerated way. Big smile. But it actually translated beautifully into the real world. We still do this when issues come up.
We did do a kind of consequence for throwing hard things...which feels like a safety issue to me (I find myself drawing a harder line about safety issues then other things). When he threw his blocks I would say:"we don't throw blocks, all done" & put the block up high, then hand him a soft ball, and say "you may throw the ball". He wasn't always happy with the substitution, but I would stay super calm & consistent about the whole thing, & the throwing blocks stage ended pretty quickly. I don't know if this is considered punitive or not, probably isn't a natural consequence, but it's what I felt right about...
I'm thinking about the word "obediance". I think that when I say "listen", I don't just mean that DS would obey. I mean that he would stop, hear me & generally do as I asked. When he didn't do as I asked, he would talk to me about it (even if just saying "no"). For me, I thinks it's more about DS understanding expectations & me listening to his needs (spoken or otherwise) and desires--and finding the balance between. As he gets older, this means less direction & more discussion. But I need to know that he understands (and obeys!) rules about safety (mostly just streets and other people's bodies). Since he does understand those rules (not just obey them), I can trust that he'll be safe, & feel good about him exploring the world more and more independently.
Sorry, this was much longer than I thought it would be... Hope it's helpful.