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

Question Collection of general settings for ArticulationBodys

Discussion in 'Robotics' started by ActiveSim, May 25, 2022.

  1. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59
    [Edit] Update from the discussion on this page:
    • Exchange a model by using the UnityPackages
    • Compare the following files in ProjectSettings:
      • DynamicsManager.asset
      • TimeManager.asset
      using sphere collider instead of cylinder on the wheels helped me a lot
    • Avoid collision of multiple collider
    • Avoid importing models with collider, generate them in Unity instead
    -----------------------------------------------------------------------------------------------------------------

    Exporting the turtelbot3 from the Nav2SlamExample and imported it into my current project, the behavior of the robot is quit different, even all model values are the same (including stiffness, damping, force limit and target velocity values of the ArticulationBody from the wheels).

    So my question is: Which general parameters have an impact on the robot behavior?

    The parameters of Project Settings --> Physics have an impact. Are there any other parameters that I should consider? The behavior isn't still the same. upload_2022-5-25_11-28-35.png
     
    Last edited: Jul 15, 2022
  2. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59
    Changing the Fixed Timestep in the Project Settings makes a huge difference (but why?) but the car is still very unstable when I just want to drive on a straight line and the Nav2Slam project still has a bigger inertia. The contact between the wheel and the floor does not seem to be very real.
     
    Last edited: May 25, 2022
  3. LaurieUnity

    LaurieUnity

    Unity Technologies

    Joined:
    Oct 23, 2020
    Posts:
    77
    The Fixed Timestep makes a difference because that determines the resolution of the physics simulation - simulating 100 timesteps per second gives a much more accurate simulation than, say, 10 timesteps per second.
    You'll also want to set Solver Type (near the bottom of your screenshot) to Temporal Gauss Seidel. This helps prevent erratic behavior in the ArticulationBody joints.
     
  4. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59
    Aren't there any other parameters? The turtlebot still doesn't move in the same way.
    I increased the mass by a factor of 100. The robot is very stable now but much too slow. Increasing the force limit doesn't lead to the required speed as well.
     
    Last edited: May 30, 2022
  5. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    597
    I'm getting it that you've taken turtlebot from one project (where it worked) into another project (where it doesn't work). There are a couple ideas that I would consider:

    1) Most of the simulation-related properties are stored in a text file (DynamicsManager.asset), Simulation frequency depends on the fixed delta time that is configured in TimeManager.asset. You can use any diff tool to compare them across projects.

    2) In cases like this one, it often helps to go the other way around: start from the project that works, and remove everything you don't need.

    3) Assuming that the data and simulation properties are the same, the difference must be in controllers then. Are both projects using the same controllers? Are they configured identical?

    4) Could you detail what goes by exporting turtlebot from one project to another? Did you create a .unitypackage? Any other way? Could it be that some dependencies are missing? Could it be that some meshes are missing?

    Anthony.
     
    ActiveSim likes this.
  6. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59
    • I made a Unitypackge from the turtlebot and imported in my current project. So the model should be the same
    • Then I wrote my own controller. Both controlelr manipulating the parameter targetVelocity, forceLimit and damping. I can see in the inspector, that the values are the same while running.
    • Looking for differences in the DynamicsManager.asset and TimeManager.asset helped a lot. In a first review it looks quit good. I will have a deeper one in the next days.
     
  7. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59
    I finally get the best results replacing the cylinder colliders on the wheels by sphere collider. I will close that ticket now.
    Thanks a lot or your help @LaurieUnity and @yant. See you soon at the next question :-D
     
  8. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59
    While getting everything fine in the editor I figured out, that it is quit different in the build. The issue looks quite the same as it was at the beginning of this story. The car is very unstable when I just want to drive on a straight line.

    So again the question: which general settings of the articulation bodies do i need to change to get the same behavior in the editor as well as in the build?
     
  9. ActiveSim

    ActiveSim

    Joined:
    May 10, 2019
    Posts:
    59