Comments (10)
Solved! I was under the impression that FORCE joint drive type would make the PS::PxArticulationJointReducedCoordinate_setDriveTarget_mut(joint, axis, target, true); drive towards a "FORCE" target. But now I understand that it's just a normal position.
So using the type FORCE works, spring and damper and all. Could maybe have been explained a little better in the docs, considering the complexity. But when the end is good everything is good, thanks!
from physx.
I am not sure - but I am sure that the drives work - please compare your setup to one of the snippets, e.g: https://github.com/NVIDIA-Omniverse/PhysX/blob/main/physx/snippets/snippetfixedtendon/SnippetFixedTendon.cpp#L126
This drive works.
from physx.
Differences from my code is:
- My code uses drive type TARGET
- I set the drive params before every step (in the snippet it's set once)
- Minor differences to how scene is created.
I'll try to make a minimal example to see if I can pinpoint it further.
from physx.
The target does nothing but hardcode to a fixed very large position gain and zero velocity gain: https://github.com/NVIDIA-Omniverse/PhysX/blob/main/physx/source/lowleveldynamics/src/DyFeatherstoneArticulation.cpp#L2644
And then set the drive to force mode. FYI we will deprecate this mode in 5.3.0.
from physx.
Oops I see the error. Setting drive params is not allowed while the simulation is running. But I need to set spring/damper dynamically or I'm just having the same speed of animation constantly, how can that be done?
Instead of the gains, you can also set the drive target position/velocity. Here for position: https://nvidia-omniverse.github.io/PhysX/physx/5.2.1/_build/physx/latest/class_px_articulation_joint_reduced_coordinate.html?highlight=setdrivetarget#_CPPv4N36PxArticulationJointReducedCoordinate14setDriveTargetEN18PxArticulationAxis4EnumEK6PxRealb
But those are also not allowed to be set during simulation. You need to update in-between simulation steps.
from physx.
The snippet updates the drive target, FWIW.
from physx.
Yes I do update in between simulation steps..how else can you update it? Maybe during some callback or something? (I don't use any callbacks)
from physx.
Ah ok so you want me to use force mode? I'm not sure, how can you drive a joint towards an orientation like that?
from physx.
Instead of the gains, you can also set the drive target position/velocity. Here for position: https://nvidia-omniverse.github.io/PhysX/physx/5.2.1/_build/physx/latest/class_px_articulation_joint_reduced_coordinate.html?highlight=setdrivetarget#_CPPv4N36PxArticulationJointReducedCoordinate14setDriveTargetEN18PxArticulationAxis4En
Am I not already doing that ?
S::PxArticulationJointReducedCoordinate_setDriveTarget_mut(joint, axis, target, true);
from physx.
Closing
from physx.
Related Issues (20)
- Position Based Dynamics: Set Particle Position and Velocity HOT 4
- TGS instability with drives HOT 4
- crush in PxContactStreamIterator getFaceIndex0 when GPU enabled and contact with custom geometry or mesh HOT 2
- PxRigidBodyExt::setMassAndUpdateInertia of kinematic rigid actor with triangle mesh causes: Assertion failed: mG.isFinite() HOT 2
- setting driveForceLimit does not work HOT 2
- SDF cause CUDA error , even black screen (driver crash)
- SDF cause CUDA error , even black screen (driver crash?) HOT 4
- Increasing Damping ingnores ForceLimit of PxD6 Joint HOT 9
- PxCustomGeometryExt::BaseConvexCallbacks::raycast doesn't report back which fields are valid HOT 2
- Trigger emulation and character controller HOT 3
- Crash inside SAP Broad phase when there is too much collision pairs HOT 2
- issue with getting a center of mass
- Unable to compile with Clang - __m128 is not a structure or union HOT 3
- TGS solver does not support PxPairFlag::eNOTIFY_THRESHOLD_FORCE_... flags HOT 2
- Blast build for Visual Studio 2022
- I can not link physx 5.3.0 library from vcpkg into my project HOT 3
- Static contact forces are not correct on inclined plane HOT 5
- linux - cannot build libraries (error: 'src' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]) HOT 9
- Bad task scheduling due to lack of priority HOT 2
- How to read data from Flow HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from physx.