Closed liufang-robot closed 3 years ago
Thank you for reporting this. You are correct, the Coin3D libraries first need to be initialized before creating SoBase-derived classes. For rl::sg::XmlFactory
this is handled via SoInput
, while the GUI demos call SoQt::init()
and SoDB::init()
explicitly. rl::sg::UrdfFactory
also requires calling SoNodeKit::init()
due to SoSTLFileKit
.
This should be fixed by e069d223c2ca8d3c87d9b5880007f3c13196f3f7, that adds explicit calls to these functions to the scene graph factories. Alternatively, you can also add the following two lines before creating any Coin3D objects:
SoDB::init();
SoNodeKit::init();
This works. Now the scene is loaded. Thanks.
Hello,I'm using latest RL from source building. When I try to load a scene from a urdf file as follow:
it crashed when calling the
load
function and showing:I traced and found it crashed at
::SoVRMLShape* vrmlShape = new ::SoVRMLShape();
in fileUrdfFactory.cpp
. It seems the problem is one must call some coin init function before creating any vrml things. Am I correct?Do I miss something or What should I do? Thanks.