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. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Is there a way to add a target to follow for an arm using Inverse Kinematics?

Discussion in 'Robotics' started by jasmeet-ty, Jan 17, 2022.

  1. jasmeet-ty

    jasmeet-ty

    Joined:
    Jul 20, 2021
    Posts:
    4
    Hi,
    So I have imported an arm in unity using URDF Importer. Now, I wanted to add a target object for the end effector to follow in the scene.
    Is it possible to have all the inverse kinematics calculations for the arm joint angles done in unity without any communication to ROS?

    I am not able to find any resources regarding this for Articulation Bodies. I have found a project that generates a native plugin of ikfast for ik calculations for Rigid Bodies & wanted to know if there is a better way to do so for Articulation Bodies. I have found that PhysX supports inverse dynamics. Will it be useful in this scenario somehow? If yes, how would one go about developing that? Any resources will be useful.

    Thank You
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,489
    You probably want to use one of IK solutions from Asset Store. There are some also available in github. For just articulation of the arm, you have just few DOF. Fast IK is doable, but there are few more solutions, which you may be interested to investigate. We had some threads, discussing differences between various approaches. But ou need to search forum. BioIK Iis one of them too.
     
  3. jasmeet-ty

    jasmeet-ty

    Joined:
    Jul 20, 2021
    Posts:
    4
    @Antypodish Thank you for your reply! I did some research on BioIK and it seems like a great package for ik but unfortunately I won't be able to use it as of now since it is paid. I am trying to find and explore other free alternatives. I tried importing Fast IK in my project but it doesn't seem to work with the latest version of unity editor which I am using.
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,489
    Problem with fast IK, it may not be enough accurate for robotic manipulator.
    You may need to fix the code.
    However, there is nothing special about fast IK, related to Unity libraries. Should just work.

    Alternatively, look on github for fast IK, or FABRIK.
     
  5. medinafb01

    medinafb01

    Joined:
    Feb 1, 2021
    Posts:
    14
  6. Ivan_br

    Ivan_br

    Joined:
    Nov 10, 2015
    Posts:
    29
    Concerning BioIK, there are also these two options:
    Older version of BioIK on github - https://github.com/sebastianstarke/BioIK
    Modified BioIK in C++ - https://github.com/TAMS-Group/bio_ik

    There is also FinaIK, but it is more expensive - https://assetstore.unity.com/packages/tools/animation/final-ik-14290

    Take a look at the Ros-Reality project. The project uses VR controllers to control the position of robotic arms, so they probably used IK in some way and you can probalby use part of their code - https://github.com/h2r/ros_reality

    Note that Ros-Reality this isn't compatible with Unity's ROS-TCP-Endpoint/Connector, I believe they used ROS# to get Unity and ROS to work, which was before Unity had created these libraries.

    I hope that helps.