Closed eastskykang closed 5 years ago
How did you build the exe? cmake or premake? If one, can you try the other?
What OS and compiler?
I have a similar error while loading a urdf using the b3RobotSimulatorClientAPI_noGUI .
I pretty much copied the code from the example library.
model = new b3RobotSimulatorClientAPI_NoGUI();
connected = model->connect(eCONNECT_DIRECT);
if (!connected)
{
std::cerr << "Error: Could not connect to bullet server..." << std::endl;
abort();
}
// Config for bullet
//model->configureDebugVisualizer(COV_ENABLE_GUI, 0);
model->setTimeOut(10);
model->syncBodies();
// Set the time step
btScalar bStepSize = 1. / 240.;
model->setTimeStep(bStepSize);
// Convert the gravity
btVector3 bGravity = btVector3(0, 0, 0);
//for (int i = 0; i < 3; i++)
//{
// bGravity[i] = modelConfig["gravity"][i].as<double>();
//}
model->setGravity(bGravity);
std::cout << "Working until load URDF" << std::endl;
// load the urdf
model->loadURDF(modelFile);
//for (int i = 0; i < 100; i++)
//{
// model->stepSimulation();
//}
std::cout << "Working after load URDF" << std::endl;
Which leads to the following output
Working until load URDF
dynamics_benchmark:BULLET_INSTALL/bullet/src/LinearMath/btThreads.cpp:198: void btSpinMutex::lock(): Assertion `!"unimplemented btSpinMutex::lock() called"' failed.
Aborted (core dumped)
Running gdb gives:
Working until load URDF
dynamics_benchmark: /media/jmartensen/Data/general/research/01_benchmark/external/bullet/src/LinearMath/btThreads.cpp:198: void btSpinMutex::lock(): Assertion `!"unimplemented btSpinMutex::lock() called"' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff5c89428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) quit()
A debugging session is active.
I am using cmake ( C++11) , Ubuntu 16.04.
It is a harmless warning if using Bullet in a single-threaded environment (DIRECT mode /NO_GUI). It is fixed here: https://github.com/bulletphysics/bullet3/pull/2030/commits/fb2baa81d67c16e42cc0eec56af08192b12e14fb
If you use Bullet, BulletRobotics or PyBullet in multithreaded mode (GUI, SHARED_MEMORY etc), can you use premake to build the project and make sure to enable_multithreading?
premake4 --double --enable_multithreading --targetdir="../bin" vs2010
When using cmake, please use BULLET2_MULTITHREADING=ON
Hello,
As I run App_RobotSimulator with cmake debug mode, I got the following error.
Someone can give some suggestion to fix it?
Thank you.