Robots are moving off the assembly line.

Collaborative robots that work alongside humans—“cobots”—are getting cheaper and easier to program. That is encouraging businesses to put them to work at new tasks in bars, restaurants and clinics.

In the Netherlands, a cobot scales a 26-foot-high bar to tap bottles of homemade gin, whiskey and limoncello...