JohnDTill / ContinuumRobotExamples

An incremental guide to continuum robot mathematical modeling and numerical implementation. The examples are divided into chapters within the folder structure, and each chapter contains a PDF and code examples.
MIT License
148 stars 47 forks source link

Frictional model for tendon driven continuum robot #7

Closed SolomonPekris closed 3 years ago

SolomonPekris commented 3 years ago

Hi John,

I'm working on a project involving a tendon driven continuum robot. I would like to implement your frictional model from you paper "Real-time dynamics of soft and continuum robots based on Cosserat rod models", section 5.2.1 and was hoping you could help.

Do you simply sum solutions for each of the tendons for f_f,i and l_f,i, and and then subtract them from f_c and l_c respectively? I'm also not sure about how to calculate v_i. An example would be useful if you have one, preferably in MATLAB. Thanks in advance.

Kind regards, Solomon

JohnDTill commented 3 years ago

Hello Solomon,

You calculate v_i by integrating s_i(s) along the arclength as a state variable, and then taking the partial derivative of si with respect to time. Since you already calculate ||p{s,i}||, integrating that to find s_i isn't much trouble (although there are additional considerations with tendon compliance). You are correct that in the case of the simple model, you merely sum the effects of the distributed loading to be included in the linear system solving for v_s and u_s. I've uploaded two new examples showing possible ways to model friction. They are in C++ since I don't have a MATLAB license at this point. Let me know if you have any questions and I'll do my best to answer. Good luck on your research!

Sincerely, John

SolomonPekris commented 3 years ago

Hi John,

Thank you very much for the help, and sorry for the slow response, my lab opened after being shut due to covid so I had to put this on hold while collecting data from our robot. I managed to get it working although I couldn't think of a way to verify it other than saying that the results look right.

I had one more question if you don't mind. The plan is to also implement our program into C++, roughly what kind of performance increases did you observe for this kind of model? I have been working under the (very rough) assumption that it will be about 10x faster.

Kind regards, Solomon

JohnDTill commented 3 years ago

No worries, research often happens in bursts! The speedup depends on the method you're using. If it's based on solving a large matrix system, you might not get too much speedup since that's MATLAB's strength. If it's based on a lot of control flow with smaller matrix calculations, I would expect a 100-1000x speedup from switching to C++. That was our experience with the PCR robot. It makes a big difference to have compiled code instead of using the MATLAB interpreter, plus there are people who dedicate their careers to improving the C++ compiler code optimizations.

Sincerely, John

SolomonPekris commented 3 years ago

That's what I was had thought in terms of the speed increase from what I'd read online, although I have no experience with C++ myself so confirmation is nice. Thanks for the detailed responses!

Kind regards, Solomon