AdaCore / Ada-SPARK-Crate-Of-The-Year

19 stars 2 forks source link

[2021][Cobot_Ada] Collaborative robot intended for interaction with humans in a shared space #10

Closed guillengap closed 2 years ago

guillengap commented 3 years ago

cobot_ada

cover-image

Purpose

The Cobot was invented in 1996 by J. Edward Colgate and Michael Peshkin. The purpose of this crate is to develop a collaborative robot intended for direct interaction with humans and within a shared space, or where humans and robots are in close proximity. Cobot safety may rely on lightweight construction materials, rounded edges, and inherent limitation of speed and force, or on sensors and software that ensures safe behavior. Since "Cobots" work closely with humans, then my purpose is to develop tools and hardware and software solutions with Alire and Ada to ensure this safe behavior, Eg:

test-image

Usage

In the repository you can find an example of a Robot Arm three degrees of freedom used to move a box or a rubber ball. The example was made with Ada and each servo is controlled through a potentiometer:

video

Design

electric-diagram

How does it works?

Raw_1 := UInt32 (Conversion_Value (Converter_1));
Conv_1 := Long_Float(Raw_1 * 1); -- 0 .. 4095 bits
Volts_1 := (Conv_1 * 0.0007326007326007326); -- 0 .. 3V, then 1.5V is 2048 bits
Pot_1 := (2.0+(((Volts_1*180.0)/3.0)*0.05));
Value_1 := Percentage (Pot_1);
Power_Control_1.Set_Duty_Cycle (Value_1);

The next steps will include:

Author

License

Fabien-Chouteau commented 3 years ago

Hi @guillengap this is a nice project.

I have two important comments:

guillengap commented 3 years ago

The instructions are clear in https://alire.ada.dev/docs/#publishing-your-projects-in-alire

However its also clear that I have a bug and there is no support for this issue:

PS C:\Users\Jupiter\Ada_Drivers_Library-master\arch\arm\stm32\driver_demos\ada_robot_arm> alr publish git+https://github.com/guillengap/cobot-ada.git 3deb156599c82a6688118149ecf1e7ecbe107603

Publishing assistant: step 1 of 6: Verify origin URL Success: Origin is of supported kind: GIT Success: Origin is hosted on trusted site: github.com

Publishing assistant: step 2 of 6: Verify GitHub infrastructure Success: User has a GitHub account: guillengap Success: User has forked the community repository Success: User's fork contains base branch: stable-1.1

Publishing assistant: step 3 of 6: Deploy sources Cloning into 'C:\Users\Jupiter\Ada_Drivers_Library-master\arch\arm\stm32\driver_demos\ada_robot_arm\alire\tmp\alr-vwmp.tmp'... remote: Enumerating objects: 200, done. remote: Counting objects: 100% (200/200), done. remote: Compressing objects: 100% (168/168), done. remote: Total 200 (delta 72), reused 32 (delta 2), pack-reused 0 Receiving objects: 100% (200/200), 6.66 MiB | 2.37 MiB/s, done. Resolving deltas: 100% (72/72), done. Not resetting hidden file - C:\Users\Jupiter\Ada_Drivers_Library-master\arch\arm\stm32\driver_demos\ada_robot_arm\alire\tmp\alr-vwmp.tmp.git Not resetting hidden file - C:\Users\Jupiter\Ada_Drivers_Library-master\arch\arm\stm32\driver_demos\ada_robot_arm\alire\tmp\alr-vwmp.tmp.git ERROR: Could not complete the publishing assistant: ERROR: Remote sources are missing the 'alire.toml' manifest file.

mhatzl commented 3 years ago

Your commit hash seems to be the problem. 3deb156599c82a6688118149ecf1e7ecbe107603

For this commit there is no alire.toml file so the error is valid I would say. Try 35793455dab9b18ae793972a29e7c975319d4c5f which is your latest one, or create a tag/release and use that one.

guillengap commented 2 years ago

Your commit hash seems to be the problem. 3deb156599c82a6688118149ecf1e7ecbe107603

For this commit there is no alire.toml file so the error is valid I would say. Try 35793455dab9b18ae793972a29e7c975319d4c5f which is your latest one, or create a tag/release and use that one.

Hi @mhatzl and @Fabien-Chouteau, I followed your advices ... and now I have a new issue: It seems that "alire" is compiling my project again and doesnt find many libraries from "Ada Drivers Library" ... I only uploaded my project that I had previously compiled from my PC with alire, ada and using the "ada drivers library" ... How do I solve this matter? Is it possible to call these libraries from the toml file and the github link of "ada drivers library"? (https://github.com/AdaCore/Ada_Drivers_Library)

.... Publishing assistant: step 4 of 6: Build release warn: Generating possibly incomplete environment because of missing dependencies ada_robot_arm.gpr:1:06: unknown project file: "../../../../../boards/stm32f429_discovery/stm32f429_discovery_full.gpr" ada_robot_arm.gpr:3:31: unknown project file: "../../../../../examples/shared/common/common.gpr" ada_robot_arm.gpr:8:32: unknown package or project "Stm32f429_Discovery_Full" ada_robot_arm.gpr:9:28: unknown project "Stm32f429_Discovery_Full" ada_robot_arm.gpr:16:29: "Stm32f429_Discovery_Full" is not an imported or extended project gprbuild: "ada_robot_arm.gpr" processing failed ERROR: Command ["gprbuild", "-gnatwU", "-j0", "-p", "-P", "ada_robot_arm.gpr"] exited with code 4 ERROR: Compilation failed. Not resetting hidden file - C:\Users\Jupiter\alr-trtz.tmp.git Not resetting hidden file - C:\Users\Jupiter\alr-trtz.tmp.git ERROR: Could not complete the publishing assistant: ERROR: Command ["alr", "--non-interactive", "build"] exited with code 1 PS C:\Users\Jupiter> alr publish git+https://github.com/guillengap/cobot-ada.git b8cba5883e95e00c2537db3a1f97486d0db158ca

mosteo commented 2 years ago

The build step is just a local double-check that you can skip with --skip-build. However, if it fails for you locally it will probably fail during the server-side checks on the GitHub community index.

guillengap commented 2 years ago

The build step is just a local double-check that you can skip with --skip-build. However, if it fails for you locally it will probably fail during the server-side checks on the GitHub community index.

Hi @mosteo thanks for your comment. I made some changes and it seems that everything is fine ... kind regards

Publishing assistant: step 6 of 6: Generate index manifest Success: Your index manifest file has been generated at .\alire\releases\cobot_ada-1.0.0.toml Note: Please upload this file to https://github.com/guillengap/alire-index/upload/stable-1.1/index/co/cobot_ada to create a pull request against the community index. Not resetting hidden file - C:\Users\Jupiter\alr-osoi.tmp.git Not resetting hidden file - C:\Users\Jupiter\alr-osoi.tmp.git PS C:\Users\Jupiter>

mgrojo commented 2 years ago

Hi @guillengap, Maybe you already know, and this tip is not needed, but I think a pull request to the upstream repository is missing, if you want the crate to enter the official Alire index.