Giter Club home page Giter Club logo

unity_ur3_levenberg-marquardt_ik's Introduction

Unity UR3 Levenberg-Marquardt Inverse Kinematics

In this project, an Inverse Kinematics based on the Levenberg-Marquardt method was implemented. The Unity game engine was used as the simulation environment and the programming language Python was used to implement the algorithm. In order to implement the result, the ZeroMQ library for both Python and C# in Unity was chosen. Thus, the communication is implemented using TCP/IP where Python is the Server and Unity is the Client.

The actual demonstration is then implemented in Python where five targets are selected both their rotational and translational part. The scripts can be very easily modularized and used to solve a simulation of a problem. For deployment in reality, it is then necessary to complete the communication with the robot.

Software
------------------------------------
| Unity version 2022.1.16f1
|   - NuGetForUnity version 3.0.5
| Python version 3.10
|   - Poetry version 1.2.1
| ZeroMQ

How to start the simulation demo?

In the Unity project section, you can download the Robot.unitypackage, when you download it and then run it in an open window, you will see a menu to import it into your project. It is also an integral part of the NetMQ library assignment.

  1. Option - As part of the project I downloaded NuGetForUnity. Its installation can be easily handled by following the steps:

    Link: https://github.com/GlitchEnzo/NuGetForUnity#how-do-i-install-nugetforunity

    Then, following the instructions in the repository, download the NetMQ nuget package and the Unity part is ready.

    I have also added the necessary files and libraries to the repository, which you can simply add to your project by exploring the Assets folder. Personally, I strongly recommend using Robot.unitypackage due to the fact that you need to load a script Joint.cs for each joint in your project and add rigibody and boxcollider for collision detection. Everything is stored in the OutdoorScene.

  2. Option - The alternative is to import the .dll libraries directly from Assets/Libraries.

The next part is Python, additional libraries were used in the project, so if you use Poetry, you can easily get everything, if you use PIP, Conda or other package manager, just get the libraries from pyproject.toml.

โ— Run Python first

โ— Run Unity second

Collision Detection

Collision detection was also provided within this project, if a collision occurs the movement is stopped and it is written to the Unity Console what joint was detected in the collision. You can see an example in the GIF. The same are included self collision.

Demo Example

The demo shows movement with and without collision detection. Within Unity, you can simply pin or unpin a cube in the GameObject Cube checkbox.

Demo

Finally, it should be mentioned that this is a project that has implemented simple Request / Response communication.

unity_ur3_levenberg-marquardt_ik's People

Contributors

steigner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.