Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question ArticulationBody and wheel colliders

Discussion in 'Physics' started by mikeNspired, Feb 3, 2023.

  1. mikeNspired

    mikeNspired

    Joined:
    Jan 13, 2016
    Posts:
    79
    Is this a possibility?
    I am using articulationBodies on some equipment, but now the equipment needs to be on a vehicle.
    When I switched the vehicle from a normal RigidBody to an ArticulationBody, the vehicle just falls through the floor till it hits the equipment.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,428
    As far as I know the articulation body must be attached to the Rigidbody using an standard joint.
     
    mikeNspired likes this.
  3. mikeNspired

    mikeNspired

    Joined:
    Jan 13, 2016
    Posts:
    79
    Damn, that does not seem to work. The moment I use any joint from a normal rigid body. The physics system starts acting like I am setting transform positions and colliders are no longer behaving correctly.
     
  4. leebissessar5

    leebissessar5

    Joined:
    Nov 15, 2022
    Posts:
    48
    Why not just make the whole thing an ArticulationBody?

    Just make the wheels a revolute joint with no constraints and you should be fine. I did that to implement a Mars rover and it worked out nicely. Also attach an appropriate collider (capsule or sphere) so it wouldn't sink through the ground.
     
  5. mikeNspired

    mikeNspired

    Joined:
    Jan 13, 2016
    Posts:
    79
    Interesting Idea, i'll give it a shot thanks.
     
  6. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    577
    At the time I write this, ArticulationBody won't directly work with the WheelCollider, unfortunately.

    Our current go-to approach for the wheeled robots is to have them all built within the articulation paradigm really. That is also modelling wheels as colliders and letting them roll & drive the whole thing. This is not without a few issues, of course. Namely, you'd have to use primitive colliders for the wheels if you target accuracy. Another is, PhysX 4 doesn't really have a model for rolling friction at all. What we have is the regular static/dynamic friction model which can only be valid for the wheels at fairly low speeds and loads. But then again, that's what we saw fit for a lot of the AMRs on the market right now.

    An alternative approach could be to have a vehicle configured with the WheelCollider and Rigidbody, then adding a FixedJoint to link to an ArticulationBody hierarchy for your equipment. These hierarchies must be separate, it's super important!
     
    leebissessar5 and mikeNspired like this.