-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MS0201: implement load motion #11
Comments
I saw you already updated the code. How is the progress so far? did you figure out how to animate the 3D view based on the motion file? |
hi! @idhamari |
Well done 🍉 I think this is the difficult part, to understand how OpenSim treats the geometry and present them in the 3D widget, you may get crazy-looking animation based on the configuration as a small error in the transformation makes everything goes wrong. I suggest you check the example I provided as it uses only OpenSim without the java interface (you get a direct connection between the visualizer and opensim). Please notice that the animation in the simulation is similar, the only difference is these states are generated online. |
I had the same thing when I worked with this before (the problem was the angles unit). Try to trace frame 0 and frame 1 and check what is wrong. Check how somebody visualizer handles the information. Probably there are transformations happen within the simbody visualizer code. I am not sure if we need this but probably we may a need a transformation class from opensim to vtk. It should transform everything from opensim world to vtk world. Please note:
If you like, we can arrange an online meeting this week. |
This looks great. Thanks for the excellent job 🍉
For now, only the motion toolbar functions are needed. You may ignore the popup menu.
I will test this in my workstation with 32GB memory and RTX2080Ti GPU and report. Please let me know if the updated code is already in your branch. Please check if the problem from vtk, qt, the images in the widget, or size of the stl:
This week is already booked. What about next week on Tuesday at 11:00 or 17:00 German time? |
Update: I just checked the code. The performance seems to be OK and the motion looks normal. Please implement the toolbar and close this issue. Note: I have only a problem interacting with the widget before loading the model or the motion (this problem wan not there before). When moving the mouse it acts as drag (e.g. click and move) which makes the objects rotate with the mouse movement. I suspect this is a Linux-Qt problem as I have this before with other programs so you may ignore this problem for now until I check this in my windows. |
@idhamari another update, i just pushed an optimized code for motion exemple now it moves kind of smoothly even though it is not on a RTX2080Ti 🥇 i will optimise more whenever possible ,i'm switching now to the tool bar. |
@yasseerr well done! by the way, in my previous comment, I tested the code on my laptop not on a workstation. The performance was good. I will check your updated code soon and provide feedback if needed. |
hello @idhamari the motion tools are implemented give them a check to see if something is missing . currently i'm merging the simulation with the master. |
Well done 🍉 With the current knowledge from the motion, handling the simulation task should be much simpler. You can check the same pendulum example and see how the visualizer work during the simulation process. In the simulation process, opensim computes the states online then sends them to the visualizer to animate the model, when the simulation completed, opensim load the motion to the navigator so the user can save it to a file if needed. |
Two more todos here:
Model: Pipelines/Gait2354_Simbody/OutputReference/subject01_simbody.osim |
Update: |
well done!
it is OK for now, we will have a good idea after the implementation of simulation. Please proceed to the next task in this milestone. |
thanks! just a note i found out that when i recreate the vtk actors each frame instead of just changing the coordinates ,rotaion and display properties the problem go away . It is done like that in netbeans but it causes a huge lack of performance when implemented in vtk. so that muscle is a performance optimization issue, and i will try and find how to mix the two solutions to avoid the muscle being rendered. after finishing the Simulation. |
I already created a new issue to handle this. Please keep the related discussion there. I will copy your feedback to the new issue. For now please concentrate on the simulation task as it is the final task in this milestone (other tasks will be handled by the other students). |
Example in
note that later, we will do the simulation in a somehow similar way.
The text was updated successfully, but these errors were encountered: