Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Mixing oldschool and Articulation joints in a games context

Discussion in 'Robotics' started by TLouck, Apr 27, 2023.

  1. TLouck

    TLouck

    Joined:
    Jun 1, 2017
    Posts:
    2
    I've been working on a nonprofessional VR project involving lots of jointed physics contraptions (stuff like holding a floppy object in one hand and moving the end of a prismatic joint on that object with the other hand). Up until today I was doing this with the oldschool solvers and some scripting to (try to) maintain stability, but I've been finding these joints pretty hard to work with and keep stable. I'm currently converting some of my stuff to articulation bodies to see if they're better, and running into some issues.

    The question: I want to push around an end effector (if that's the right term) with a traditional joint, but because the articulation body component, according to an error message, derives from and must replace a traditional rigidbody, and because the traditional joints accept only traditional rigidbodies as their connected body, this is not allowed. What's the problem here that makes this a no-go?

    I could re-implement these joints "in my own words" using the portion of the articulation body API that appears to be identical to/derived from a normal rigidbody, but I would like to avoid "re-implement the ConfigurableJoint" as a predicate to adopting articulation bodies in this context.
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,823
    Maybe you need to look into IK solvers.
    I am not sure if I fully understand you problem, but I suggest you investigate following, and see, if any fits your purpose:
    Simple IK solver
    Simple IK + CCD
    BioIK

    There are many others too, but some are for few $, some solvers are free accessible on git.
     
  3. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59
    In the end they are based on different physical calculations so mixing is not possible. Articulation bodies are based on physics articulations and joints are based on ridigbodies.

    "The main purpose of physics articulations is to provide a realistic physics behavior for commercial and industrial non-gaming applications that involve joints. For example, they make it a lot easier than the regular Joints to simulate robotic arms and kinematic chains."
    https://docs.unity3d.com/Manual/physics-articulations.html
     
    Last edited: Apr 27, 2023
  4. TLouck

    TLouck

    Joined:
    Jun 1, 2017
    Posts:
    2
    That's actually what's bugging me here, articulation bodies implement, as far as I can see, every single public member present on normal rigidbodies. If I had the source, it feels like I could copy the code for one of the oldschool joints and swap all references of rigidbody to articulation body, and it would run and do what I'm looking for. I understand this is not what these components were designed to do, so I have to assume there's something much more complicated than what I can see that makes this not work.
     
    Last edited: Apr 27, 2023