Article 158 — theft. Taking property secretly: the owner and everyone else is unaware, or the accused reasonably believes they are. Even where someone did see, if the accused believed they were unobserved, it remains theft.
Article 161 — robbery. Taking property openly, in the presence of someone who understands what is happening. Part 2 adds violence that is not dangerous to life or health — a shove, a grip, holding someone back.
Article 162 — armed or violent robbery. An attack for the purpose of taking property, with violence dangerous to life or health, or the threat of such violence. This one is complete at the moment of the attack — whether anything was actually taken does not matter.
The boundaries are argued in every contested case. Whether the accused realised they had been seen decides between 158 and 161. Whether a threat was capable of being understood as life-threatening decides between 161 and 162, and that single question is worth years.