Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Directional Friction and Skid Steer

Discussion in 'Robotics' started by MetroRobots, Feb 11, 2022.

  1. MetroRobots

    MetroRobots

    Joined:
    Jan 11, 2022
    Posts:
    8
    I'm working on a skid steer robot. It moves forward and backward just fine, but attempting to get it to turn is tricky. It won't turn unless you turn the velocities up very high.

    Gazebo has methods for simulating different friction constants for different directions. Could the existing properties in Physic Material for Dynamic/Static friction be used? I found this reference to directional friction maybe being removed from Unity.

    Is there another way to get the wheels of my robot to turn properly?
     
  2. MetroRobots

    MetroRobots

    Joined:
    Jan 11, 2022
    Posts:
    8
  3. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    597
    Unfortunately, the anisotropic friction option was removed in PhysX 3.x many years ago, and there isn't something that comes as a 100% substitute yet.

    One of the approaches that I saw working in the user base would be a custom script that applies forces or torques to steer depending on the current linear velocity and the steer angle. Quite easy to tweak to get the expected behaviour compared to what we used to have as anisotropic friction.

    Hope that helps.
     
  4. MetroRobots

    MetroRobots

    Joined:
    Jan 11, 2022
    Posts:
    8
    Can you point me to the custom script from the user base?
     
  5. mig_seixas

    mig_seixas

    Joined:
    Jul 30, 2021
    Posts:
    2
    I'm working in a project using a diff/skid robot on unity, I make it working using a script like diff controller from ROS. I encountered the same problem, the robot only go to front and back, no turn, I figured out we need to configure your rigidbody.inertiaTensor.

    Code (CSharp):
    1. public Rigidbody rb;
    2.  
    3. void Start(){
    4.             rb.inertiaTensor = tensor; //Vector3
    5.             rb.centerOfMass=centerOfMass.transform.localPosition;
    6. }
     
  6. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59
    Rebuilding instead of importing is a good options. Setting the inertia to a fix value is a good option as well.