Closed aled96 closed 2 years ago
Hi,
I was using PyBullet to perform a simulation with a robot (from URDF) and everything was working. I decided to move to C++ since it is faster, but the same URDF cannot be loaded. The process dies as soon as I call loadURDF.
This is the code:
_sim = new b3RobotSimulatorClientAPI_NoGUI(); bool isConnected = _sim->connect(eCONNECT_SHARED_MEMORY); if (!isConnected){ ROS_WARN("Using Direct mode\n"); isConnected = _sim->connect(eCONNECT_DIRECT); } else ROS_WARN("Using shared memory\n"); _sim->resetSimulation(); _sim->setGravity(btVector3(0, 0, -9.81)); _sim->setRealTimeSimulation(_realtime); _sim->setTimeStep(_time_step); b3RobotSimulatorSetPhysicsEngineParameters params; params.m_numSolverIterations = _solver_it; params.m_numSimulationSubSteps = _sub_steps; _sim->setPhysicsEngineParameter(params); b3RobotSimulatorLoadUrdfFileArgs robotParams; robotParams.m_startPosition = btVector3(_init_pos[0], _init_pos[1], _init_pos[2]); robotParams.m_startOrientation = btQuaternion(0,0,0,1); ROS_WARN("Load Robot"); _robot = _sim->loadURDF(robot_path, robotParams);
In addition, if I try to move to the GUI version, using b3RobotSimulatorClientAPI.h I am not able to compile because it is not installed....
b3RobotSimulatorClientAPI.h
Are the files in the current working directory? We can't support C++ use, you'll have to figure this out yourself or use Python.
Hi,
I was using PyBullet to perform a simulation with a robot (from URDF) and everything was working. I decided to move to C++ since it is faster, but the same URDF cannot be loaded. The process dies as soon as I call loadURDF.
This is the code:
In addition, if I try to move to the GUI version, using
b3RobotSimulatorClientAPI.h
I am not able to compile because it is not installed....