Simulate robot therapy on spasticity upper limb



I’m a master’s degree student and I want to do my master thesis on rehabilitation after an stroke.

I’ve thought to use OpenSim to simulate spasticity upper limb and ROS and Gazebo to simulate a robot that will help to do the rehabilitation.

I have no idea if I can do what I want to do with OpenSim and ROS.

Do you think I can do it? What do you suggest me?

Thanks a lot,


Dear Oscar,

We have a tutorial for OpenSim (see other thread Proper opensim ros muscle interface usage), but we also have a template experiment that resembles what you want to do. It is called CDP-1. You can browse the templates and filter with CDP-1 and clone one. It features a mouse, the actual robot being only the front limb, with muscles. OpenSim is powering the muscle system and the movement is controlled by a spinal cord implemented in python in transfer functions. So there is no brain running per se. But that might be a starting point for your use case.



Dear Axel,

Thanks for your answer. I think my problem will be to simulate human brain that reacts to robot rehabilitation. And, at this moment I can figure out how to do it.

Any suggestion?




I have another question. You’ve talked about the template CDP-1. I have found the CoDesign Projects page,, but I’m not sure if it is what you are talking about because there isn’t any references about the templates.

Where can I find those templates?



Dear Oscar,

I’m talking about the experiment templates in the Neurorobotics Platform software. If you installed it, or use it online, there is a tab called “Templates”, wich contains many example experiments that you may clone and customize. CDP1 is one of them (there are 2 variants actually). Clone them and you can investigate how they fit your needs. You can watch the bare experiment files when selecting your clone and clicking the “Files” button.

Best regards


Hi Óscar,

I want to ask you a question back for my curiosity….

As you want to simulate the human brain and its reaction to rehabilitation, what kind of variables do you use regarding the fact that stroke patients might need some specific rehabilitation for mobility?

Women have a higher average age (appr. 75 years for women and 68 years for men in Germany) when suffering a stroke. Also, what might an important factor for your research, women tend to have a degree of disabilities (especially regarding mobility) that is in average higher than that of men who suffered from a stroke - And so, women stay longer in rehab than men.

Can OpenSim, ROS and Gazebo be used to simulate patients with different outcomes of strokes, that will be relevant for rehab? Have you thought about considering this in your research?

Best Regards



Hi Harald,

Short answer: I don’t know.

Long answer: I thought to record patients’ brain signals and use them in my simulated “brain”. But I think it is so difficult to simulate that, especially how the brain reacts to rehabilitation. So, I don’t know how I’m going to do it (if finally I’ll do it).

Óscar Alarcón