...
 
Commits (8)
include: http://rainboard.laas.fr/project/hpp-gui/.gitlab-ci.yml
......@@ -17,22 +17,22 @@
# hpp-gui If not, see
# <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(PROJECT_NAME "hpp-gui")
SET(PROJECT_DESCRIPTION "Graphical interface for HPP ")
SET(CXX_DISABLE_WERROR TRUE)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/hpp.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake//python.cmake)
# Tells pkg-config to read qtversion and cmake_plugin from pkg config file.
LIST(APPEND PKG_CONFIG_ADDITIONAL_VARIABLES qtversion cmake_plugin)
SET(PROJECT_NAME "hpp-gui")
SET(PROJECT_DESCRIPTION "Graphical interface for HPP ")
SETUP_HPP_PROJECT()
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
FINDPYTHON()
ADD_REQUIRED_DEPENDENCY("gepetto-viewer-corba >= 1.3")
......@@ -106,5 +106,3 @@ ELSE ()
INSTALL (FILES etc/gepetto-gui/basic.conf
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/gepetto-gui)
ENDIF ()
SETUP_HPP_PROJECT_FINALIZE()
# hpp-gui
[![Pipeline status](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-gui/badges/master/pipeline.svg)](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-gui/commits/master)
[![Coverage report](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-gui/badges/master/coverage.svg?job=doc-coverage)](http://projects.laas.fr/gepetto/doc/humanoid-path-planner/hpp-gui/master/coverage/)
[![Build Status](https://travis-ci.org/jmirabel/hpp-gui.svg?branch=master)](https://travis-ci.org/jmirabel/hpp-gui)
**hpp-gui** is a set of plugins to integrate [HPP] inside `gepetto-gui`, which comes with the `gepetto-viewer-corba` package.
......
Subproject commit c81a37191d764522899b5dcb4468485a826141c2
Subproject commit 7eca9ee6c9d1c4ee20eb82272e94f9d11642053a
......@@ -54,6 +54,6 @@ IF (HPP_CORBASERVER_FOUND)
ENDIF (HPP_MANIPULATION_CORBA_FOUND AND BUILD_HPP_MANIPULATION_WIDGETS_PLUGIN)
ENDIF (HPP_CORBASERVER_FOUND)
IF (HPP_FCL_FOUND)
IF (BUILD_HPP_FCL_PLUGIN AND HPP_FCL_FOUND)
ADD_SUBDIRECTORY(hppfcl)
ENDIF()
......@@ -22,6 +22,7 @@
#include <gepetto/viewer/node.h>
#include <hpp/fcl/BVH/BVH_model.h>
#include <hpp/fcl/internal/BV_splitter.h>
namespace hpp {
namespace gui {
......
......@@ -24,6 +24,7 @@
#include <QInputDialog>
#include <gepetto/gui/mainwindow.hh>
#include <gepetto/gui/osgwidget.hh>
#include <gepetto/gui/windows-manager.hh>
#include <node.hh>
......@@ -68,11 +69,35 @@ namespace hpp {
void HppFclPlugin::openDialog() const
{
bool ok;
QString filename = QFileDialog::getOpenFileName (NULL, "Select a mesh file");
QString name = QInputDialog::getText(NULL, "Node name", "Node name", QLineEdit::Normal, "bvhmodel");
if (filename.isNull()) return;
int splitMethod = QInputDialog::getInt(NULL, "Split method type",
"Split method type", 0, 0, 3, 1);
"Split method type", 0, 0, 3, 1, &ok);
if (!ok) return;
QString name = QInputDialog::getText(NULL, "Node name", "Node name", QLineEdit::Normal, "bvhmodel");
if (name.isNull()) return;
std::string filename_ (filename.toStdString());
std::string name_ (name.toStdString());
std::string mname_ (name_ + "_mesh");
// Load mesh
MainWindow* main = MainWindow::instance ();
if (!main->osg()->nodeExists (mname_) && !main->osg()->addMesh (mname_, filename_)) return;
std::string group;
if (main->osgWindows().empty()) {
group = "window";
main->osg()->createWindow (group);
} else {
group = main->osgWindows().first()->window()->getID();
}
addBV (name, filename, splitMethod);
main->osg()->addToGroup (name_, group);
main->osg()->addToGroup (mname_, group);
}
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
......
......@@ -322,7 +322,7 @@ namespace hpp {
for (ULong i = 0; i < dq_.length(); ++i) dq_[ i] = 0;
setValue (0);
connect(this, SIGNAL (sliderReleased()), this, SLOT (reset()));
connect(this, SIGNAL (sliderMoved(int)), this, SLOT (updateIntegrator(int)));
connect(this, SIGNAL (valueChanged(int)), this, SLOT (updateIntegrator(int)));
timerId_ = startTimer(rate_);
}
......@@ -363,7 +363,7 @@ namespace hpp {
setMinimum(0);
setMaximum(100);
setValue ((int)(100*(value_ - m_)/(M_ - m_)));
connect (this, SIGNAL (sliderMoved(int)), this, SLOT (updateConfig(int)));
connect (this, SIGNAL (valueChanged(int)), this, SLOT (updateConfig(int)));
}
double SliderBoundedJoint::getValue()
......