lsw9021 / MASS

Apache License 2.0
584 stars 109 forks source link

Error compiling the renderer #1

Closed efelem closed 5 years ago

efelem commented 5 years ago

Hello,

Thank you for sharing the project. Very impressed by your results.

Could you help us setting up the code ?

I followed the instruction 1) Installed boost 1.66 2) Installed python dependencies 3) Installed dart (the ubuntu package from here:https://launchpad.net/~dartsim/+archive/ubuntu/ppa, version 6.8.4

After cloning the code and running cmake ../, the compilation goes well until 91%

Here is the end of the output :

[ 50%] Built target mss
[ 58%] Building CXX object render/CMakeFiles/render.dir/Window.cpp.o
[ 83%] Built target pymss
[ 91%] Building CXX object render/CMakeFiles/render.dir/main.cpp.o
In file included from /home/efx/Development/PHD/AiriNew/MASS/render/main.cpp:1:0:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.h:16:1: error: expected class-name before ‘{’ token
 {
 ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.h:22:7: error: ‘void MASS::Window::draw()’ marked ‘override’, but does not override
  void draw() override;
       ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.h:23:7: error: ‘void MASS::Window::keyboard(unsigned char, int, int)’ marked ‘override’, but does not override
  void keyboard(unsigned char _key, int _x, int _y) override;
       ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.h:24:7: error: ‘void MASS::Window::displayTimer(int)’ marked ‘override’, but does not override
  void displayTimer(int _val) override;
       ^
/home/efx/Development/PHD/AiriNew/MASS/render/main.cpp: In function ‘int main(int, char**)’:
/home/efx/Development/PHD/AiriNew/MASS/render/main.cpp:45:10: error: ‘class MASS::Window’ has no member named ‘initWindow’
  window->initWindow(1920,1080,"gui");
          ^
In file included from /home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:1:0:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.h:16:1: error: expected class-name before ‘{’ token
 {
 ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.h:22:7: error: ‘void MASS::Window::draw()’ marked ‘override’, but does not override
  void draw() override;
       ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.h:23:7: error: ‘void MASS::Window::keyboard(unsigned char, int, int)’ marked ‘override’, but does not override
  void keyboard(unsigned char _key, int _x, int _y) override;
       ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.h:24:7: error: ‘void MASS::Window::displayTimer(int)’ marked ‘override’, but does not override
  void displayTimer(int _val) override;
       ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp: In constructor ‘MASS::Window::Window(MASS::Environment*)’:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:17:2: error: ‘mBackground’ was not declared in this scope
  mBackground[0] = 1.0;
  ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:22:2: error: ‘mZoom’ was not declared in this scope
  mZoom = 0.25; 
  ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp: In member function ‘void MASS::Window::keyboard(unsigned char, int, int)’:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:116:3: error: ‘Win3D’ has not been declared
   Win3D::keyboard(_key,_x,_y);break;
   ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp: In member function ‘void MASS::Window::displayTimer(int)’:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:127:16: error: ‘mDisplayTimeout’ was not declared in this scope
  glutTimerFunc(mDisplayTimeout, refreshTimer, _val);
                ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:127:33: error: ‘refreshTimer’ was not declared in this scope
  glutTimerFunc(mDisplayTimeout, refreshTimer, _val);
                                 ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp: In member function ‘void MASS::Window::SetFocusing()’:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:170:3: error: ‘mTrans’ was not declared in this scope
   mTrans = -mEnv->GetWorld()->getSkeleton("Human")->getRootBodyNode()->getCOM();
   ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp: In member function ‘void MASS::Window::DrawBodyNode(const dart::dynamics::BodyNode*)’:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:273:6: error: ‘mRI’ was not declared in this scope
  if(!mRI)
      ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:276:2: error: ‘mRI’ was not declared in this scope
  mRI->pushMatrix();
  ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp: In member function ‘void MASS::Window::DrawShapeFrame(const dart::dynamics::ShapeFrame*)’:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:302:6: error: ‘mRI’ was not declared in this scope
  if(!mRI)
      ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:310:2: error: ‘mRI’ was not declared in this scope
  mRI->pushMatrix();
  ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp: In member function ‘void MASS::Window::DrawShape(const dart::dynamics::Shape*, const Vector4d&)’:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:322:6: error: ‘mRI’ was not declared in this scope
  if(!mRI)
      ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:328:2: error: ‘mRI’ was not declared in this scope
  mRI->setPenColor(color);
  ^
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp: In member function ‘void MASS::Window::DrawMuscles(const std::vector<MASS::Muscle*>&)’:
/home/efx/Development/PHD/AiriNew/MASS/render/Window.cpp:381:3: error: ‘mRI’ was not declared in this scope
   mRI->setPenColor(color);
   ^
^Crender/CMakeFiles/render.dir/build.make:75: recipe for target 'render/CMakeFiles/render.dir/main.cpp.o' failed
make[2]: *** [render/CMakeFiles/render.dir/main.cpp.o] Interrupt
render/CMakeFiles/render.dir/build.make:62: recipe for target 'render/CMakeFiles/render.dir/Window.cpp.o' failed
make[2]: *** [render/CMakeFiles/render.dir/Window.cpp.o] Interrupt
CMakeFiles/Makefile2:145: recipe for target 'render/CMakeFiles/render.dir/all' failed
make[1]: *** [render/CMakeFiles/render.dir/all] Interrupt
Makefile:83: recipe for target 'all' failed
make: *** [all] Interrupt

Many thanks in advance for the help !

efelem commented 5 years ago

The code does not work with dartsim > 6.6

Would need to change dart/gui/Win3D.hpp to dart/gui/glut/Win3D.hpp

koonyook commented 5 years ago

To be specific, on line 15 of Window.h change from class Window : public dart::gui::Win3D to class Window : public dart::gui::glut::Win3D