Comments (23)
My final solution :
Environment: Ubuntu 16
Step 1: Install OpenRAVE. Ref: https://gitcode.net/mirrors/crigroup/openrave-installation?utm_source=csdn_github_accelerator.
PS: We need OpenRAVE>=0.8, so Ubuntu 16 (or 14) is required with above method.
Step 2: Install CMake, boost, and Eigen using your package manager (Don't install OpenSceneGraph as we have install it at step 1. This is important).
Command: sudo apt-get install cmake libboost-all-dev libeigen3-dev python-numpy
Step 3: Install trajopt. Command as follows:
git clone https://github.com/joschu/trajopt.git
cd trajopt
mkdir build
cd build
cmake .. -DOSG_DIR=/usr/local/lib64
make -j
An error I meet: trajopt/src/osgviewer/osgviewer.cpp:17:10: fatal error: osg/CameraNode: No such file or directory
Solution: Modify trajopt/src/osgviewer/osgviewer.cpp so that CameraNode is replaced by Camera.
Step 4: For testing, refer to https://rll.berkeley.edu/trajopt/doc/sphinx_build/html/install.html
from trajopt.
Try with cmake .. -DOSG_DIR=/usr/local/lib64
from trajopt.
If I don't have libopenscenegraph-dev
is installed via apt-get
, trajopt is throwing an error when I compile with osgviewer. I am not sure if source installation of OSG is not installing dev files or I'm point it wrong.
from trajopt.
My solution:
- install OSG3.4.0 from source
sudo apt-get install libopenscenegraph-dev
sudo cp /usr/include/osg/CameraNode usr/local/include/osg/
sudo apt-get remove libopenscenegraph-dev
- build trajopt
from trajopt.
Can you provide more information? What system are you compiling on? What version of OSG do you have installed? Can you copy/paste the output from cmake?
from trajopt.
Im using ubuntu 14.04,
$ osgversion
OpenSceneGraph Library 3.4.2
$ cmake .. -DGUROBI_LIBRARY=/opt/gurobi751/linux64/lib/libgurobi75.so
cmake .. -DGUROBI_LIBRARY=/opt/gurobi751/linux64/lib/libgurobi75.so
-- The C compiler identification is GNU 4.9.4
-- The CXX compiler identification is GNU 4.9.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'eigen3'
-- found eigen3, version 3.2.0
-- Found Eigen: /usr/include/eigen3
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- system
-- python
-- thread
-- program_options
adding test with path /home/user/trajopt/python_examples/arm_to_joint_target.py
python exc
adding test with path /home/user/trajopt/python_examples/arm_to_cart_target.py
python exc
adding test with path /home/user/trajopt/python_examples/fullbody_plan.py
python exc
adding test with path /home/user/trajopt/python_examples/position_base.py
python exc
adding test with path /home/user/trajopt/python_examples/this_side_up.py
python exc
-- Found PythonInterp: /usr/bin/python (found version "2.7.6")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found GUROBI: /opt/gurobi751/linux64/lib/libgurobi75.so
Gurobi found
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.6", minimum required is "2")
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- python
-- Found OpenThreads: /usr/local/lib64/libOpenThreads.so
-- Found osg: /usr/local/lib64/libosg.so
-- Found osgDB: /usr/local/lib64/libosgDB.so
-- Found osgUtil: /usr/local/lib64/libosgUtil.so
-- Found osgViewer: /usr/local/lib64/libosgViewer.so
-- Found osgGA: /usr/local/lib64/libosgGA.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/trajopt/build
from trajopt.
Looks like an issue with OpenSceneGraph 3.4.2, EventHandler handler was ether moved or removed. It should compile with OpenSceneGraph 3.4.0
from trajopt.
I am getting the exact same error. Installing OpenSceneGrasp 3.4.0 from source didn't help it.
from trajopt.
Can you also try to compile OSG 3.4.1 from source and then compile trajopt?
from trajopt.
I've compiled without OSG (compiled the openrave without OSG as well) and it worked fine.
PS. I was compiling with cmake .. -DOSG_DIR=/usr/local/lib64
.
Only problem is thatOpenRAVE is throwing a warning:
2018-03-30 19:01:49,624 openrave [WARN] [plugindatabase.h:929 RaveDatabase::_SysLoadLibrary] /usr/local/lib/openrave0.9-plugins/libqtosgrave.so: libosgDB.so.130: cannot open shared object file: No such file or directory
from trajopt.
Can you post all the commands you ran to install/compile OSG, OpenRave, and TrajOpt? Including every apt-get install
command.
from trajopt.
Initially, I followed this to install OpenRAVE: https://scaron.info/teaching/installing-openrave-on-ubuntu-16.04.html
The only different thing I did was to compile latest_stable
branch.
After installing openrave, I cloned trajopt and
mkdir build; cd build
cmake .. -DOSG_DIR=/usr/local/lib64 -DGUROBI_LIBRARY=/opt/gurobi752/linux64/lib/libgurobi75.so
make -j4
Since this didn't work, I did the following:
cd OpenSceneGraph/build
sudo make uninstall
cd openrave/build;
sudo make uninstall
cd ..; rm -r build; mkdir build; cd build
cmake ..
make -j4
sudo make install
cd trajopt; rm -r build; mkdir build; cd build
cmake .. -DGUROBI_LIBRARY=/opt/gurobi752/linux64/lib/libgurobi75.so
make -j4
I have just tried installing OSG 3.4.1 but the openrave is not even compiling now.
from trajopt.
Why don't you start fresh, make uninstall
everything and delete the repos.
git clone https://github.com/openscenegraph/openscenegraph.git -b OpenSceneGraph-3.4.1
Build and install OSG 3.4.1 from source.
git clone https://github.com/flexible-collision-library/fcl.git -b 0.5.0
Build and install FCL 0.5.0 from source (needed for OpenRAVE).
Past the commands you ran to build and the resulting errors.
from trajopt.
Okay, so I've uninstalled and installed everything from scratch. Here is what I did after uninstalling:
cd OpenSceneGraph; mkdir build; cd build
(OSG branch is 3.4.1)cmake .. -DDESIRED_QT_VERSION=4
make -j5
sudo make install
cd openrave; mkdir build; cd build
(OR branch is latest_stable)mkdir build; cd build
cmake .. -DOSG_DIR=/usr/local/lib64/
make -j5
sudo make install
sudo apt-get install libopenscenegraph-dev cmake libboost-all-dev libeigen3-dev python-numpy
(trajopt dependencies)cd trajopt
mkdir build; cd build
cmake .. -DOSG_DIR=/usr/local/lib64 -DGUROBI_LIBRARY=/opt/gurobi752/linux64/lib/libgurobi75.so
And I get the exact same errors.
I think the problem is related to libopenscenegraph-dev package. I've checked ubuntu packages and it is installing version 3.2 where source installation of OpenSceneGraph is 3.4.x.
from trajopt.
I am able to build the trajopt without osgviewer
. I've commented out every entry in CMakeLists.txt for osgviewer
. I am not sure if this is gonna affect the trajopt functionality but it seems to me that osgviewer is used for visualisation without openrave since I'm gonna use C++ API in another openrave code this should be ok.
from trajopt.
Yeah, don't install libopenscenegraph-dev
via apt-get
.
Uninstall the apt-get version and reinstalled the one from source by running:
sudo apt-get remove libopenscenegraph-dev
make uninstall
fromOpenSceneGraph/build
make install
fromOpenSceneGraph/build
However, you're right about OSG being needed only for visualization, so there's no need to build with it.
from trajopt.
Whats the version of your OS?
from trajopt.
It's Ubuntu 16.04. I've ended up compiling openrave by disabling OSG. I uninstalled OSG 3.4.x that I installed from source and installed libopenscenegraph-dev
via apt-get. Finally, I was able to compile trajopt with OSG. I am using qtcoin
for openrave.
from trajopt.
I installed libopenscegraph-dev for trajopt but it doesnt work with openrave.When I use openscenegraph same as trajopt , openrave gives an error that it doesnt load the environment. I am a beginner using two together, can you give instructions on how to use qtcoin with openrave?
from trajopt.
I am using ubuntu 16.04 , I sloved above error by libopenscengraph-dev. Due to some reasons I did compiling again and I come across this error still
[ 96%] Linking CXX executable ../../../bin/collision-checker-unit
../../../lib/libosgviewer.so: undefined reference to osg::Callback::traverse(osg::Object*, osg::Object*)' ../../../lib/libosgviewer.so: undefined reference to
osg::Group::removeChild(osg::Node*)'
../../../lib/libosgviewer.so: undefined reference to VTT for osgGA::EventHandler' ../../../lib/libosgviewer.so: undefined reference to
non-virtual thunk to osgGA::EventHandler::event(osg::NodeVisitor*, osg::Drawable*)'
../../../lib/libosgviewer.so: undefined reference to vtable for osgGA::EventHandler' ../../../lib/libosgviewer.so: undefined reference to
osgGA::GUIEventHandler::handle(osgGA::Event*, osg::Object*, osg::NodeVisitor*)'
../../../lib/libosgviewer.so: undefined reference to osg::Group::getNumChildren() const' ../../../lib/libosgviewer.so: undefined reference to
osg::NodeVisitor::apply(osg::Drawable&)'
../../../lib/libosgviewer.so: undefined reference to osgGA::EventHandler::operator()(osg::Node*, osg::NodeVisitor*)' ../../../lib/libosgviewer.so: undefined reference to
typeinfo for osgGA::EventHandler'
../../../lib/libosgviewer.so: undefined reference to osgGA::EventHandler::event(osg::NodeVisitor*, osg::Drawable*)' ../../../lib/libosgviewer.so: undefined reference to
virtual thunk to osg::Drawable::EventCallback::run(osg::Object*, osg::Object*)'
../../../lib/libosgviewer.so: undefined reference to osgGA::EventHandler::handle(osgGA::Event*, osg::Object*, osg::NodeVisitor*)' ../../../lib/libosgviewer.so: undefined reference to
osg::Drawable::EventCallback::run(osg::Object*, osg::Object*)'
../../../lib/libosgviewer.so: undefined reference to osg::NodeVisitor::NodeVisitor(osg::NodeVisitor const&, osg::CopyOp const&)' ../../../lib/libosgviewer.so: undefined reference to
virtual thunk to osg::NodeCallback::run(osg::Object*, osg::Object*)'
../../../lib/libosgviewer.so: undefined reference to osg::NodeVisitor::apply(osg::Geometry&)' ../../../lib/libosgviewer.so: undefined reference to
osg::NodeCallback::run(osg::Object*, osg::Object*)'
collect2: error: ld returned 1 exit status
src/trajopt/test/CMakeFiles/collision-checker-unit.dir/build.make:106: recipe for target 'bin/collision-checker-unit' failed
make[2]: *** [bin/collision-checker-unit] Error 1
CMakeFiles/Makefile2:635: recipe for target 'src/trajopt/test/CMakeFiles/collision-checker-unit.dir/all' failed
make[1]: *** [src/trajopt/test/CMakeFiles/collision-checker-unit.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
../../../lib/libosgviewer.so: undefined reference to osg::Callback::traverse(osg::Object*, osg::Object*)' ../../../lib/libosgviewer.so: undefined reference to
osg::Group::removeChild(osg::Node*)'
../../../lib/libosgviewer.so: undefined reference to VTT for osgGA::EventHandler' ../../../lib/libosgviewer.so: undefined reference to
non-virtual thunk to osgGA::EventHandler::event(osg::NodeVisitor*, osg::Drawable*)'
../../../lib/libosgviewer.so: undefined reference to vtable for osgGA::EventHandler' ../../../lib/libosgviewer.so: undefined reference to
osgGA::GUIEventHandler::handle(osgGA::Event*, osg::Object*, osg::NodeVisitor*)'
../../../lib/libosgviewer.so: undefined reference to osg::Group::getNumChildren() const' ../../../lib/libosgviewer.so: undefined reference to
osg::NodeVisitor::apply(osg::Drawable&)'
../../../lib/libosgviewer.so: undefined reference to osgGA::EventHandler::operator()(osg::Node*, osg::NodeVisitor*)' ../../../lib/libosgviewer.so: undefined reference to
typeinfo for osgGA::EventHandler'
../../../lib/libosgviewer.so: undefined reference to osgGA::EventHandler::event(osg::NodeVisitor*, osg::Drawable*)' ../../../lib/libosgviewer.so: undefined reference to
virtual thunk to osg::Drawable::EventCallback::run(osg::Object*, osg::Object*)'
../../../lib/libosgviewer.so: undefined reference to osgGA::EventHandler::handle(osgGA::Event*, osg::Object*, osg::NodeVisitor*)' ../../../lib/libosgviewer.so: undefined reference to
osg::Drawable::EventCallback::run(osg::Object*, osg::Object*)'
../../../lib/libosgviewer.so: undefined reference to osg::NodeVisitor::NodeVisitor(osg::NodeVisitor const&, osg::CopyOp const&)' ../../../lib/libosgviewer.so: undefined reference to
virtual thunk to osg::NodeCallback::run(osg::Object*, osg::Object*)'
../../../lib/libosgviewer.so: undefined reference to osg::NodeVisitor::apply(osg::Geometry&)' ../../../lib/libosgviewer.so: undefined reference to
osg::NodeCallback::run(osg::Object*, osg::Object*)'
collect2: error: ld returned 1 exit status
src/trajopt/test/CMakeFiles/cast-cost-unit.dir/build.make:107: recipe for target 'bin/cast-cost-unit' failed
make[2]: *** [bin/cast-cost-unit] Error 1
CMakeFiles/Makefile2:678: recipe for target 'src/trajopt/test/CMakeFiles/cast-cost-unit.dir/all' failed
make[1]: *** [src/trajopt/test/CMakeFiles/cast-cost-unit.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
Any idea how I can solve it.
from trajopt.
my sudo apt-get install libopenscenegraph-dev doesnt install libopenscegraph-dev.so and results in .md5sums,.lists files . while try to remove libopenscenegraph100v5 it also removes libopenscengraph-dev. So kindly please let how I can solve this without the above error.
from trajopt.
I sloved this problem by uninstalling and reinstalling with the following steps
git clone https://github.com/openscenegraph/openscenegraph.git -b OpenSceneGraph-3.4.1
mkdir build && cd build
cmake .. -DDESIRED_QT_VERSION=4
make -j5
sudo make install
and the setting ENV_VAR in .bashrc
export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:$(openrave-config --python-dir)/openravepy/openravepy:$LD_LIBRARY_PATH"
export OPENTHREADS_INC_DIR="/usr/local/include"
export OPENTHREADS_LIB_DIR="/usr/local/lib64:/usr/local/lib"
export PATH="$OPENTHREADS_LIB_DIR:$PATH"
from trajopt.
thanks for this post. I almost tried every method mentioned above by everyone and finally successfully build. and ctest
has a result of 100% passed. so thank everyone for giving instruction
from trajopt.
Related Issues (20)
- what is the format cartesian position should be given and wrt which tf frame for a robot manipulator
- move to cartesian_pose has an error of 7cm and 1cm HOT 6
- this_side_up.py results in an error as follows
- ctest failed due to undefined symbol in ctrajoptpy.so
- trajopt end_pose displaces 40cm when executed on UR5 directly along x and y-axis
- How to run python examples on ubuntu 16.04
- how to solve errors while running ctest HOT 2
- executing trajectory with openrave
- No handlers could be found for logger "openravepy" HOT 1
- how to execute the trajectory generated on a real robot HOT 2
- "PENALTY_ITERATION_LIMIT" for this_side_up.py
- Please add c++ examples using the c++ api HOT 1
- Error when making trajopt, fatal error: osg/CameraNode: No such file or directory compilation terminated. HOT 5
- Linker error bpmpd - recompile with -fPIC
- Make bool conversion explicit HOT 2
- Segfaut when running examples HOT 1
- cloudproc compile error HOT 1
- Documentation website down
- Cannot compile trajopt - OpenRAVE compilation error HOT 6
- ImportError: dynamic module does not define init function (initctrajoptpy) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trajopt.