diff --git a/README.rst b/README.rst index aea3fc8211a36589491d405281a5ace97ad8760b..90834db80a31037904e4c1c1bbb89182b63cfaea 100644 --- a/README.rst +++ b/README.rst @@ -11,6 +11,25 @@ Acknowledgement .. image:: docs/resources/IoP_Logo.png +Concept +------- + +This project aims to explore the following aspects: + +* Data-to-knowledge pipelines within the World Wide Lab +* Automated research data storage and management, especially meta data +* Continous multi-instance dynamics learning for Franka Emika Robot + +.. image:: diagrams/diagram.png + +Three instances of Franka Emika Robots are present within the RWTH Aachen University Cluster of Excellence Internet of Production. +To generate meaningful knowledge from data gather on these three instances--situtated at the Chair for Laser Technology (LLT), Chair for Machine Tools (WZL MT) and the Institute for Textile Technology (ITA)--automated data storage and management is required. +Thus, automated data generation procedures have been implemented and are conducted on each robot instances. Data is automatically tagged with meta data on pushed to NRW RDS by means of RWTH Aachen University `meta data platform coscine <https://coscine.rwth-aachen.de/p/iop-ws-a.iii-fer-wwl-demo-80937714/>`_. +This platform both provides the generated data (Trajectory Data resource) as well as imporant metadata such as the source code used for data generation and the universal unique identfier of the robot instance. +This data is used to train an inverse dynamics model of the robotic systems. Agents registered to a weight and biases sweep server continously get send new model hyperparameter sets from the sweep server, pull up to date data from NRW RDS and push well performing models back to NRW RDS (Inverse Dynamics Models resource) +Train models may be used at the participating institutions fully embracing the Data-to-knowledge pipeline demonstrated within the World Wide Lab. + +.. TODO Update this according to acutal deep learning implementation Setup ----- diff --git a/coscine_watchdog/coscine_client.py b/coscine_watchdog/coscine_client.py index c4518bb693b948e853af06f695559125be51c55e..ef949fb6e0ac4371c9e64ca50c7f9230b637e38a 100644 --- a/coscine_watchdog/coscine_client.py +++ b/coscine_watchdog/coscine_client.py @@ -13,6 +13,7 @@ import signal import sys # TODO create new coscine resource with new application profile once available +# TODO add git commit to data app = Flask(__name__) # Create a new Flask application diff --git a/diagram/diagram.png b/diagram/diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..590f5426b4deeba0099acc3645587e4cfed64b0f Binary files /dev/null and b/diagram/diagram.png differ diff --git a/diagram/diagram.py b/diagram/diagram.py index 500a425f5b28b21803a48af047ce51ce4df3fbb8..afb7894f382627d792d23cc3f58a070082849606 100644 --- a/diagram/diagram.py +++ b/diagram/diagram.py @@ -9,81 +9,87 @@ from diagrams.programming.language import Python, Cpp from diagrams.generic.storage import Storage from diagrams.onprem.vcs import Gitlab from diagrams.saas.chat import RocketChat +from diagrams.programming.framework import Flask -with Diagram("Franka Emika Robot World Wide Lab Demonstrator", show=False): +white = "white" +black = "#5b5a5c" +custom_color = "#ddcaed" - # Edge styles: dashed, dotted, solid, invis, bold, tapered - # dashed: publish subscribe - # dotted: RDM - # solid: request response - # bold: - # tapered: RDS interaction +with Diagram("Multi-instance Franka Emika Robot dynamics learning for digital shadows in the World Wide Lab", filename="diagram", show=False, direction="TB"): coscine = Custom("Metadata Platform", "./images/coscine.png") + + gitlab = Gitlab("IoP Team") + vcs = [] + watched = [] - rocket = RocketChat("IoP Chat") - watched.append(rocket) - - with Cluster("FER @ LLT"): - ferLLT = Custom("Robot", "./images/FER.png") - - with Cluster("FER @ WZL MT"): - ferWZL = Custom("Robot", "./images/FER.png") - - with Cluster("FER @ ITA"): - ferITA = Custom("Robot", "./images/FER.png") - - with Cluster("Edge Node"): - with Cluster("Docker Frankalockunlock"): - gitlab3 = Gitlab("IoP Team") - franka = Python("CLI for Franka Control") - watched.append(gitlab3) - with Cluster("Docker ROS"): - gitlab1 = Gitlab("IoP Team") - with Cluster("franka_autodynamics"): - taskController = Python("Task Controller") - motionGeneration = Python("Motion Generation") - motionExecution = Cpp("Motion Execution") - dataHandling = Python("Data Handling") - watched.append(gitlab1) - - franka >> Edge(color="", style="solid") >> taskController # label="Initialize Data Generation", - franka << Edge(color="", style="solid") << taskController # label="Data Generation Concluded (SIGTERM)", - taskController >> Edge(style="solid") >> motionGeneration # label="Plan Motion", - taskController << Edge(style="solid") << motionGeneration # label="Motion Concluded", - motionGeneration >> Edge(style="solid") >> [motionExecution, dataHandling] # label="Execute Motion", - motionExecution - Edge(style="dashed") - [ferLLT, ferWZL, ferITA] # libfranka interaction - [ferLLT, ferWZL, ferITA] - Edge(style="dashed") - dataHandling # libfranka interaction - [motionExecution, dataHandling] >> Edge(style="solid") >> motionGeneration # label="Execution Concluded", - - with Cluster("Docker Coscine"): - gitlab4 = Gitlab("IoP Team") - coscine_client = Python("Coscine Client") - watched.append(gitlab4) - - dataHandling >> Edge(style="solid") >> coscine_client # label="Send Data", - dataHandling << Edge(style="solid") << coscine_client # label="Sending Concluded", - - with Cluster("RWTH RDS"): + #rocket = RocketChat("IoP Chat") + #watched.append(rocket) + watched.append(gitlab) + + FERs = [] + + with Cluster("FER @ LLT") as c: + c.dot.graph_attr["fontcolor"] = white + c.dot.graph_attr["bgcolor"] = black + ferLLT = Custom("Robot", "./images/FER.png", fontcolor=white) + FERs.append(ferLLT) + + with Cluster("FER @ WZL MT") as c: + c.dot.graph_attr["fontcolor"] = white + c.dot.graph_attr["bgcolor"] = black + ferWZL = Custom("Robot", "./images/FER.png", fontcolor=white) + FERs.append(ferWZL) + + with Cluster("FER @ ITA") as c: + c.dot.graph_attr["bgcolor"] = black + c.dot.graph_attr["fontcolor"] = white + ferITA = Custom("Robot", "./images/FER.png", fontcolor=white) + FERs.append(ferITA) + + with Cluster("RWTH RDS") as c: + c.dot.graph_attr["bgcolor"] = custom_color storageTrajectory = Storage("Trajectory Data") storageModels = Storage("Models") - storageDocuments = Storage("Documents") - [watched.append(i) for i in [storageDocuments, storageModels, storageTrajectory]] - - coscine_client >> Edge(style="tapered") >> storageTrajectory # label="Upload Data", - - with Cluster("RWTH HPC / LLT Compute / KBSG Compute"): + #storageDocuments = Storage("Documents") + [watched.append(i) for i in [storageModels, storageTrajectory]]#, storageDocuments]] + + for fer in FERs: + with Cluster( + f"Edge Node @ {str(fer._cluster.label).split('@ ')[1]}"): + with Cluster("Docker Frankalockunlock"): + franka = Python("CLI for Franka Control") + vcs.append(franka) + with Cluster("Docker ROS"): + panda_autodynamics = Custom("Panda\nAutodynamics\nPackage", "./images/ros+python.png") + vcs.append(panda_autodynamics) + + franka >> Edge(color="", style="tapered") >> panda_autodynamics + panda_autodynamics - Edge(style="dashed") - fer # libfranka interaction + fer - Edge(style="dashed") - panda_autodynamics + + with Cluster("Docker Coscine"): + coscine_client = Flask("Coscine Client") + vcs.append(coscine_client) + + panda_autodynamics >> Edge(style="solid") >> coscine_client # label="Send Data", + panda_autodynamics << Edge(style="solid") << coscine_client # label="Sending Concluded", + + coscine_client >> Edge(style="solid") >> storageTrajectory # label="Upload Data", + + with Cluster("RWTH HPC / LLT Compute / KBSG Compute") as c: + c.dot.graph_attr["bgcolor"] = custom_color with Cluster("Docker"): - gitlab2 = Gitlab("IoP Team") framework = Custom("TF worker agent","./images/tf.png") - watched.append(gitlab2) + vcs.append(framework) storageTrajectory >> Edge(style="tapered") >> framework # label="Download Data", framework >> Edge(style="tapered") >> [storageTrajectory, storageModels] # label="Upload Data", - - wandb = Custom("Sweep server", "./images/wandb.png") - watched.append(wandb) + with Cluster("Weights and Biases Servers") as c: + c.dot.graph_attr["bgcolor"] = custom_color + wandb = Custom("Sweep server", "./images/wandb.png") + watched.append(wandb) wandb >> Edge(style="solid") >> framework # label="Run Concluded", wandb << Edge(style="solid") << framework # label="Start Run", @@ -91,3 +97,6 @@ with Diagram("Franka Emika Robot World Wide Lab Demonstrator", show=False): for element in watched: coscine - Edge(style="dotted") - element #label="RDM", + for element in vcs: + gitlab - Edge(style="dotted") - element + diff --git a/diagram/franka_emika_robot_world_wide_lab_demonstrator.png b/diagram/franka_emika_robot_world_wide_lab_demonstrator.png deleted file mode 100644 index e3317dc69e9f07317ce95cb1ba8a191ce6fdbb39..0000000000000000000000000000000000000000 Binary files a/diagram/franka_emika_robot_world_wide_lab_demonstrator.png and /dev/null differ diff --git a/diagram/images/Python-logo-notext.svg b/diagram/images/Python-logo-notext.svg new file mode 100644 index 0000000000000000000000000000000000000000..4013592e6a26da7652f0921d05ae02402b82d775 Binary files /dev/null and b/diagram/images/Python-logo-notext.svg differ diff --git a/diagram/images/python b/diagram/images/python new file mode 100644 index 0000000000000000000000000000000000000000..ae4d01108f1f951d18a037616167fddef37748cd Binary files /dev/null and b/diagram/images/python differ diff --git a/diagram/images/python.jpeg b/diagram/images/python.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..768d9af2580f03d50230306cf005a764455b9e10 Binary files /dev/null and b/diagram/images/python.jpeg differ diff --git a/diagram/images/ros+python.png b/diagram/images/ros+python.png new file mode 100644 index 0000000000000000000000000000000000000000..f4b29847a94aa71468b7312fb76ff0e7efd7c7f6 Binary files /dev/null and b/diagram/images/ros+python.png differ diff --git a/diagram/images/ros.png b/diagram/images/ros.png new file mode 100644 index 0000000000000000000000000000000000000000..1263c5d4e5798663f606cde2c47ad4c9f1976454 Binary files /dev/null and b/diagram/images/ros.png differ diff --git a/franka_lock_unlock/requirements.txt b/franka_lock_unlock/requirements.txt index 39f221ab94db999f3a893412170a9ce9f15bc559..8c7489b1c4380e029daacaaa58307d4034d90ac0 100644 --- a/franka_lock_unlock/requirements.txt +++ b/franka_lock_unlock/requirements.txt @@ -1,5 +1,5 @@ requests -rich +rich==13.6 black flake8 isort diff --git a/franka_lock_unlock/setup.py b/franka_lock_unlock/setup.py index 4e5213878b3367d39b30b1cafb42c39cd47df0fa..9f35ed8d2038ecc7017b4b3e004d4812ee752e63 100755 --- a/franka_lock_unlock/setup.py +++ b/franka_lock_unlock/setup.py @@ -6,7 +6,7 @@ setup( author='Leon Gorissen', author_email='leon.gorissen@llt.rwth-aachen.de', description='A tool to lock/unlock the Franka Emika Panda robot', - long_description=open('README.md').read(), + long_description=open('README.rst').read(), long_description_content_type='text/markdown', url='https://git-ce.rwth-aachen.de/llt_dpp/all/franka_wwl_demonstrator', packages=find_packages(),