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
methods with JointReaction
- Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: methods with JointReaction
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.
- Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
Re: methods with JointReaction
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:
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
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;
Also, at previous conversation, TableReporterSpatialVec was implemented in 4.0.
Could you let me know what would become the solution?
Best,
Hide