add check for #dof of KUKA in VR demo
disable debug drawing again in VR demo
This commit is contained in:
@@ -3068,7 +3068,7 @@ void PhysicsServerCommandProcessor::stepSimulationRealTime(double dtInSec)
|
|||||||
m_data->m_dynamicsWorld->addMultiBodyConstraint(m_data->m_kukaGripperRevolute1);
|
m_data->m_dynamicsWorld->addMultiBodyConstraint(m_data->m_kukaGripperRevolute1);
|
||||||
m_data->m_dynamicsWorld->addMultiBodyConstraint(m_data->m_kukaGripperRevolute2);
|
m_data->m_dynamicsWorld->addMultiBodyConstraint(m_data->m_kukaGripperRevolute2);
|
||||||
|
|
||||||
if (kukaBody->m_multiBody)
|
if (kukaBody->m_multiBody && kukaBody->m_multiBody->getNumDofs()==7)
|
||||||
{
|
{
|
||||||
gripperBody->m_multiBody->setHasSelfCollision(0);
|
gripperBody->m_multiBody->setHasSelfCollision(0);
|
||||||
btVector3 pivotInParent(0, 0, 0.05);
|
btVector3 pivotInParent(0, 0, 0.05);
|
||||||
@@ -3204,7 +3204,7 @@ void PhysicsServerCommandProcessor::stepSimulationRealTime(double dtInSec)
|
|||||||
//if (0)
|
//if (0)
|
||||||
{
|
{
|
||||||
InternalBodyHandle* bodyHandle = m_data->getHandle(m_data->m_KukaId);
|
InternalBodyHandle* bodyHandle = m_data->getHandle(m_data->m_KukaId);
|
||||||
if (bodyHandle && bodyHandle->m_multiBody)
|
if (bodyHandle && bodyHandle->m_multiBody && bodyHandle->m_multiBody->getNumDofs()==7)
|
||||||
{
|
{
|
||||||
btMultiBody* mb = bodyHandle->m_multiBody;
|
btMultiBody* mb = bodyHandle->m_multiBody;
|
||||||
btScalar sqLen = (mb->getBaseWorldTransform().getOrigin() - gVRController2Pos).length2();
|
btScalar sqLen = (mb->getBaseWorldTransform().getOrigin() - gVRController2Pos).length2();
|
||||||
|
|||||||
@@ -703,13 +703,13 @@ bool CMainApplication::HandleInput()
|
|||||||
{
|
{
|
||||||
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
|
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
|
||||||
///todo(erwincoumans) can't use reguar debug drawer, because physics/graphics are not in sync
|
///todo(erwincoumans) can't use reguar debug drawer, because physics/graphics are not in sync
|
||||||
//so it can (and likely will) cause crashes
|
///so it can (and likely will) cause crashes
|
||||||
//add a special debug drawer that deals with this
|
///add a special debug drawer that deals with this
|
||||||
//gDebugDrawFlags = btIDebugDraw::DBG_DrawWireframe+btIDebugDraw::DBG_DrawContactPoints+
|
//gDebugDrawFlags = btIDebugDraw::DBG_DrawWireframe+btIDebugDraw::DBG_DrawContactPoints+
|
||||||
//btIDebugDraw::DBG_DrawConstraintLimits+
|
//btIDebugDraw::DBG_DrawConstraintLimits+
|
||||||
//btIDebugDraw::DBG_DrawConstraints
|
//btIDebugDraw::DBG_DrawConstraints
|
||||||
//;
|
//;
|
||||||
gDebugDrawFlags = btIDebugDraw::DBG_DrawConstraintLimits+ btIDebugDraw::DBG_DrawConstraints+btIDebugDraw::DBG_DrawContactPoints+btIDebugDraw::DBG_DrawFrames;
|
//gDebugDrawFlags = btIDebugDraw::DBG_DrawFrames;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user