Moderators: Sascha Willems, walaber
newtonSkeletonContainer = NewtonSkeletonContainerCreate (world, bodies[HIP], 0);
NewtonSkeletonSetSolverMode (newtonSkeletonContainer, 1);
int jointCount = 0;
NewtonJoint *jointArray[NUM_JOINTS];
for (int i=0; i<myJoints.size(); i++)
jointArray[jointCount++] = myJoints[i]->joint;
NewtonSkeletonContainerAttachJointArray (newtonSkeletonContainer, jointCount, jointArray);
//and after all the bone are added, the call
NewtonSkeletonContainerFinalize (newtonSkeletonContainer);
NewtonUserJointAddAngularRow(joint, 0.0f, &matrix0.m_front[0]);
NewtonUserJointSetRowStiffness(joint, joint_data->stiffness * Joint::STIFFNESS_RATIO);
dFloat rel_omega = (omega0 - omega1) % matrix0.m_front;
dFloat rel_accel = -cj_data->damp * rel_omega;
NewtonUserJointSetRowAcceleration(joint, rel_accel);
NewtonUserJointAddAngularRow(joint, 0.0f, &matrix0.m_front[0]);
NewtonUserJointSetRowStiffness(joint, joint_data->stiffness);
NewtonUserJointSetRowMinimumFriction(joint, -cj_data->damp);
NewtonUserJointSetRowMaximumFriction(joint, cj_data->damp);
AntonSynytsia wrote:The problem was that hinge joints were not rotatable when enchanted with the skeleton container. The reason to unrotatable joints is that my joints used the deceleration technique for damping:
When I switched the damping code to use the min/max friction technique, the joints became rotatable:
It would be nice however if the hinge joints were rotatable when controlled with my original damping technique.
void NewtonSkeletonSetSolverMode(NewtonSkeletonContainer* const skeletonPtr, int hardJointMotors)
Regardless of the chain of mass, joints don't tilt downward as they did in the previous video, which resembles excellent results of the skeleton container. There is one problem however. It's easy to stretch joints with low mass, but quite uneasy to stretch joints with higher mass. From the observation, it seems that the skeleton container is only stiffening the angular rows, but not the linear rows.
Another problem comes in when the root body of the skeleton container is connected by a parent It seems that the skeleton container doesn't consider if the root body is connected by a parent joint....
Problem two could be also resolved by adding a parent body to the root joint, making the parent body static, and making that new parent body as the root body of the skeleton container
AntonSynytsia wrote:The pulling force is based upon your CalculatePickForceAndTorque function from physics utils.
Users browsing this forum: No registered users and 1 guest