ia-dev / opensimQt

CPP GUI for OpenSim
Apache License 2.0
5 stars 6 forks source link

MS0400_T01 Building the required tools #23

Closed idhamari closed 4 years ago

idhamari commented 4 years ago

This should not take longer than one week, the deadline is 27/7/2020

In this task, you prepare your environment for development by building, installing (note it is strongly recommended you use the same versions):

After the build test if everything works by loading some models and running some simulations

If you have a problem please post here and we will try to help. When you complete the build we will have an online meeting to check that everything is ok.

riteshsv commented 4 years ago

would it be ok to install higher versions ?

idhamari commented 4 years ago

I have Ubuntu 18.04 and that what works for me. You can try something else but It may not work. If you like we can have an online skype to do this together on Tuesday or Wednesday.

idhamari commented 4 years ago

Here are some tips:

idhamari commented 4 years ago

@riteshsv how is the progress so far? do you need help?

riteshsv commented 4 years ago

I worked till late night yesterday. I was able to run OpenSim java. Today I will complete the installation of openSim Qt along the vtk.

On Thu, Jul 23, 2020 at 10:28 PM idhamari notifications@github.com wrote:

@riteshsv https://github.com/riteshsv how is the progress so far? do you need help?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/VisSimKoblenz/opensimQt/issues/23#issuecomment-663119416, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQWDLP47WMKMMUMHZB4UDDR5BT3VANCNFSM4O33VF7Q .

idhamari commented 4 years ago

@riteshsv Excellent job :watermelon: please let me know when you complete so we can do the testing together and close this issue.

riteshsv commented 4 years ago

I was having OpenGL version issues while running openSimQt. My vtk build was messed up. Building vtk again and then check.

idhamari commented 4 years ago

I think the recent VTK versions required recent OpenGL which probably dependant on the graphics card.

riteshsv commented 4 years ago

I found the issue. It is because QVTKOpenGLNativeWidget extends QOpenGLWidget. QOpenGLWidget wants to create the OpenGL context and manage windows for which it uses QSurfaceFormat. I found in the documentation of QVTKOpenGLNativeWidget. Typical usage is: // before initializing QApplication, set the default surface format. QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());

so currently i have modifed the code like this: `int main(int argc, char *argv[]) {

ifdef __APPLE__

QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());                              //To create appropria window and OpenGL context.

endif`

And it has worked well. Below is the extract from documentation:

@class QVTKOpenGLNativeWidget

idhamari commented 4 years ago

Well done :watermelon: shall we close this issue?

riteshsv commented 4 years ago

The Geometry is not loading and I tried to set OPENSIM_HOME to opensim-gui/opensim-models as it will documented in Geometry.cpp and also i tried to add it to the PATH.

riteshsv commented 4 years ago

I have installed pythonQt also

riteshsv commented 4 years ago

I am closing the issue.

idhamari commented 4 years ago

@riteshsv

The Geometry is not loading and I tried to set OPENSIM_HOME to opensim-gui/opensim-models as it will documented in Geometry.cpp and also i tried to add it to the PATH.

We are using a modified version of the visualizer interface from somebody in opensimQt so the path should be defined the same way. For now you can add the path manually here then rebuild. This should be simpler when we implement the preferences menu.

We will also try to automate the build using scripts for Windows, Linux and Mac.