Comments (14)
It probably unrelated to the swapBuffers
warning.
The Node ... does not exist
makes me think the issue is in viewer.loadViewerModel
. I guess the objects are created but not added to the scene.
Also, is there another visualizers that I can use to easily display the robot while programming in c++?
Not that I know of.
from gepetto-viewer.
Hello @MariaBana
Difficult to reproduce your issue. There are no include in your sample C++ code.
Can you embed your code in a minimal package with a CMakeLists.txt so that we can compile it ?
Did you install from binary packages or from source. If so which versions of pinocchio, gepetto-viewer and gepetto-viewer-corba do you use ?
Otherwise can you look in the Body Tree what are the objects present ?
from gepetto-viewer.
Hi @florent-lamiraux
Thanks to your generous help,
Can you embed your code in a minimal package with a CMakeLists.txt so that we can compile it ?
I have written a more concise code here(simply replacing the urdf path of https://github.com/stack-of-tasks/pinocchio-gepetto-viewer/blob/master/tests/ur5.cc)
learn-pinocchio.zip
Did you install from binary packages or from source. If so which versions of pinocchio, gepetto-viewer and gepetto-viewer-corba do you use ?
They are installed from source. The pinocchio I use is the pinocchio3-preview branch (because I need to use the closed chain manipulator), gepetto-viewer and gepetto-viewer-corba are the master branches.
Other than that, I installed libopenscenegraph-dev3.6.4 and libopenscenegraph160 3.6.4 from binary packages, and osg3.6.4 from source.
Otherwise can you look in the Body Tree what are the objects present ?
It seems that it does not load the body tree correctly, here is a screenshot of the window.
from gepetto-viewer.
I guess the objects are created but not added to the scene.
Thanks very much for the tip, could you give me more guidance to verify this guess? These lines of code are written like the official example, so it should be fine, right?
pinocchio::gepetto::Viewer viewer (model, &visual_model, &collision_model);
viewer.initViewer("pinocchio");
viewer.loadViewerModel("ur5");
viewer.addFrame(model.nframes-1);
viewer.display(pinocchio::neutral(model));
from gepetto-viewer.
I am not so familiar with the bindings between pinocchio and gepetto-viewer. I cannot find which package installs
#include <pinocchio/gepetto/viewer.hpp>
from gepetto-viewer.
@florent-lamiraux It is pinocchio-gepetto-viewer: https://github.com/stack-of-tasks/pinocchio-gepetto-viewer, sorry I forgot to attach it.
from gepetto-viewer.
It seems to work on my computer
from gepetto-viewer.
Maybe you can try with another urdf model.
from gepetto-viewer.
Yes, the issue is that the meshes are not loaded. I suspect that the meshes cannot be found (though I'm surprised there is no error message. Check your ROS_PACKAGE_PATH
.
from gepetto-viewer.
@jmirabel
I can't use pinocchio through ROS because I need pinocchio3-preview to use closed chain dynamics.
But I installed pinocchio2 to compare. I changed the name of the base.dae in the meshes file and the following error is output in pinocchio2
mao@mao:~/Desktop/myProject/learn-pinocchio/build$ ./learn-pinocchio
terminate called after throwing an instance of 'std::invalid_argument'
what(): Could not load resource /home/mao/Desktop/Third-Party/pinocchio/models/example-robot-data/robots/ur_description/meshes/ur5/visual/base.dae
Unable to open file "/home/mao/Desktop/Third-Party/pinocchio/models/example-robot-data/robots/ur_description/meshes/ur5/visual/base.dae".
Hint: the mesh directory may be wrong.
Aborted (core dumped)
This means it can find the meshes file. The same learn-pinocchio program in pinocchio3, on the other hand, runs normally, so I think there may be a problem with the read meshes step in pinocchio3?
However, pinocchio2 also does not display the robot properly (when loading meshes normally), and the gepetto-gui reports the same error as pinocchio3, as does the body tree.
from gepetto-viewer.
@florent-lamiraux
I tried several models provided in pinocchio and they all report the same error. And compared with pinocchio2 (see the my last reply for details), I think the problem may not be loading the model?
from gepetto-viewer.
I'm pretty sure the issue is unrelated. Either the paslth is wrong or the file got corrupted somehow. Check whether you can open the file with meshlab. Double check the path.
from gepetto-viewer.
@jmirabel
I made sure the path and files are OK, I have now installed the osg-dae plugin and successfully displayed the robot in pinocchio2, but the same program doesn't work in pinocchio3, still reporting the same error.
from gepetto-viewer.
Can you open an issue in pinocchio explaining that displaying models using pinocchio 2 + pinocchio-gepetto-viewer works but that pinocchio 3 + gepetto-viewer does not, refer to this issue and ask for what has changed ?
from gepetto-viewer.
Related Issues (20)
- Scene characteristics parametrization HOT 4
- Installing gepetto-viewer with conda HOT 3
- missing dependency: No package 'openscenegraph-osgQt5' found HOT 19
- mesh is always rendered in color white HOT 16
- Citing Gepetto Viewer HOT 2
- gepetto-gui: "radius" text box being filled with garbage values HOT 5
- CMake Error at CMakeLists.txt:31 (INCLUDE) HOT 22
- check URDFs with names containing / HOT 1
- gepetto-viewer and Jupyter Notebook HOT 4
- Meshes are never deleted HOT 6
- gepetto-gui does't exist HOT 1
- compilation error HOT 5
- Robotpkg packaging HOT 4
- Impossible to clone submodule HOT 3
- build fails on ubuntu 18.04 clean install HOT 2
- AttributeError: 'GepettoVisualizer' object has no attribute 'viewer' HOT 1
- adding stl mesh makes other meshes disappear HOT 6
- Memory leak when destroying visual objects HOT 2
- How to draw a curve in gepetto based on multiple spatial positions? 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 gepetto-viewer.