Giter Club home page Giter Club logo

Comments (10)

mlp1802 avatar mlp1802 commented on June 24, 2024 1

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.

preist-nvidia avatar preist-nvidia commented on June 24, 2024

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.

mlp1802 avatar mlp1802 commented on June 24, 2024

Differences from my code is:

  1. My code uses drive type TARGET
  2. I set the drive params before every step (in the snippet it's set once)
  3. 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.

preist-nvidia avatar preist-nvidia commented on June 24, 2024

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.

preist-nvidia avatar preist-nvidia commented on June 24, 2024

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.

preist-nvidia avatar preist-nvidia commented on June 24, 2024

The snippet updates the drive target, FWIW.

from physx.

mlp1802 avatar mlp1802 commented on June 24, 2024

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.

mlp1802 avatar mlp1802 commented on June 24, 2024

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.

mlp1802 avatar mlp1802 commented on June 24, 2024

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.

mlp1802 avatar mlp1802 commented on June 24, 2024

Closing

from physx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.