-
Guilhem Saurel authoredGuilhem Saurel authored
CORBA server/client for the Graphical Interface of Pinocchio and HPP
Summary
gepetto-viewer-corba
Setup from robotpkg apt binary package repository
- Add robotpkg to your apt configuration: http://robotpkg.openrobots.org/debian.html
sudo apt update && sudo apt install robotpkg-qt4-gepetto-viewer-corba
Setup from sources
To compile this package, it is recommended to create a separate build directory:
mkdir _build
cd _build
cmake [OPTIONS] ..
make install
Please note that CMake produces a CMakeCache.txt
file which should
be deleted to reconfigure a package from scratch.
Makefile
A Makefile that installs the dependencies is provided for convinience. Please follow those steps:
- copy
doc/Makefile
, - open and set the variable
SRC_DIR
andINSTALL_DIR
, - optionally, change
OSG_PACKAGE
andQT_VERSION
, - run
make all
Note that the environment variables PATH
, LD_LIBRARY_PATH
and PKG_CONFIG_PATH
should include
the path to the installation directory.
Dependencies
The present software depends on several packages which have to be available on your machine.
- Libraries:
- omniORB4 (version >= 4.1.4)
- openscenegraph (version >= 3.2)
- urdfdom (version >= 0.3.0)
- GepettoViewer (Graphical Interface of Pinocchio and HPP)
- Binaries:
- omniNames (installed by sudo apt-get install omniorb-nameserver)
- System tools:
- CMake (>=2.6)
- pkg-config
- usual compilation tools (GCC/G++, make, etc.)
Install standalone urdfdom
In order to read urdf files (see http://wiki.ros.org/urdf for the description), one haves to install the urdfdom package which can come either along ROS library or be installed as a standalone library. Next section describes the second procedure.
urdfdom depends on both console_bridge and urdfdom_headers. The installation of both dependencies can be done with the following command lines in a terminal :
git clone git://github.com/ros/console_bridge.git && cd console_bridge && mkdir build && cd build && cmake .. && make && sudo make install
git clone git://github.com/ros/urdfdom_headers && cd urdfdom_headers && mkdir build && cd build && cmake .. && make && sudo make install
Finally, you just need to apply the following command line to install urdfdom library :
git clone git://github.com/ros/urdfdom && cd urdfdom && mkdir build && cd build && cmake .. && make && sudo make install
gepetto-gui
Usage
Basic usage
Launch the binary file gepetto-gui
and do as in this video.
Adding predefined robots and environments
For convenience, robots and environments can be predefined.
Automatic
- Robots:
# Use option --predefined-robots to change the robots setting file.
# OPTIONS="--predefined-robots other-robots"
OPTIONS=""
# PR2 from hpp_tutorial
gepetto-gui -g ${OPTIONS} --add-robot "PR2-hpp_tutorial,pr2,planar,pr2,hpp_tutorial,,_manipulation"
# HRP2
gepetto-gui -g ${OPTIONS} --add-robot "HRP2,hrp2,freeflyer,hrp2_14,hrp2_14_description,,"
# Romeo
gepetto-gui -g ${OPTIONS} --add-robot "Romeo,romeo,freeflyer,romeo,romeo_description,,H37V1"
- Environments:
# Use option --predefined-environments to change the environments setting file.
# OPTIONS="--predefined-environments other-environments"
OPTIONS=""
# Kitchen
gepetto-gui -g ${OPTIONS} --add-env "Kitchen,kitchen,iai_maps,kitchen_area"
Manually
The configuration files are - from the installation prefix - in etc/gepetto-gui
.
Open ${CMAKE_INSTALL_PREFIX}/etc/gepetto-gui/robots.conf
and write:
[PR2 - hpp_tutorial]
RobotName=pr2
ModelName=pr2
RootJointType=planar
Package=hpp_tutorial
URDFSuffix=
SRDFSuffix=_manipulation
[HRP2]
RobotName=hrp2_14
ModelName=hrp2_14
RootJointType=freeflyer
Package=hrp2_14_description
URDFSuffix=
SRDFSuffix=
Open ${CMAKE_INSTALL_PREFIX}/etc/gepetto-gui/environments.conf
and write:
[Kitchen]
RobotName=Kitchen
Package=iai_maps
URDFFilename=kitchen_area
Note: Do not forget to replace ${CMAKE_INSTALL_PREFIX}
by a relevant path.
Loading plugins
Automatic
# Use option --config-file to change the settings file.
# OPTIONS="--config-file other-settings"
OPTIONS=""
# Using the core framework: hppcorbaserver
gepetto-gui -g ${OPTIONS} \
--load-plugin hppwidgetsplugin.so \
--load-plugin hppcorbaserverplugin.so \
--load-plugin remoteimuplugin.so
# Using the manipulation framework: hpp-manipulation-server
gepetto-gui -g ${OPTIONS} \
--load-plugin hppmanipulationwidgetsplugin.so \
--load-plugin hppmanipulationplugin.so \
--load-plugin hppmonitoringplugin.so \
--load-plugin remoteimuplugin.so
Manually
Open ${CMAKE_INSTALL_PREFIX}/etc/gepetto-gui/settings.conf
and write:
[plugins]
hppcorbaserverplugin.so=true
remoteimuplugin.so=true
hppwidgetsplugin.so=true
The plugins are looked for in the directory ${CMAKE_INSTALL_PREFIX}/lib/gepetto-gui-plugins
For HPP developpers
As HPP, the GUI can be controlled using a python interface. When the GUI starts, it launches a server for both HPP and the Gepetto Viewer exactly as if you were manually launching the two commands hppcorbaserver
and gepetto-viewer-server
. This means that you can run the same python scripts and it will work !