You're thinking of "obligatory" and "compulsory".
In some cases, you can use either one. Of course, "compulsory" means you have no other option. "Obligatory" is closer to "you really, really should". It's a rule of law.
As the other members have explained, "obligate" has a somewhat different sense.