Page 1 of 1

Ground reaction Force

Posted: Mon Oct 02, 2023 12:52 am
by amini_opensim
Hi

I want to know if how to get ground reaction force in script controller. I did the following code:

body = model:find_body("toes_r")
GRF = body:contact_force()

but there is no GRF for only toes_r (without ground or platform mentioning), then the answer is zero. So how can I get the ground reaction force for right and left leg?

Thanks in advance

Re: Ground reaction Force

Posted: Fri Oct 06, 2023 2:27 am
by tgeijten
Did you try the body "calcn_r"?

Re: Ground reaction Force

Posted: Sat Oct 07, 2023 12:57 am
by amini_opensim
Hi

I did it. No effective. I use this code to get the result of GRF:

function store_data(frame)
frame:set_value("GRF",GRF)
end

Is it true?

Re: Ground reaction Force

Posted: Thu Oct 12, 2023 3:16 am
by amini_opensim
Hi Thomas

I changed the name of body to calcn_r but ground reaction force is still zero, while it isn't.

body = model:find_body("calcn_r")
GRF = body:contact_force()

Could you pls guide me how to get ground reaction force?

best