Index Out Of Bounds when motion load into GUI
Posted: Tue Dec 17, 2019 10:02 am
Hi,
I use Matlab to create a motion with the IK tool.
The input TRC-file is written in matlab, too (no motion capturing).
I could successfully implement the IK tool in matlab, it runs trough without throwing any error.
I do this for 6 different combinations ( 3 differently scaled models with 2 movement types each).
However, if I load the calculated motion (= *.mot-file) into the GUI with the same model which I used for the IK tool run in matlab, sometimes it throws me an error.
The procedure is the following:
- I load my model into the GUI
- I load the motion
- I get the Index Out Of Bounds error (attached below)
(Sometimes directly after loading the motion, sometimes after some frames have been played.)
Interestingly, the error is changing and appears not always within the same model / movement type.
I searched the forum and found the following post from Erica:
viewtopicPhpbb.php?f=91&t=7326&p=19260&start=0&view=
If I understood here correctly, I should not have a first line = "header" of the .mot-file with more than 16 letters (which is "Coordinates" by standard when the motion is created via matlabs IK tool).
Therefore I don't adapt the final motion-file anymore (besides renaming the name of the file itself).
I am wondering if there are any additional restrictions to the mot-file that I should respect?
Although I don't adapt the final mot-file anymore, I get the index-out-of-bounds error, but only sometimes.
Since I am using the same TRC file for each model (only hand movement is described in there), I am supposing that this shouldn't be the reason (especially since IK tool runs trough).
I already now the documentation on mot-files
https://simtk-confluence.stanford.edu:8 ... t%29+Files
and that's exactly how the mot-file is generated by the IK-tool, I checked it.
Do you have any hints?
Thanks for your help,
Ruth
java.lang.IndexOutOfBoundsException: Index: 101, Size: 60
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at org.opensim.threejs.ModelVisualizationJson.updatePathWithWrapping(ModelVisualizationJson.java:1455)
at org.opensim.threejs.ModelVisualizationJson.appendToFrame(ModelVisualizationJson.java:781)
at org.opensim.threejs.ModelVisualizationJson.createFrameMessageJson(ModelVisualizationJson.java:703)
at org.opensim.view.pub.ViewDB.updateModelDisplayNoRepaint(ViewDB.java:863)
at org.opensim.view.motions.MasterMotionModel.doUpdateAndRepaint(MasterMotionModel.java:82)
at org.opensim.view.motions.MasterMotionModel.applyTime(MasterMotionModel.java:98)
at org.opensim.view.motions.MasterMotionModel.setTime(MasterMotionModel.java:287)
at org.opensim.view.motions.MasterMotionModel.advanceTime(MasterMotionModel.java:300)
at org.opensim.view.motions.MotionControlJPanel$RealTimePlayActionListener.actionPerformed(MotionControlJPanel.java:100)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
I use Matlab to create a motion with the IK tool.
The input TRC-file is written in matlab, too (no motion capturing).
I could successfully implement the IK tool in matlab, it runs trough without throwing any error.
I do this for 6 different combinations ( 3 differently scaled models with 2 movement types each).
However, if I load the calculated motion (= *.mot-file) into the GUI with the same model which I used for the IK tool run in matlab, sometimes it throws me an error.
The procedure is the following:
- I load my model into the GUI
- I load the motion
- I get the Index Out Of Bounds error (attached below)
(Sometimes directly after loading the motion, sometimes after some frames have been played.)
Interestingly, the error is changing and appears not always within the same model / movement type.
I searched the forum and found the following post from Erica:
viewtopicPhpbb.php?f=91&t=7326&p=19260&start=0&view=
If I understood here correctly, I should not have a first line = "header" of the .mot-file with more than 16 letters (which is "Coordinates" by standard when the motion is created via matlabs IK tool).
Therefore I don't adapt the final motion-file anymore (besides renaming the name of the file itself).
I am wondering if there are any additional restrictions to the mot-file that I should respect?
Although I don't adapt the final mot-file anymore, I get the index-out-of-bounds error, but only sometimes.
Since I am using the same TRC file for each model (only hand movement is described in there), I am supposing that this shouldn't be the reason (especially since IK tool runs trough).
I already now the documentation on mot-files
https://simtk-confluence.stanford.edu:8 ... t%29+Files
and that's exactly how the mot-file is generated by the IK-tool, I checked it.
Do you have any hints?
Thanks for your help,
Ruth
java.lang.IndexOutOfBoundsException: Index: 101, Size: 60
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at org.opensim.threejs.ModelVisualizationJson.updatePathWithWrapping(ModelVisualizationJson.java:1455)
at org.opensim.threejs.ModelVisualizationJson.appendToFrame(ModelVisualizationJson.java:781)
at org.opensim.threejs.ModelVisualizationJson.createFrameMessageJson(ModelVisualizationJson.java:703)
at org.opensim.view.pub.ViewDB.updateModelDisplayNoRepaint(ViewDB.java:863)
at org.opensim.view.motions.MasterMotionModel.doUpdateAndRepaint(MasterMotionModel.java:82)
at org.opensim.view.motions.MasterMotionModel.applyTime(MasterMotionModel.java:98)
at org.opensim.view.motions.MasterMotionModel.setTime(MasterMotionModel.java:287)
at org.opensim.view.motions.MasterMotionModel.advanceTime(MasterMotionModel.java:300)
at org.opensim.view.motions.MotionControlJPanel$RealTimePlayActionListener.actionPerformed(MotionControlJPanel.java:100)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)