Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bullet] Demo Test without wheel_slip_plugin #207

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bullet/src/JointFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ double JointFeatures::GetJointPosition(
if (this->joints.find(_id.id) != this->joints.end())
{
const JointInfoPtr &jointInfo = this->joints.at(_id.id);
// igndbg << "Child: " << jointInfo->childLinkId << " Father: " << jointInfo->parentLinkId << std::endl;
const int jointType = jointInfo->constraintType;
// Check the type of joint and act accordignly
if (jointInfo->constraintType ==
Expand All @@ -54,7 +55,14 @@ double JointFeatures::GetJointPosition(
ignerr << "Not a valid constrating type: " << jointType << "\n";
}
}
igndbg << "Position: " << _id.id << " -> " << result << std::endl;
// igndbg << "Position: " << _id.id << " -> " << result << std::endl;
// const JointInfoPtr &jointInfo = this->joints.at(_id.id);
// btTransform transP, transC;
// this->links.at(jointInfo->parentLinkId)->link->getMotionState()->getWorldTransform(transP);
// this->links.at(jointInfo->childLinkId)->link->getMotionState()->getWorldTransform(transC);
// btScalar x, y, z;
// (transP.inverse() * transC).getRotation().getEulerZYX(z,y,x);
// igndbg << "TF: " << y << std::endl;
return result;
}

Expand Down
5 changes: 3 additions & 2 deletions bullet/src/SDFFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ Identity SDFFeatures::ConstructSdfCollision(
const auto &odeFriction = surfaceElement->GetElement("friction")
->GetElement("ode");
const auto mu = odeFriction->Get<btScalar>("mu");
const auto mu2 = odeFriction->Get<btScalar>("mu2");

// Get restitution
// const auto restitution = surfaceElement->GetElement("bounce")
Expand All @@ -263,8 +264,8 @@ Identity SDFFeatures::ConstructSdfCollision(

// shape->setMargin(btScalar(0.0001));

body->setFriction(mu * 10);
body->setAnisotropicFriction(btVector3(1, 1, 1),
body->setFriction(1);
body->setAnisotropicFriction(btVector3(mu, mu2, 1),
btCollisionObject::CF_ANISOTROPIC_FRICTION);

dynamic_cast<btCompoundShape *>(body->getCollisionShape())->addChildShape(baseTransform, shape);
Expand Down