Contributions are most welcome!
To develop a Blockchain based Decentralised Framework for a 2 - bot foraging system using V-rep and python. There will be two bots in the arena and they both are on the same blockchain network. They bot will be assigned fixed number of boxes to pick and place, BUT if they finish their own boxes they can go to help the other bot and pick other bot's boxes (<-main concept of swarm robotics). In the Result video below: Bot#1 which is faster is assigned blue boxes and bot#2 is assigned green boxes to pick and place. Bot#1 completes placing its boxes and then goes for Bot#2's box for picking and placing. All the bots interaction is through Blockchain and it is completely decentralized. PoW is used for mining the box(block in blockchain). The boxes kept are mined by other bot when it wants to help pick that box which was assigned to some other bot(It can get some amount as a result of a smart contract). Decentralization makes the whole process secure, consistent and fast.
In an arena where blocks are kept in random cells,relatively simpler bots come together to make collective decisions and forage all the blocks to a common place.
- vrep_scenes: Contain all files that are required to run Vrep locally and are required to be started before any next step.
- test_version_1: Contains python code to implement 2 bots ... server1/2 and client1/2 are used via sockets.
- display_blockchain: Contains 2 files: HTML and python that is used to visualize the blockchain in a web browser.
- communication: Contains files for communicating between Vrep and python script (zigserial) that gets the path for bot.
- client_server_files: Contains the client and server files for each of the two bots(It has addtional for 3rd bot also but it is not used in this project).
- botS: Contains files required for running bots in vrep enviornment.
- Blockchain code working(without vrep and segregation): Contains the code for client and server for bot 1 and bot 2 without vrep. One can test it seperately in this folder itself. Example: Step 1: Run server-1.py and server-2.py Step 2: Run client-1.py and client-2.py You can observer how blockchain is modified at each step after box pick and place.
- main: It contains all the files and folders collectively in one folder from which one can run the project directly.
Step 1: Fork the repo: https://github.com/jhavinit/Blockchain_Swarm_Robotics
Step 2: Go inside /main directory in your system (All the files required to run the project are inside "main" folder)
Step 3: Install Vrep v_3.6.1 (Tested in ubuntu 16.04 LTS)
Step 4: Make sure to have python > 3.5.4 and a text editor for editing C, C++ (gedit) and python files(IDLE py:3.5.4)
Step 5: Make the virtual serial ports for 2 bots (4 terminals in total) (Refer Medium article for setting virtual port: [https://medium.com/@karthiks1701/virtual-serial-ports-hack-for-communication-between-local-scripts-883fda0f60f])
Step 6: Open the scene in Vrep: Go to vrep and open scene (filename: dual_bot.ttt or fin_rep.ttt(recommended))
Step 7: Run server-1.py and server-2.py
Step 8: Run the cpp exe files that are in the debug folder of ebot1 and ebot2
Step 9: Run the main-1.py and main-2.py
Step 10: One can observe the results in the Vrep