Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Jan 24, 2019
2 parents cd2e6a4 + c5216aa commit f983e4e
Show file tree
Hide file tree
Showing 71 changed files with 1,613 additions and 3,015 deletions.
57 changes: 1 addition & 56 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1 @@
# Please don't edit this file, and use the version generated at
# http://rainboard.laas.fr/project/gepetto-viewer-corba/.gitlab-ci.yml

variables:
GIT_SUBMODULE_STRATEGY: "recursive"
CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"

cache:
paths:
- ccache

.robotpkg-gepetto-viewer-corba: &robotpkg-gepetto-viewer-corba
except:
- gh-pages
script:
- mkdir -p ccache
- cd /root/robotpkg/graphics
- git pull
- cd gepetto-viewer-corba
- make checkout MASTER_REPOSITORY="dir ${CI_PROJECT_DIR}"
- make install
- cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
- make test

robotpkg-gepetto-viewer-corba-14.04-release:
<<: *robotpkg-gepetto-viewer-corba
image: eur0c.laas.fr:5000/humanoid-path-planner/gepetto-viewer-corba/gepetto-viewer-corba:14.04

robotpkg-gepetto-viewer-corba-16.04-release:
<<: *robotpkg-gepetto-viewer-corba
image: eur0c.laas.fr:5000/humanoid-path-planner/gepetto-viewer-corba/gepetto-viewer-corba:16.04

robotpkg-gepetto-viewer-corba-18.04-release:
<<: *robotpkg-gepetto-viewer-corba
image: eur0c.laas.fr:5000/humanoid-path-planner/gepetto-viewer-corba/gepetto-viewer-corba:18.04

doc-coverage:
<<: *robotpkg-gepetto-viewer-corba
image: eur0c.laas.fr:5000/humanoid-path-planner/gepetto-viewer-corba/gepetto-viewer-corba:16.04
before_script:
- echo -e 'CXXFLAGS+= --coverage\nLDFLAGS+= --coverage\nPKG_DEFAULT_OPTIONS= debug' >> /opt/openrobots/etc/robotpkg.conf
after_script:
- cd /root/robotpkg/graphics/gepetto-viewer-corba
- cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
- make doc
- mv doc/doxygen-html ${CI_PROJECT_DIR}
- mkdir -p ${CI_PROJECT_DIR}/coverage/
- gcovr -r .
- gcovr -r . --html --html-details -o ${CI_PROJECT_DIR}/coverage/index.html
artifacts:
expire_in: 1 day
paths:
- doxygen-html/
- coverage/

include: http://rainboard.laas.fr/project/gepetto-viewer-corba/.gitlab-ci.yml
77 changes: 46 additions & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

SET(CXX_DISABLE_WERROR true)

SET(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake-modules/
${CMAKE_MODULE_PATH})

INCLUDE(cmake/base.cmake)
INCLUDE(cmake/idl.cmake)
INCLUDE(cmake/python.cmake)
Expand All @@ -32,54 +28,65 @@ INCLUDE(cmake/test.cmake)

SET(PROJECT_NAME gepetto-viewer-corba)
SET(PROJECT_DESCRIPTION "Corba server for gepetto-viewer")
SET(PROJECT_URL "")
SET(PROJECT_URL "https://github.com/Gepetto/${PROJECT_NAME}")

SET(CLIENT_ONLY FALSE CACHE BOOL "Set to true to install the client only")
SET(USE_QT4 TRUE CACHE BOOL "Use Qt4 instead of Qt5")

SET(${PROJECT_NAME}_HEADERS
include/gepetto/viewer/corba/windows-manager.hh
include/gepetto/viewer/corba/server.hh
include/gepetto/viewer/corba/client.hh
include/gepetto/viewer/corba/fwd.hh
)
SET(USE_QT4 FALSE CACHE BOOL "Use Qt4 instead of Qt5")

SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

OPTION(DISABLE_SAMPLING "Activate this option if your computer have no graphic card or a small one" OFF)
if(DISABLE_SAMPLING)
ADD_DEFINITIONS(-DDISABLE_SAMPLING)
endif()

SETUP_PROJECT ()

# {{{ C++ and Python client.
# Dependencies
ADD_REQUIRED_DEPENDENCY("omniORB4 >= 4.1.4")

SET(${PROJECT_NAME}_HEADERS
include/gepetto/viewer/corba/client.hh
)
# }}}

# {{{ C++ server.
IF(NOT CLIENT_ONLY)
# {{{ Dependencies for the server.
ADD_REQUIRED_DEPENDENCY("openscenegraph >= 3.2")
ADD_REQUIRED_DEPENDENCY("openscenegraph-osgQt")

IF(USE_QT4 OR OPENSCENEGRAPH_VERSION VERSION_LESS 3.5.7)
SET(OSGQT_LIB_NAME openscenegraph-osgQt)
ELSE(USE_QT4 OR OPENSCENEGRAPH_VERSION VERSION_LESS 3.5.7)
SET(OSGQT_LIB_NAME openscenegraph-osgQt5)
ENDIF(USE_QT4 OR OPENSCENEGRAPH_VERSION VERSION_LESS 3.5.7)

ADD_REQUIRED_DEPENDENCY(${OSGQT_LIB_NAME})
ADD_REQUIRED_DEPENDENCY("openthreads >= 2.6")
ADD_REQUIRED_DEPENDENCY("gepetto-viewer")
ADD_REQUIRED_DEPENDENCY("gepetto-viewer >= 4.3.0")
ADD_REQUIRED_DEPENDENCY("urdfdom")

SET(BOOST_COMPONENTS system thread regex)
SET(BOOST_COMPONENTS system regex)
SEARCH_FOR_BOOST ()
FINDPYTHON(2.7 EXACT)
FINDPYTHON()

SET(CMAKE_INCLUDE_CURRENT_DIR ON)
IF(USE_QT4)
FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGl QtNetwork)
SET(PKG_CONFIG_EXTRA "qtversion=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
INCLUDE(${QT_USE_FILE})
ELSE(USE_QT4)
FOREACH (component "Core" "Widgets" "Gui" "OpenGL" "Network")
FOREACH (component "Core" "Widgets" "Gui" "OpenGL" "Network" "Concurrent")
FIND_PACKAGE ("Qt5${component}" REQUIRED)
LIST(APPEND QT_INCLUDE_DIRS ${Qt5${component}_INCLUDE_DIRS})
LIST(APPEND QT_LIBRARIES ${Qt5${component}_LIBRARIES} )
ENDFOREACH (component "Core" "Widgets" "Gui" "OpenGL" "Network")
SET(PKG_CONFIG_EXTRA "qtversion=${Qt5Core_VERSION}")
ENDIF(USE_QT4)

INCLUDE_DIRECTORIES(SYSTEM ${EIGEN3_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
# }}}

# {{{ PythonQt settings
SET(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake-modules/
${CMAKE_MODULE_PATH})
# If GEPETTO_GUI_HAS_PYTHONQT is set to TRUE, then PythonQt is required.
IF(DEFINED GEPETTO_GUI_HAS_PYTHONQT AND GEPETTO_GUI_HAS_PYTHONQT)
FIND_PACKAGE(PythonQt REQUIRED COMPONENTS QtAll)
Expand All @@ -93,16 +100,19 @@ IF(NOT CLIENT_ONLY)
ELSE()
SET(GEPETTO_GUI_HAS_PYTHONQT FALSE CACHE BOOL "Use PythonQt dependency")
ENDIF()
ADD_OPTIONAL_DEPENDENCY("qgv")
# }}}

# {{{ Packaging
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})

INSTALL(FILES cmake-modules/gepetto-viewer-corba-plugin.cmake
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake/
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
SET(PKG_CONFIG_EXTRA "${PKG_CONFIG_EXTRA}\ncmake_plugin=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake/gepetto-viewer-corba-plugin.cmake")
# }}}

INCLUDE_DIRECTORIES(SYSTEM ${EIGEN3_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})

# {{{ Set list of headers
SET (${PROJECT_NAME}_HEADERS_MOC
${CMAKE_SOURCE_DIR}/include/gepetto/gui/mainwindow.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/safeapplication.hh
Expand All @@ -114,7 +124,6 @@ IF(NOT CLIENT_ONLY)
${CMAKE_SOURCE_DIR}/include/gepetto/gui/dialog/dialogloadrobot.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/dialog/dialogloadenvironment.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/dialog/pluginmanagerdialog.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/pick-handler.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/shortcut-factory.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/selection-handler.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/selection-event.hh
Expand All @@ -128,13 +137,15 @@ IF(NOT CLIENT_ONLY)
${CMAKE_SOURCE_DIR}/include/gepetto/gui/pythonwidget.hh)
ENDIF(GEPETTO_GUI_HAS_PYTHONQT)
SET (${PROJECT_NAME}_HEADERS_NO_MOC
${CMAKE_SOURCE_DIR}/include/gepetto/gui/fwd.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/meta.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/settings.hh
${CMAKE_SOURCE_DIR}/include/gepetto/viewer/corba/server.hh
${CMAKE_SOURCE_DIR}/include/gepetto/viewer/corba/fwd.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/color-map.hh
${CMAKE_BINARY_DIR}/include/gepetto/gui/config-dep.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/plugin-interface.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/fwd.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/omniorb/url.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/plugin-interface.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/pick-handler.hh
${CMAKE_SOURCE_DIR}/include/gepetto/gui/settings.hh
)

SET(${PROJECT_NAME}_FORMS
Expand All @@ -155,12 +166,14 @@ IF(NOT CLIENT_ONLY)
include/gepetto/gui/config-dep.hh
src/gui/main.cc
)
# }}}
ENDIF(NOT CLIENT_ONLY)
# }}}

ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(doc)

IF(NOT CLIENT_ONLY)
ADD_SUBDIRECTORY(src/gui)
ADD_SUBDIRECTORY(plugins)
ADD_SUBDIRECTORY(pyplugins)
ADD_SUBDIRECTORY(blender)
Expand All @@ -169,3 +182,5 @@ IF(NOT CLIENT_ONLY)
ENDIF(NOT CLIENT_ONLY)

SETUP_PROJECT_FINALIZE()

# vim: foldmethod=marker foldlevel=0
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* [Installation procedure](#installation-procedure)
* [Dependencies](#dependencies)
* [PythonQt](#pythonqt)
* [Python 3](#python-3)
* [Troubleshooting](#troubleshooting)

## gepetto-viewer-corba
Expand Down Expand Up @@ -203,6 +204,34 @@ To install `gepetto-gui` you just have to follow the installation step at the to
### PythonQt
gepetto-gui offers the possibility to develop plugins in python. To do so, you must install PythonQt by following the instructions here: https://github.com/jmirabel/PythonQt#readme

### Python 3
This section describes the procedure to get bindings for Python 3.
The support for Python 3 is from `OmniORB 4.2.2`.
In Ubuntu 16.04, the version is 4.2.1, and in Ubuntu 18.04 it is 4.2.2, but Ubuntu main repos do not provide python 3 support.
Thus, to make it work you must manually compile `OmniORB 4.2.2`.
Download latest versions of `OmniORB` and `OmniORBpy` from [sourceforge](https://sourceforge.net/projects/omniorb/).
Then compile `OmniORB` making sure it finds python3:
```bash
export PYTHON=/usr/bin/python3
cd omniORB-4.2.2/
mkdir build
cd build
../configure --prefix=${CMAKE_INSTALL_PREFIX}
make
make install
```
Compile `OmniORBpy` making sure it finds python3:
```bash
cd omniORBpy-4.2.2/
mkdir build
cd build
../configure --prefix=${CMAKE_INSTALL_PREFIX}
make
make install
```
Finally you can compile and install `gepetto-viewer-corba` making sure it finds `OmniORB 4.2.2`.


# Troubleshooting

## `CORBA::TRANSIENT` when launching a server
Expand Down
2 changes: 1 addition & 1 deletion blender/urdf_to_blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def setMatOrText (self, name):

def __call__ (self, link):
geometry = link.visual.geometry
if self.run.has_key (type(geometry)):
if type(geometry) in self.run:
self.run[type(geometry)](geometry)
self.setName(link.name)
if link.visual.material is not None:
Expand Down
2 changes: 1 addition & 1 deletion cmake
14 changes: 14 additions & 0 deletions cmake-modules/gepetto-viewer-corba-plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,17 @@ MACRO(GEPETTO_GUI_PLUGIN PLUGIN_NAME)
# Uncomment to install
INSTALL(TARGETS ${PLUGIN_NAME} DESTINATION lib/gepetto-gui-plugins)
ENDMACRO()

# Declare a Python plugin
MACRO(GEPETTO_GUI_PYPLUGIN file)
STRING(MD5 file_md5 "${PYTHON_SITELIB}/${file}")
STRING(REGEX REPLACE ".py$" "" module "${file}")
STRING(REPLACE "/" "." module "${module}")
FILE(GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file_md5}
CONTENT "${file}\n${module}")

INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${file_md5}
DESTINATION etc/gepetto-gui/pyplugin.conf.d)
ENDMACRO()
63 changes: 63 additions & 0 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright (c) 2019 CNRS
# Author: Joseph Mirabel
#
# This file is part of gepetto-viewer-corba.
# gepetto-viewer-corba is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# gepetto-viewer-corba is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# gepetto-viewer-corba. If not, see
# <http://www.gnu.org/licenses/>.

# {{{ Find Qt tags
SET(_use_qt_local_doc FALSE)
SET(qt_online_doc "http://doc.qt.io")

IF(USE_QT4)
FIND_FILE(QT4_TAGFILE doc/html/qt.tags
HINTS / /usr
PATH_SUFFIXES share/qt4)
# Eventually, QT4_TAGFILE can be set manually to
# /usr/share/qt4/doc/html/qt.tags
# on ubuntu 16.04, from package qt4-doc-html
IF(QT4_TAGFILE)
IF(_use_qt_local_doc)
GET_FILENAME_COMPONENT(path_to_doc ${QT4_TAGFILE} DIRECTORY)
SET(QT_TAGFILES "\"${QT4_TAGFILE}=${path_to_doc}\"" PARENT_SCOPE)
ELSE(_use_qt_local_doc)
SET(QT_TAGFILES "\"${QT4_TAGFILE}=${qt_doc}/archives/qt-4.8\"" PARENT_SCOPE)
ENDIF(_use_qt_local_doc)
ENDIF()
ELSE(USE_QT4)
SET(_QT_TAGFILES)
# Available components
# qtcore qtgui qtwidgets qtnetwork qtsql
# qtprintsupport qttestlib qtconcurrent qdoc qtxml
FOREACH (component "core" "widgets" "gui" "network")
STRING(TOUPPER ${component} _up_comp)
FIND_FILE(QT5_${_up_comp}_TAGFILE doc/qt${component}/qt${component}.tags
HINTS / /usr
PATH_SUFFIXES share/qt5)
# Eventually, QT5_${_up_comp}_TAGFILE can be set manually to
# /usr/share/qt5/doc/qt${component}/qt${component}.tags
# on ubuntu 16.04, from package qtbase5-doc-html
IF(QT5_${_up_comp}_TAGFILE)
IF(_use_qt_local_doc)
GET_FILENAME_COMPONENT(path_to_doc ${QT5_${_up_comp}_TAGFILE} DIRECTORY)
SET(_QT_TAGFILES "${_QT_TAGFILES} \"${QT5_${_up_comp}_TAGFILE}=${path_to_doc}\"")
ELSE(_use_qt_local_doc)
SET(_QT_TAGFILES "${_QT_TAGFILES} \"${QT5_${_up_comp}_TAGFILE}=${qt_doc}/qt-5\"")
ENDIF(_use_qt_local_doc)
ENDIF()
ENDFOREACH()
SET(QT_TAGFILES ${_QT_TAGFILES} PARENT_SCOPE)
ENDIF(USE_QT4)
# }}}

# vim: foldmethod=marker foldlevel=0
7 changes: 4 additions & 3 deletions doc/Doxyfile.extra.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FILE_PATTERNS = *.idl *.hh *.py *.idl
FILE_PATTERNS = *.idl *.hh *.py *.idl *.dox

INPUT = @CMAKE_SOURCE_DIR@/include \
@CMAKE_SOURCE_DIR@/idl \
@CMAKE_SOURCE_DIR@/plugins \
@CMAKE_SOURCE_DIR@/pyplugins \
@CMAKE_SOURCE_DIR@/doc

GENERATE_TREEVIEW = NO
EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/examples
LAYOUT_FILE = @CMAKE_SOURCE_DIR@/doc/layout.xml

EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/
TAGFILES += @QT_TAGFILES@
Loading

0 comments on commit f983e4e

Please sign in to comment.