mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-06-13 18:59:11 +00:00
Allow to compile pybullet using btDiscreteDynamicsWorld (no multibodies and no deformables), this allows to create Jacobian and Mass matrix (and A=J*M-1*J_transpose) with MLCP solvers
Add examples/pybullet/gym/pybullet_utils/readwriteurdf.py, this allows to read a URDF and write the URDF with more reasonable inertia tensors (based on mass and collision volumes)
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
#include "PhysicsDirectC_API.h"
|
||||
#include "PhysicsClientC_API.h"
|
||||
#include "PhysicsServerSharedMemory.h"
|
||||
#include <stdio.h>
|
||||
#ifdef _WIN32
|
||||
#define safe_printf _snprintf
|
||||
#else
|
||||
#define safe_printf snprintf
|
||||
#endif
|
||||
struct MyMotorInfo2
|
||||
{
|
||||
btScalar m_velTarget;
|
||||
@@ -655,7 +661,7 @@ void PhysicsClientExample::createButtons()
|
||||
if (m_numMotors < MAX_NUM_MOTORS)
|
||||
{
|
||||
char motorName[1026];
|
||||
snprintf(motorName, sizeof(motorName), "%s q", info.m_jointName);
|
||||
safe_printf(motorName, sizeof(motorName), "%s q", info.m_jointName);
|
||||
// MyMotorInfo2* motorInfo = &m_motorTargetVelocities[m_numMotors];
|
||||
MyMotorInfo2* motorInfo = &m_motorTargetPositions[m_numMotors];
|
||||
motorInfo->m_velTarget = 0.f;
|
||||
|
||||
Reference in New Issue
Block a user