expose b3PhysicsParamSetNumSolverIterations
split Visual Studio project generation batch file in regular and VR+pybullet+double precision build. disable KUKA iiwa joint limit hack
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
|
||||
IF NOT EXIST bin mkdir bin
|
||||
IF NOT EXIST bin\openvr_api.dll copy examples\ThirdPartyLibs\openvr\bin\win32\openvr_api.dll bin
|
||||
|
||||
cd build3
|
||||
premake4 --enable_openvr --targetdir="../bin" vs2010
|
||||
|
||||
rem premake4 --double --enable_pybullet --python_include_dir="C:/Python-3.5.2/include" --python_lib_dir="C:/Python-3.5.2/libs" --enable_openvr --targetdir="../bin" vs2010
|
||||
pause
|
||||
premake4 --targetdir="../bin" vs2010
|
||||
start vs2010
|
||||
|
||||
8
build_visual_studio_vr_pybullet_double.bat
Normal file
8
build_visual_studio_vr_pybullet_double.bat
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
IF NOT EXIST bin mkdir bin
|
||||
IF NOT EXIST bin\openvr_api.dll copy examples\ThirdPartyLibs\openvr\bin\win32\openvr_api.dll bin
|
||||
|
||||
cd build3
|
||||
|
||||
premake4 --double --enable_openvr --enable_pybullet --python_include_dir="C:/Python-3.5.2/include" --python_lib_dir="C:/Python-3.5.2/libs" --targetdir="../bin" vs2010
|
||||
start vs2010
|
||||
@@ -174,7 +174,7 @@
|
||||
<child link="lbr_iiwa_link_4"/>
|
||||
<origin rpy="1.57079632679 0 0" xyz="0 0 0.2155"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="300" lower=".29439510239" upper="2.09439510239" velocity="10"/>
|
||||
<limit effort="300" lower="-2.09439510239" upper="2.09439510239" velocity="10"/>
|
||||
<dynamics damping="0.5"/>
|
||||
</joint>
|
||||
<link name="lbr_iiwa_link_4">
|
||||
|
||||
@@ -145,6 +145,15 @@ int b3PhysicsParamSetRealTimeSimulation(b3SharedMemoryCommandHandle commandH
|
||||
return 0;
|
||||
}
|
||||
|
||||
int b3PhysicsParamSetNumSolverIterations(b3SharedMemoryCommandHandle commandHandle, int numSolverIterations)
|
||||
{
|
||||
struct SharedMemoryCommand* command = (struct SharedMemoryCommand*) commandHandle;
|
||||
b3Assert(command->m_type == CMD_SEND_PHYSICS_SIMULATION_PARAMETERS);
|
||||
command->m_physSimParamArgs.m_numSolverIterations = numSolverIterations;
|
||||
command->m_updateFlags |= SIM_PARAM_UPDATE_NUM_SOLVER_ITERATIONS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int b3PhysicsParamSetTimeStep(b3SharedMemoryCommandHandle commandHandle, double timeStep)
|
||||
{
|
||||
struct SharedMemoryCommand* command = (struct SharedMemoryCommand*) commandHandle;
|
||||
|
||||
@@ -101,6 +101,9 @@ int b3PhysicsParamSetTimeStep(b3SharedMemoryCommandHandle commandHandle, double
|
||||
int b3PhysicsParamSetDefaultContactERP(b3SharedMemoryCommandHandle commandHandle, double defaultContactERP);
|
||||
int b3PhysicsParamSetNumSubSteps(b3SharedMemoryCommandHandle commandHandle, int numSubSteps);
|
||||
int b3PhysicsParamSetRealTimeSimulation(b3SharedMemoryCommandHandle commandHandle, int enableRealTimeSimulation);
|
||||
int b3PhysicsParamSetNumSolverIterations(b3SharedMemoryCommandHandle commandHandle, int numSolverIterations);
|
||||
|
||||
|
||||
|
||||
b3SharedMemoryCommandHandle b3InitStepSimulationCommand(b3PhysicsClientHandle physClient);
|
||||
|
||||
|
||||
@@ -1944,6 +1944,10 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm
|
||||
}
|
||||
|
||||
}
|
||||
if (clientCmd.m_updateFlags&SIM_PARAM_UPDATE_NUM_SOLVER_ITERATIONS)
|
||||
{
|
||||
m_data->m_dynamicsWorld->getSolverInfo().m_numIterations = clientCmd.m_physSimParamArgs.m_numSolverIterations;
|
||||
}
|
||||
if (clientCmd.m_updateFlags&SIM_PARAM_UPDATE_NUM_SIMULATION_SUB_STEPS)
|
||||
{
|
||||
m_data->m_numSimulationSubSteps = clientCmd.m_physSimParamArgs.m_numSimulationSubSteps;
|
||||
@@ -3351,7 +3355,7 @@ void PhysicsServerCommandProcessor::stepSimulationRealTime(double dtInSec)
|
||||
{
|
||||
btScalar desiredVelocity = 0.f;
|
||||
btScalar desiredPosition = q_new[link];
|
||||
motor->setRhsClamp(gRhsClamp);
|
||||
//motor->setRhsClamp(gRhsClamp);
|
||||
//printf("link %d: %f", link, q_new[link]);
|
||||
motor->setVelocityTarget(desiredVelocity,1.0);
|
||||
motor->setPositionTarget(desiredPosition,0.6);
|
||||
|
||||
Reference in New Issue
Block a user