our scene is just one joint between 2 links (the child is dynamic). We managed to change the joint mode successfully from torque to passive mode and returned the joint position to zero using passive mode and disable the dynamics of the attached link. We have now this joint in passive mode and would like to enable the dynamics of the child link again to return the joint to torque mode (we used resetDynamicObject but did not work). How to do this? Thanks in advance. Noting that : we checked related posts and did not find any relevant answer.
our code
Code: Select all
sim.setModelProperty(link_handles[1],sim.modelproperty_not_dynamic)
print(sim.getModelProperty(link_handles[1]))
sim.setJointMode(joint_handles[i],sim.jointmode_passive,0)
sim.setJointPosition(joint_handles[i], 0)
sim.setJointMode(joint_handles[i],sim.jointmode_force,0)
sim.resetDynamicObject(sim_handle_all)
print(sim.getModelProperty(link_handles[1]))