Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
-
Ali Baradaran
- Posts: 3
- Joined: Tue Nov 16, 2021 11:02 am
Post
by Ali Baradaran » Wed Dec 08, 2021 11:22 am
I deliberately chose "online" in the title, as I do not need real time calculations and rtosim library. Instead, I would like to use track() method of InverseKinematicsSolver to track an orientation stream. The data is streamed through serial port. My project is similar to OpenSenseRT. However, I am using visual studio c++ on windows. Therefore, I am not using raspberry pi or python. In line 150 of file "ik_streaming.py" in OpenSenseRT project, there is a piece of code which updates the solver with the new IMU readings:
Code: Select all
ikSolver.addOrientationValuesToTrack(time_s+dt, rowVec)
I am looking for a similar method to update the orientations in c++. However, as far as I understand, you get to feed all the orientations (OrientationsReference) only once you instantiate the inverse kinematic solver. In other words, the solver works offline. Please correct me if I am wrong. Else, is there a way to add new orientations data to the solver, on the go?
-
Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Post
by Ayman Habib » Wed Dec 08, 2021 6:16 pm
Hi Ali,
While you provide a Reference to the solver at the time of construction (to do the book-keeping, specify ordering, name-mapping etc.), the method you mentioned allows for appending Rows of data to the Reference so that it can run live/on-line. That's the mechanism utilized by OpenSenseRT. This was not the case in earlier versions of OpenSim which made an internal copy of the reference so it could not operate online.
Hope this explains,
-Ayman
-
Ali Baradaran
- Posts: 3
- Joined: Tue Nov 16, 2021 11:02 am
Post
by Ali Baradaran » Thu Dec 09, 2021 4:02 am
Dear Prof. Habib,
Thank you very much for your reply. I am using the latest version of opensim for windows (opensim 4.3, Aug. 2021). However, the InverseKinematicsSolver class does not have method addOrientationValuesToTrack(). Does this mean this method is exclusively available for OpenSenseRT?
Best regards,
Ali