Johannes Kuehn and Sami Haddadin, from Hannover's Leibniz University, are hard at work creating an artificial nervous system which could be used to make robots experience 'painful' sensations.
The idea is to allow the machines to detect things around them that could cause them damage.
For example, if a robotic arm got jammed in a piece of machinery, the 'painful' sensation may make it try to remove itself, in the same way a human would instictively pull their hand away from a sharp object.
As Johannes Kuehn, one of the researchers on the project, told IEEE Spectrum: "Pain is a system that protects us. When we evade from the source of pain, it helps us not get hurt."
This mechanism can also be applied to robots, even if they might not feel pain in the same way we do.
While their project could potentially protect robots from damage, it might help keep their human colleagues safer as well.
In the future, a growing number of robots may be working side-by-side with humans, and by teaching them to avoid painful collisions or accidents, the chances of a human worker getting hit on the head by a giant robot arm might be reduced.
In tests, the researchers equipped a robot arm with a small fingertip sensor, covered with artificial tissue which mimics the structure of human skin.
The sensor transmits 'pain' sensations when it detects hard pressure or high temperature, and can even classify different inputs as 'mild', 'medium' or 'severe' pain.
If the sensor is squeezed or pressed, the arm leaps out of the way, just like a human would if someone applied too much pressure to a fingertip.
It's early days for the technology, but it may become essential as robots become a bigger part of our lives.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies