methods with JointReaction

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Hide Kimpara
Posts: 135
Joined: Mon Sep 19, 2016 5:12 am

methods with JointReaction

Post by Hide Kimpara » Mon Nov 05, 2018 11:01 am

Hello,

I'm still using JointReaction in C++.

In the manual, this class has setupStorage() method. I thought this would enable storage of recorded joint reaction data. But I tried to find it in OpenSim 4.0 (OpenSim 4.0-2018-08-27-ae111a49), Visual C++ did not indicate this method.
https://simtk.org/api_docs/opensim/api_ ... ction.html

The newer revision than Aug 27 has setupStorage()?

Best,
Hide

Tags:

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: methods with JointReaction

Post by Christopher Dembia » Mon Nov 05, 2018 11:21 am

In 4.0, we advise that you use outputs instead of the JointReaction analysis. All joints have outputs for reaction forces. Refer to the README example to learn how to use outputs.

User avatar
Hide Kimpara
Posts: 135
Joined: Mon Sep 19, 2016 5:12 am

Re: methods with JointReaction

Post by Hide Kimpara » Mon Nov 05, 2018 2:07 pm

Hello Chris,

Thank you for prompt response.
I think it is almost same point at previous talk.
viewtopicPhpbb.php?f=91&t=8469

But this time, I'd like to solve this.

For example, I tried to write an example as following:

Code: Select all

		SimTK::State& si = osimModel.initSystem();
		osimModel.realizeAcceleration(si);

		TableReporterVec3 *t_Rep = new TableReporterVec3();
		t_Rep->set_report_time_interval(0.01);

		const auto& Joint1 = osimModel.getJointSet().get(3);
		const auto& Joint1Parent = Joint1.getOutput("reaction_on_parent");

		std::cout << "J 1 String: " << Joint1Parent.getValueAsString(si) << std::endl;
Then I could see joint reaction forces as string. But because "Joint1Parent" contains SpatialVector variable, I could not add to Report as "t_Rep->addToReport(Joint1Parent);". Probably, I need to break SpatialVec to two Vec3 variables and register them to TableReporter.

Also, at previous conversation, TableReporterSpatialVec was implemented in 4.0.

Could you let me know what would become the solution?

Best,
Hide

POST REPLY