Re: Estimation of passive joint torques
Posted: Fri Nov 20, 2020 1:14 am
Hi Thomas,
Thanks for your answer.
As you can see in my previous post (the 7th of this topic), I did use setMinimumActivation().
Nevertheless, by comparing with your code, I did not use realizeVelocity (Could you explain to me why you add this line?). So, I added this line too.
My code is now :
But, I am still not able to set my activation to zero.
What can you suggest me? Do you see any mistake in my code?
Thanks in advance,
Regards
Thanks for your answer.
As you can see in my previous post (the 7th of this topic), I did use setMinimumActivation().
Nevertheless, by comparing with your code, I did not use realizeVelocity (Could you explain to me why you add this line?). So, I added this line too.
My code is now :
Code: Select all
for t=1:num_timepoints
%Update state
for i=0:num_coordinates-1
model.updCoordinateSet().get(i).setValue(state,Data(t,i+1),false);
end
clear i
model.assemble(state)
% Set activation of the muscles to zero
for i=0:num_muscles-1
MuscMill=Millard2012EquilibriumMuscle.safeDownCast(muscle_set.get(i));
MuscMill.setMinimumActivation(0);
MinimumActivation(i+1)=MuscMill.getMinimumActivation(); %Print 0 for all the muscles
MuscMill.setActivation(state,0);
model.realizeVelocity(state);
Activation(i+1)=MuscMill.getActivation(state); %Print 0.01 for all the muscles
end
end
What can you suggest me? Do you see any mistake in my code?
Thanks in advance,
Regards