Skip to content
Open
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
36 changes: 18 additions & 18 deletions src/physx/articulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,41 +359,41 @@ PhysxArticulation::getLinkIncomingJointForces() {
}

Pose PhysxArticulation::getRootPose() {
// if (getRoot()->isUsingDirectGPUAPI()) {
// throw std::runtime_error("getting root pose is not supported in GPU simulation.");
// }
if (getRoot()->isUsingDirectGPUAPI()) {
logger::warn("getting root pose may yields unsynchronized CPU data in GPU simulation.");
}
Comment on lines +362 to +364
Comment on lines +362 to +364
return PxTransformToPose(mPxArticulation->getRootGlobalPose());
}
Vec3 PhysxArticulation::getRootLinearVelocity() {
// if (getRoot()->isUsingDirectGPUAPI()) {
// throw std::runtime_error("getting root velocity is not supported in GPU simulation.");
// }
if (getRoot()->isUsingDirectGPUAPI()) {
logger::warn("getting root linear velocity may yield unsynchronized CPU data in GPU simulation.");
}
Comment on lines +368 to +370
return PxVec3ToVec3(mPxArticulation->getRootLinearVelocity());
}
Vec3 PhysxArticulation::getRootAngularVelocity() {
// if (getRoot()->isUsingDirectGPUAPI()) {
// throw std::runtime_error("getting root velocity is not supported in GPU simulation.");
// }
if (getRoot()->isUsingDirectGPUAPI()) {
logger::warn("getting root angular velocity may yield unsynchronized CPU data in GPU simulation.");
}
Comment on lines +374 to +376
return PxVec3ToVec3(mPxArticulation->getRootAngularVelocity());
}

void PhysxArticulation::setRootPose(Pose const &pose) {
// if (getRoot()->isUsingDirectGPUAPI()) {
// throw std::runtime_error("setting root pose is not supported in GPU simulation.");
// }
if (getRoot()->isUsingDirectGPUAPI()) {
throw std::runtime_error("setting root pose is illegal in GPU simulation.");
}
Comment on lines +381 to +383
Comment on lines +381 to +383
mPxArticulation->setRootGlobalPose(PoseToPxTransform(pose));
syncPose();
}
void PhysxArticulation::setRootLinearVelocity(Vec3 const &v) {
// if (getRoot()->isUsingDirectGPUAPI()) {
// throw std::runtime_error("setting root velocity is not supported in GPU simulation.");
// }
if (getRoot()->isUsingDirectGPUAPI()) {
throw std::runtime_error("setting root linear velocity is illegal in GPU simulation.");
}
Comment on lines +388 to +390
Comment on lines +388 to +390
mPxArticulation->setRootLinearVelocity(Vec3ToPxVec3(v));
}
void PhysxArticulation::setRootAngularVelocity(Vec3 const &v) {
// if (getRoot()->isUsingDirectGPUAPI()) {
// throw std::runtime_error("setting root angular is not supported in GPU simulation.");
// }
if (getRoot()->isUsingDirectGPUAPI()) {
throw std::runtime_error("setting root angular velocity is illegal in GPU simulation.");
}
Comment on lines +394 to +396
Comment on lines +394 to +396
mPxArticulation->setRootAngularVelocity(Vec3ToPxVec3(v));
}

Expand Down