Hi Everyone,
I described my Problem already here https://github.com/bulletphysics/bullet3/issues/2730 and are shifting to the froum, as it seems to be a build system problem. I am using qt creator and build with qmake, while the source files are part of my project. I want to use the b3RobotSimulatorClientAPI (https://github.com/bulletphysics/bullet ... lientAPI.h). Has anyone tried to build with qmake? Or is it possible to have a shared library of the b3RobotSimulatorClientAPI and include it in my project?
Best wishes,
Chris
C++ API Integration
Re: C++ API Integration
I changed the setup slightly, to be closer to the App_RobotSimulator. I am now including the same shared libraries as the App_RobotSimulator does (taken from its CMakeLists.txt) using the compiled .so files after running the 'build_cmake_pybullet_double.sh' script. I tried two different ways for including the RobotSimulator source files, neglecting the main for now. Including the source and header files into my *.pro file directly as well as linking the *.o files from the App_RobotSimulator.dir folder. Both compile without errors.
Compile the RobotSimulatorMain.cpp with qmake using qtcreator does not produce any errors. However the program crashes, while the App_RobotSimulator generated with 'build_cmake_pybullet_double.sh' doesn't. Any suggestions?
It does not pass any sim->call() after the following lines, while the lines itself do not crash:
When the above lines are commented, the sim->loadURDF("plane.urdf") call returns false.
Compile the RobotSimulatorMain.cpp with qmake using qtcreator does not produce any errors. However the program crashes, while the App_RobotSimulator generated with 'build_cmake_pybullet_double.sh' doesn't. Any suggestions?
It does not pass any sim->call() after the following lines, while the lines itself do not crash:
Code: Select all
btQuaternion q = sim->getQuaternionFromEuler(btVector3(0.1, 0.2, 0.3));
btVector3 rpy;
rpy = sim->getEulerFromQuaternion(q)
Re: C++ API Integration
To answer my original problem: I found the origin in the compiler flags. Those can be set in the *.pro file using the 'DEFINES' Key. However I additionally compiled the complete RobotSimulator into a shared library and include that library in my project instead of compiling it with qmake together with my project. To remove any differences I also compiled my own RobotSimulatorClass, what basically inherits the lines of RobotSimulatorMain and included it in the shared library. Together with the flags this works fine when used in the main of my qmake project.
Now to the new problem: Whenever I pass the Simulation lower into my project or into any thread, it crashes again. I inherit from QMainWindow and QThread Objects. Neither creating the Simulation in the main and passing it to the threads (object, pointer or reference) nor creating it within the thread works. Anyone had identical problems?
Now to the new problem: Whenever I pass the Simulation lower into my project or into any thread, it crashes again. I inherit from QMainWindow and QThread Objects. Neither creating the Simulation in the main and passing it to the threads (object, pointer or reference) nor creating it within the thread works. Anyone had identical problems?