Hi All,
I would like to know if it is possible to obtain the outputs of the IMUplacer (e.g. heading correction) in matlab. I am using OpenSim 4.3 via the matlab API on a mac. When a colleague runs the exact same matlab scripts to run the IMUplacer the outputs are printed to the matlab command window. However, they are not when I try it on my mac. The IMUplacer does work since I am able to use the calibrated model generated via the IMUplacer tool in the opensim GUI.
Thanks!
Kind regards,
Erik
obtaining imuplacer outputs via matlab API
- Erik Wilmes
- Posts: 3
- Joined: Fri Mar 12, 2021 2:21 am
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
Re: obtaining imuplacer outputs via matlab API
Hello,
You can use the logging functionality introduced in version 4.2 and described below to customize/direct messages on all platforms:
https://simtk-confluence.stanford.edu/d ... gginglevel
Hope this helps,
-Ayman
You can use the logging functionality introduced in version 4.2 and described below to customize/direct messages on all platforms:
https://simtk-confluence.stanford.edu/d ... gginglevel
Hope this helps,
-Ayman
- Erik Wilmes
- Posts: 3
- Joined: Fri Mar 12, 2021 2:21 am
Re: obtaining imuplacer outputs via matlab API
Hi Ayman,
Thanks for the quick reply. Unfortunately this did not work. I got the following error when running the following code:
clear all; close all; clc;
import org.opensim.modeling.*
Logger.setLevel("Info");
Error:
No method 'org.opensim.modeling.Logger.setLevel' with matching signature found.
Error in calibrateOpenSimModelIMUs (line 22)
Logger.setLevel("Info");
Kind regards,
Erik
Thanks for the quick reply. Unfortunately this did not work. I got the following error when running the following code:
clear all; close all; clc;
import org.opensim.modeling.*
Logger.setLevel("Info");
Error:
No method 'org.opensim.modeling.Logger.setLevel' with matching signature found.
Error in calibrateOpenSimModelIMUs (line 22)
Logger.setLevel("Info");
Kind regards,
Erik
- Thomas Uchida
- Posts: 1794
- Joined: Wed May 16, 2012 11:40 am
Re: obtaining imuplacer outputs via matlab API
Please see the API documentation for the "Logger" class here: https://simtk.org/api_docs/opensim/api_ ... ogger.html. The argument to the setLevel() method is of type "Level" which is an enum (not a string). It looks like Level::Info is mapped to 2 (see the "enum Level" entry under "Public Types"), so the Matlab equivalent should be Logger.setLevel(2).
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
Re: obtaining imuplacer outputs via matlab API
Thanks Tom,
I'd also add that there's a setLevelString method that takes a "String" input directly.
Best regards,
-Ayman
I'd also add that there's a setLevelString method that takes a "String" input directly.
Best regards,
-Ayman
- Erik Wilmes
- Posts: 3
- Joined: Fri Mar 12, 2021 2:21 am
Re: obtaining imuplacer outputs via matlab API
Thanks! This worked