diff --git a/README.md b/README.md index 62745e0..6e5bddc 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,10 @@ This GSoC Project focuses on adding a global block composition feature, resolvin - [Toshan Luktuke](https://github.com/toshan-luktuke) -**Official Repository:** [VisualCircuit](https://github.com/JdeRobot/VisualCircuit/) -**Github Issues**: [Summary](https://github.com/JdeRobot/VisualCircuit/issues?q=author%3ABkPankaj+) -**Pull Requests:** [Summary](https://github.com/JdeRobot/VisualCircuit/pulls?q=author%3ABkPankaj+) +**Official Repository:** [VisualCircuit](https://github.com/JdeRobot/VisualCircuit/)
+**Project Summary:** [Explore Summary](https://theroboticsclub.github.io/gsoc2024-Pankaj_Borade/summary/)
+**About:** [Explore About](https://theroboticsclub.github.io/gsoc2024-Pankaj_Borade/About/)
+**Github Issues**: [View Issues](https://github.com/JdeRobot/VisualCircuit/issues?q=author%3ABkPankaj+)
+**Pull Requests:** [See Pull Requests](https://github.com/JdeRobot/VisualCircuit/pulls?q=author%3ABkPankaj+)
Thank you for your interest, and feel free to reach out via email if you have any questions, comments, or suggestions. I hope you find my work engaging! diff --git a/docs/_config.yml b/docs/_config.yml index 2cecb78..964a0ea 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -99,7 +99,6 @@ defaults: author_profile: true read_time: true comments: true - share: true related: true # _pages - scope: diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml index 9dc4fd3..a6a04b9 100644 --- a/docs/_data/navigation.yml +++ b/docs/_data/navigation.yml @@ -39,6 +39,8 @@ docs: url: /coding-week10/ - title: "Coding Period - Week 11 & 12" url: /coding-week11-12/ + - title: "Coding Period - Week 13" + url: /coding-week13/ - title: "Project Summary" url: /summary/ \ No newline at end of file diff --git a/docs/_posts/2024-06-03-code-w1.md b/docs/_posts/2024-06-03-code-w1.md index 11ba717..11781f4 100644 --- a/docs/_posts/2024-06-03-code-w1.md +++ b/docs/_posts/2024-06-03-code-w1.md @@ -17,14 +17,14 @@ From here onwards Coding period begins, During the Monday meeting, mentors discu ## Accomplishment and Challenges -* #### First yaml file for Github Actions +* ### First yaml file for Github Actions First of all, it was my first time writing a YAML file for GitHub Actions. I used resources such as YouTube videos [1] and GitHub Actions documentation [2] to help me write the initial script. From the discussions, it was clear that testing should trigger when there is a pull request to the master branch, so I started with that and followed the VisualCircuit documentation for the frontend installation. First failure of coding period: ![one](../assets/images/one.png) -* #### Creating workflow for installation process +* ### Creating workflow for installation process The initial idea was to create a separate workflow for the installation process. This installation workflow would be reused for every test and other workflows. I worked on this and resolved the above issue by including '--legacy-peer-deps' at the end of the 'npm install' command. ```shell @@ -73,12 +73,12 @@ jobs: - name: Generate static files run: python backend/manage.py collectstatic ``` -* #### Research and modifying the workflow +* ### Research and modifying the workflow I reviewed some open source projects such as RocketChat and Volto by the Plone Foundation to understand the CI pipeline workflow. I realized that creating a separate workflow for installation is uncommon and not a best practice. Instead, I created a setup job and stored the results in artifacts for use in different tests (jobs). Initially, I encountered a "MODULE NOT FOUND" frontend error because I stored node modules in artifacts. Storing node modules in artifacts is not ideal since artifacts are typically used for build files. Stack Overflow and GitHub Actions documentation [3] suggested using Action Cache instead. After switching to Action Cache, the issue was resolved, and I proceeded to the next step of basic frontend testing. -* #### CI Workflow with basic frontend test +* ### CI Workflow with basic frontend test For basic frontend testing, I researched Jest and React testing frameworks commonly used for unit tests on the React side. I used prebuilt React tests and initially printed the rendered HTML in the terminal. Based on this, I identified the menubar elements and added a basic test to find and verify that the "File" text is present in the rendered App. CI Workflow tested in forked repo: diff --git a/docs/_posts/2024-06-10-code-w2.md b/docs/_posts/2024-06-10-code-w2.md index 75378a7..997529e 100644 --- a/docs/_posts/2024-06-10-code-w2.md +++ b/docs/_posts/2024-06-10-code-w2.md @@ -17,23 +17,23 @@ Welcome to the second week of Coding Week progress. In the Monday meeting, we di ## Accomplishment and Challenges -* #### Learning tools for Automation - Selenium +* ### Learning tools for Automation - Selenium To create a global test, I needed a tool that could automatically click respective options in the VisualCircuit application. I explored several technologies such as Puppeteer, Playwright, and Selenium. I chose Selenium as it is widely used for automation. I learned how Selenium works and how to use it. -* #### Integreation of Selenium with Github Action +* ### Integreation of Selenium with Github Action From my research, I observed that there are two ways to use Selenium with GitHub Actions: one involves the standard installation of Chrome and ChromeDriver, and the other uses the selenium/standalone-chrome Docker image. I chose the second method as it includes the latest Chrome and ChromeDriver, eliminating the need for a separate ChromeDriver. Additionally, it contains all the functionalities of the Chrome browser. Initially, the browser was not displaying correctly on the Selenium Grid, only showing the logo. To view the live action of the process, I opted for noVNC. -* #### Automating clicking File and Open buttons in the Menubar +* ### Automating clicking File and Open buttons in the Menubar After successfully running selenium/standalone-chrome on my local machine, I automated the process of clicking the menubar buttons. I needed the XPATH to locate and perform the respective actions. I found the XPATH for the File and Open buttons from the Developer Console. Below is a GIF showing the automation process of opening the browser, launching VC, and clicking the respective buttons. Automating clicking File and Open buttons in the Menubar: ![](../assets/images/five.gif) -* #### Research about Block Composition +* ### Research about Block Composition The first step was to understand the issue created by David Tapiador. I researched the data flow of opening prebuilt VC projects, adding as a block, and the build options. When the project is built, the dependency section includes package and design key-value pairs. The dependencies were not included, which may be the reason for this nested issue. -* #### Adding interdependencies +* ### Adding interdependencies For nested blocks, I modified the Dependency interface to include the interdependencies element. I also modified the package-model and converter for dependencies. Successfully, interdependencies appeared inside dependencies, but they were blank. This blank state is a great checkpoint as modifying internal structures introduced many errors. I am happy with the progress of this blank interdependencies issue. diff --git a/docs/_posts/2024-06-10-code-w3.md b/docs/_posts/2024-06-17-code-w3.md similarity index 93% rename from docs/_posts/2024-06-10-code-w3.md rename to docs/_posts/2024-06-17-code-w3.md index 111ebee..e8b4fe7 100644 --- a/docs/_posts/2024-06-10-code-w3.md +++ b/docs/_posts/2024-06-17-code-w3.md @@ -17,20 +17,20 @@ On the 10th of June, during Monday's meeting, Dr. JoseMaria explained the Global ## Accomplishment and Challenges -* #### Understanding the VC Block Composition +* ### Understanding the VC Block Composition I went through some frontend files such as `menu/index.tsx`, `project-info-dialog.tsx`, and `editor.ts`. These files are responsible for editing the project information on the frontend side. Initially, I thought of adding Global Input Output functionality within the existing project editing interface. However, as I began implementing it, I realized that it was more difficult than anticipated since it required changing the Project Info interface in every file. Therefore, I decided to build a new dialog box that can be opened from the "Save Block" option in the menu bar. -* #### Implementation of Global Input Output on frontend +* ### Implementation of Global Input Output on frontend For choosing the Global Input Output, all inputs and outputs can be shown, and from there, the Global Input Output can be assigned. I created a new script for the dialog box and modified `editor.ts` and `menu/index.tsx`. Currently, all inputs and outputs are displayed. Next week, I will work on assigning the inputs and outputs as Global for the block. Checkbox for global input output - dialog box: ![](../assets/images/five.png) -* #### Solving the nested block with different approach +* ### Solving the nested block with different approach In this approach, I didn't use `node.dependencies` but instead created blocks and wires for internal dependencies. This solution was suggested by ChatGPT, so I tried it. It involved creating internal wires for dependencies and making the linkages. I spent around two days on this, but it didn't yield the desired results. Additionally, it was suggesting editing many internal components, so I dropped this idea and returned to my nested block solution. -* #### Solving the nested block with last week approach +* ### Solving the nested block with last week approach In the previous week, I encountered blank dependencies. I noticed that the interface dependencies contained a single dependency, so I modified it to include an array and used recursive calls to add internal dependencies. Additionally, `factory.tsx` had not been changed, so I modified that as well. However, the issue of blank dependencies still persists. I need to consult the mentors regarding this issue, as I feel it can be resolved with some more effort. ## Previous PR Updates diff --git a/docs/_posts/2024-06-10-code-w4.md b/docs/_posts/2024-06-24-code-w4.md similarity index 92% rename from docs/_posts/2024-06-10-code-w4.md rename to docs/_posts/2024-06-24-code-w4.md index bb5be3d..0fe3628 100644 --- a/docs/_posts/2024-06-10-code-w4.md +++ b/docs/_posts/2024-06-24-code-w4.md @@ -16,26 +16,26 @@ In the fourth week's Monday meeting, I showed a working demo and discussed the p ## Accomplishment and Challenges -* #### Pasting .vc3 file and opening the file in VC +* ### Pasting .vc3 file and opening the file in VC I first tried putting the circuit file in the Selenium Docker container through a Python script, but it wasn't a great solution, so I decided to put the circuit file through YAML using Docker commands. After solving this, I needed to open the file from a particular directory in the file manager dialog box. For this, OS-level control was needed, so I used the pyautogui library for opening the file in Visual Circuit. -* #### Building and solving inseure download issue +* ### Building and solving inseure download issue There were many errors when building the project as the backend was running on localhost on the local machine and had to be accessed from the Docker container, resulting in fetch errors. These were resolved after modifying setting.py and .env. After that, the browser wasn't allowing downloads as Chrome considered the HTTP frontend insecure. After some Googling and searching on StackOverflow, I found a solution. Finally, the whole process was completed automatically by Selenium. The complete process is shown in the GIF below. Selenium based first automated global test: ![](../assets/images/six.gif) -* #### Improving fetch Global Input and Output function +* ### Improving fetch Global Input and Output function In the previous week, I was able to fetch the port data from all blocks, but it was using more iterations and not proper internal functions for fetching the data. So I improved the global input/output function and also added the submit and checklist handlers to pass data to other scripts. -* #### Creating input output blocks automatically from checkbox data +* ### Creating input output blocks automatically from checkbox data Depending on the port chosen by the user, the particular global input/output block is generated automatically. It checks the port type, and according to that, the input or output block is generated with the same name. Initially, the global input/output block position is the same as the initial position, and the links are null. -* #### Modification of Links and creating respective input output block +* ### Modification of Links and creating respective input output block I researched the internal structure of the model and tried to access the links and respective link IDs of each block. After this, I wrote down all possible cases for creating a circuit by the user. One case is where the global input/output has zero links, so one link has to be created, and the source and target assigned. Another case is that there is already a link connected with the block, so according to the port type, the particular source or target has to be removed and a new one assigned. Apart from that, there are other cases that need to be tested in the future, such as if there are two links at the same port, which one to choose. I want to ask the mentors about these cases. -* #### Saving and retriving old blocks function +* ### Saving and retriving old blocks function Before generating the .vc3 composed block file, the old model has to be saved so the user can continue working on the circuit without worrying about the blocks global input/output. The model and project info are saved in the stack, and whenever the build is completed, the old model is loaded. There were constant errors, such as storing the data in the stack but it was changing with changes, as I was storing this.activModel directly in the stack, causing changes in the stack. For that, I tried several methods using deepCopy, custom functions, and cloneDeep. Both deepCopy and custom functions didn't work, so I used the cloneDeep library, which worked without any errors. Similar to the "Save as" functionality, I used that part of the code for generating .vc3 file. diff --git a/docs/_posts/2024-06-10-code-w5.md b/docs/_posts/2024-07-01-code-w5.md similarity index 93% rename from docs/_posts/2024-06-10-code-w5.md rename to docs/_posts/2024-07-01-code-w5.md index 9849aa1..bf37bdf 100644 --- a/docs/_posts/2024-06-10-code-w5.md +++ b/docs/_posts/2024-07-01-code-w5.md @@ -17,10 +17,10 @@ On Monday's meeting, we discussed possible cases for a composed block. Last week ## Accomplishment and Challenges -* #### Solving the global block input links issue and extending block composition for every block +* ### Solving the global block input links issue and extending block composition for every block As discussed above, we should not have more than one link at the input port, and we need to hide input ports with internal wiring from the block composition dialog box. I modified the globalInputOutput function to segregate ports based on links and port types. In last week's code, only code blocks were supported, so I made changes to support every block. I also observed an issue with the text being fetched from the package, which was taking a 40-character name. I modified it to take the name port from the labels of the blocks. -* #### Solving the global block output links issue and refining existing code +* ### Solving the global block output links issue and refining existing code For blocks with multiple wiring at the output side, a new link needs to be added with the respective global input/output attached. Unlike the global input block issue, this requires the parent global output block ID and the respective link ID so that the existing link is not modified. These changes were extensive and altered last week's code, so I refined the overall code. After refinement, the entire global input/output block was tested with all cases and is working as expected. diff --git a/docs/_posts/2024-06-10-code-w6-7.md b/docs/_posts/2024-07-15-code-w6-7.md similarity index 100% rename from docs/_posts/2024-06-10-code-w6-7.md rename to docs/_posts/2024-07-15-code-w6-7.md diff --git a/docs/_posts/2024-06-10-code-w8.md b/docs/_posts/2024-07-22-code-w8.md similarity index 95% rename from docs/_posts/2024-06-10-code-w8.md rename to docs/_posts/2024-07-22-code-w8.md index 1769704..170c53c 100644 --- a/docs/_posts/2024-06-10-code-w8.md +++ b/docs/_posts/2024-07-22-code-w8.md @@ -27,13 +27,13 @@ Modules directory with all nested python files: ## Accomplishment and Challenges -* #### Analyzing the Week 3 Code for the Nested Issue +* ### Analyzing the Week 3 Code for the Nested Issue Dr. Jose Maria suggested in the meeting to revisit the basics and look for solutions in the internal architecture. Therefore, I recreated the issue from week 3. I wrote two codes: one where a new node is created according to dependencies and new wiring was made. However, this approach was not sustainable due to the potential complexity from multiple dependencies. I dropped that idea. The second approach was recursion-based on frontend side, aimed at getting all dependencies, but it resulted in blank dependencies. After analyzing this solution, I changed the recursion solution from the package level. -* #### Blank dependicies issue +* ### Blank dependicies issue Upon deeper analyzing into PackageBlockModel and factory.tsx, I observed that I had created nested dependencies that were not present in the interface of PackageBlockModel. I modified the dependency array for every script and added internal dependencies to the respective interface and methods. The solution was close to being resolve, but I took a different approach in week 3. -* #### Python script in modules directory issue +* ### Python script in modules directory issue Initially, the circuit was not building, but the Save as function was working. Due to nested dependencies, the synthesis file could not be processed. I added a recursive solution to get the nested dependencies from the frontend, which was very challenging. The files were being created but not at all levels. After debugging, I found that the issue was the missing internal dependencies at each level and the improper assignment of keys. The above images attached show the progress made this week. ## PR Created diff --git a/docs/_posts/2024-06-10-code-w9.md b/docs/_posts/2024-07-29-code-w9.md similarity index 95% rename from docs/_posts/2024-06-10-code-w9.md rename to docs/_posts/2024-07-29-code-w9.md index 83dfe34..bb54afe 100644 --- a/docs/_posts/2024-06-10-code-w9.md +++ b/docs/_posts/2024-07-29-code-w9.md @@ -54,17 +54,17 @@ Output including printing at every level and code block: ## Accomplishment and Challenges -* #### Modifying the Current Version to Support Multi Code Block Dependency +* ### Modifying the Current Version to Support Multi Code Block Dependency When I completed writing the entire logic, I found that multiple codes were not supported, and extra wires were created that couldn't connect. Additionally, other code blocks of inter-dependency were not included in data.json, leading to improper linkage. I modified synthesize_modules and changed the logic for adding internal blocks, so they were not treated as whole dependencies. This way, the blocks were added at one level. -* #### Understanding Backend Processing by Creating Sample Tests +* ### Understanding Backend Processing by Creating Sample Tests To understand the process, I created a sample test and added blocks and wires in data.json. This helped me see how the internal file structure of the zip file works after building. I drew the whole connection and tried to replicate it by modifying synthesis.py using recursive and iterative techniques until level 1 was achieved. -* #### Fixing the Issue of Missing Nested Blocks After Backend Processing +* ### Fixing the Issue of Missing Nested Blocks After Backend Processing I created the process_dependency function, which is called inside synthesize_modules. This function iterates over all blocks of a dependency and creates module Python scripts depending on the block type. Only code block type modules and block values are included in data.json. If there is a dependency inside a dependency, process_dependency is called recursively until no nested dependencies are left. This method ensures that only code blocks are included in the modules directory, while other blocks such as global input/output, dependencies, and constants are filtered out. -* #### Writing code for filtering and mapping the wires in backend +* ### Writing code for filtering and mapping the wires in backend After obtaining the proper blocks in data.json, I focused on the wires. In the current version, level 1 blocks were being added to data.json, so I modified process_dependency to include every wire. There were wires for packages and global input/output, which required proper filtering and the creation of new links between the required blocks. I iterated over all wires selected from process_dependency and segregated them based on the wire's source and target block ID. After that, in another iteration, I checked each wire with the filtered blocks in data.json to determine if the block was present, adding the key pair of ob:absent. Then, I created process_wire, where all wire mappings were handled. This function contains nested iterations: 1. The first internal iteration iterates over all valid wires, checks for global input and output, and either saves the wire in a dictionary or removes the entire source-target link based on the presence of the absent value. diff --git a/docs/_posts/2024-07-05-code-w10.md b/docs/_posts/2024-08-05-code-w10.md similarity index 96% rename from docs/_posts/2024-07-05-code-w10.md rename to docs/_posts/2024-08-05-code-w10.md index 9bc0e0b..2f4cb50 100644 --- a/docs/_posts/2024-07-05-code-w10.md +++ b/docs/_posts/2024-08-05-code-w10.md @@ -49,16 +49,16 @@ Single port - Multiple IN and Multiple OUT issue: ## Accomplishment and Challenges -* #### Replicating David's FSM Circuit +* ### Replicating David's FSM Circuit The nested issue was opened by David around a year ago when he faced this problem while creating the FSM circuit with VC. My first goal was to recreate the nested FSM circuit. You may wonder why recreate it? The circuit was made with an earlier version, and the internal blocks will not have interdependency if I build with the older .vc3. So, I had to recreate every block and circuit. There was an issue when I ran the parameters; they were missing, so I checked with data.json and found missing parameters. -* #### Parameter Issue in Nested Code +* ### Parameter Issue in Nested Code The earlier code was developed for one code block dependency, similar to nested blocks. The parameter IDs depended on the "type ID" of the dependency, but if multiple blocks are inside the dependency, this method will have the same type ID, and the parameters cannot map to the correct block. This type_ID needed to be changed in nested code. All blocks in data.json are at a single level, so the types are basic blocks. Initially, I thought to create a random alphanumeric string of 30 characters as the parameter ID. After implementing it, many issues were found, such as if parameters are used in input and output, leading to more confusion in wire mapping. Then, I implemented a new ID not dependent on type_ID, and particular wires will map with blocks, so the issue of mapping extra wires also won't occur. -* #### Single level FSM Circuit +* ### Single level FSM Circuit After solving the parameters issue, I proceeded with the single-level FSM circuit. The blocks such as laser_ROS2, motor_ROS2, and screen used by David were not from the block library. Initially, it didn't work, and finding the issue took more time. After analyzing the internal code of the above blocks, they were customized. After modifying and recreating, the whole logic ran without any issue. I ran turtlebot3 in an empty world inside my local machine and ran the FSM logic with VC. -* #### Issue in multi level FSM Circuit (Major issue) +* ### Issue in multi level FSM Circuit (Major issue) After running the single level, I was confident it would run with nested, but as the saying goes, things don't always go as planned. David used single port multiple OUT to different blocks and took input outside of the composed block from multiple blocks. However, I wrote for single IN - OUT, so it could not map the multiple blocks; it was taking one block and connecting to another block. This is a big issue as it requires looking again at the mapping of wires and adding conditions for such situations. diff --git a/docs/_posts/2024-07-05-code-w11-12.md b/docs/_posts/2024-08-20-code-w11-12.md similarity index 100% rename from docs/_posts/2024-07-05-code-w11-12.md rename to docs/_posts/2024-08-20-code-w11-12.md diff --git a/docs/_posts/2024-08-25-code-w13.md b/docs/_posts/2024-08-25-code-w13.md new file mode 100644 index 0000000..97dcd5e --- /dev/null +++ b/docs/_posts/2024-08-25-code-w13.md @@ -0,0 +1,54 @@ +--- +title: "Coding Period Week 13: Aug 21 ~ Aug 26" +categories: + - Blog +permalink: /coding-week13/ +toc_label: Table of Content +toc: true +sidebar: + nav: "docs" +--- + +This is the final evaluation week, where ongoing and new errors were resolved, a demo video was created, and the summary report for the final evaluation of GSoC was written. New blocks, such as a generic PID and person detector, were also developed and tested by creating demo circuits. Although there are some loose ends left that I plan to address after GSoC, everything in the current version works perfectly. The remaining loose ends are additional features that need to be added. + + + +## Goals +- [x] Develop generic PID and person detector blocks +- [x] Test new blocks by creating demo circuits +- [x] Refine the code and add comments +- [ ] Resolve the issue with multiple instances of prebuilt package blocks +- [x] Create and edit demo video for final evaluation +- [x] Complete summary report and publish the video on youtube + + + + +## Accomplishment and Challenges + +* ### Generic PID and person detector block + Now it's time to add some blocks. First on the list is the Generic PID. A question that might arise is why we need this if there is already a PID block. Like you, I asked this question to my mentors, and they explained that the current PID block is designed for a particular use case where the PID is applied to angular velocity, while linear velocity remains constant. This PID block cannot be used for every case, which is why a generic PID block is needed that takes the error and provides a resulting value for both linear and angular velocity, not just angular. The generic PID can be used in any application. + + For the person detector block, I took reference from the Object Detector block. According to my mentor, we need a simple block that outputs an image with a selected box, indicating the detected person along with their coordinates, width, and height. Both blocks were tested by creating a demo application. + + Generic PID and person detector block: + ![](../assets/images/thirtyseven.png) + + Inside person detector block: + ![](../assets/images/thirtyeight.png) + + +* ### Multiple Instances Issue with Prebuilt Package Block + This unexpected error occurred in the code for handling multiple instances from the previous week when blocks were added from the prebuilt collection block. Upon verification, it was observed that the code I wrote was correct and should work for every package block since it was running in loadPackage, which is also called in the collection block. Therefore, the issue is not with the code itself, but rather with the debugging process. It was observed that when one collection block is added, the ID changes, but when adding another identical collection block, the ID changes again, altering the previous block ID. This seems to be modifying the entire model, and the reason is still unclear but needs to be investigated further. + +* ### Demo video and summary report + Almost everything was aligned correctly for the demo video, with some loose ends that are extra features and minor unexpected errors that can be resolved in the future. Apart from that, everything is functioning as expected. It was time to create the demo video showcasing the features that will be released in v3.6. In the video, I demonstrated the state before v3.6, the modifications made in v3.6, and how to use the composed and nested block features. After verification from my mentors, I published the video on YouTube and also wrote the summary report required for the final evaluation of GSoC. + + [Composed and Nested Blocks Feature Demo - v3.6](https://www.youtube.com/watch?v=xvceQL8AgQ4) + + +## Final Note +With this, my GSoC work is complete, but I believe this is just the beginning of a new chapter with JdeRobot and open source. I will continue contributing as time allows, alongside my other commitments. + +If you’ve been following from the beginning, thank you for reading up to week 13—I truly appreciate your time. If you started with this blog or any intermediate blog, you can read all the posts from day 0 to the present. A summary blog is also available, which covers the entire GSoC project progress. If you have any questions or comments, feel free to reach out to me through my social media handles provided in the sidebar. Again, thank you for visiting my blog and reading about my GSoC journey. + diff --git a/docs/_posts/2024-07-05-summary.md b/docs/_posts/2024-08-26-summary.md similarity index 98% rename from docs/_posts/2024-07-05-summary.md rename to docs/_posts/2024-08-26-summary.md index 1bf5ed1..5906092 100644 --- a/docs/_posts/2024-07-05-summary.md +++ b/docs/_posts/2024-08-26-summary.md @@ -25,9 +25,10 @@ This blog post will be a quick summary of what I worked on during the GSOC perio - [Toshan Luktuke](https://github.com/toshan-luktuke) -**Official Repository:** [VisualCircuit](https://github.com/JdeRobot/VisualCircuit/) -**Github Issues**: [Summary](https://github.com/JdeRobot/VisualCircuit/issues?q=author%3ABkPankaj+) -**Pull Requests:** [Summary](https://github.com/JdeRobot/VisualCircuit/pulls?q=author%3ABkPankaj+) +**Official Repository:** [VisualCircuit](https://github.com/JdeRobot/VisualCircuit/)
+**About:** [ℹ️ Explore About](https://theroboticsclub.github.io/gsoc2024-Pankaj_Borade/About/)
+**Github Issues**: [View Issues](https://github.com/JdeRobot/VisualCircuit/issues?q=author%3ABkPankaj+)
+**Pull Requests:** [See Pull Requests](https://github.com/JdeRobot/VisualCircuit/pulls?q=author%3ABkPankaj+)
## Goals diff --git a/docs/_site/feed.xml b/docs/_site/feed.xml index f4ba3e5..33a7db6 100644 --- a/docs/_site/feed.xml +++ b/docs/_site/feed.xml @@ -1,119 +1,4 @@ -Jekyll2024-08-28T11:14:18+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/feed.xmlGSoC 2024 VisualCircuit Block Library - JdeRobotPankaj Keshav BoradeCoding Period Week 10: July 30 ~ Aug 052024-07-05T00:00:00+05:302024-07-05T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w10In the tenth week’s Monday meeting, we discussed progress until the ninth week and outlined the tasks for the upcoming week. The main goal is to perform a robotics application with new nested code. I chose David’s FSM issue for the robotics application. Mentor Dr. José María sent the GitHub link to David’s repository. Several issues arose, and one is still ongoing, which I will discuss in the Challenges section. Through this robotics application, several loose ends were identified, and I resolved them this week. However, one issue remains that I need to address.

- -

Goals

-
    -
  • Solve the Robotics Application with nested and composed version (Found Issues)
  • -
- -

Sub-Goals

-
    -
  • Understand David’s FSM circuit and issue
  • -
  • Replicate David’s VC Circuit with a newer version
  • -
  • Run the FSM on a single level
  • -
  • New issue: Nested parameters not appearing in the build file
  • -
  • Resolve the parameters issue by modifying earlier version code
  • -
  • New issue: Analyze the issue of nested FSM; unable to run single port with multiple IN and OUT.
  • -
  • Update the blog page with about, home, sidebar.
  • -
- -

Images

-

Older version FSM single level circuit: -

- -

Recreated working FSM circuit with nested code: - -

- -

Output of single level: - -

- -

Parameter issue: -

- -

Single port - Multiple IN and Multiple OUT issue: -

- -

Accomplishment and Challenges

- -
    -
  • -

    Replicating David’s FSM Circuit

    -

    The nested issue was opened by David around a year ago when he faced this problem while creating the FSM circuit with VC. My first goal was to recreate the nested FSM circuit. You may wonder why recreate it? The circuit was made with an earlier version, and the internal blocks will not have interdependency if I build with the older .vc3. So, I had to recreate every block and circuit. There was an issue when I ran the parameters; they were missing, so I checked with data.json and found missing parameters.

    -
  • -
  • -

    Parameter Issue in Nested Code

    -

    The earlier code was developed for one code block dependency, similar to nested blocks. The parameter IDs depended on the “type ID” of the dependency, but if multiple blocks are inside the dependency, this method will have the same type ID, and the parameters cannot map to the correct block. This type_ID needed to be changed in nested code. All blocks in data.json are at a single level, so the types are basic blocks. Initially, I thought to create a random alphanumeric string of 30 characters as the parameter ID. After implementing it, many issues were found, such as if parameters are used in input and output, leading to more confusion in wire mapping. Then, I implemented a new ID not dependent on type_ID, and particular wires will map with blocks, so the issue of mapping extra wires also won’t occur.

    -
  • -
  • -

    Single level FSM Circuit

    -

    After solving the parameters issue, I proceeded with the single-level FSM circuit. The blocks such as laser_ROS2, motor_ROS2, and screen used by David were not from the block library. Initially, it didn’t work, and finding the issue took more time. After analyzing the internal code of the above blocks, they were customized. After modifying and recreating, the whole logic ran without any issue. I ran turtlebot3 in an empty world inside my local machine and ran the FSM logic with VC.

    -
  • -
  • -

    Issue in multi level FSM Circuit (Major issue)

    -

    After running the single level, I was confident it would run with nested, but as the saying goes, things don’t always go as planned. David used single port multiple OUT to different blocks and took input outside of the composed block from multiple blocks. However, I wrote for single IN - OUT, so it could not map the multiple blocks; it was taking one block and connecting to another block. This is a big issue as it requires looking again at the mapping of wires and adding conditions for such situations.

    -
  • -
- -

PRs Created

-
    -
  1. Open - https://github.com/JdeRobot/VisualCircuit/pull/325
  2. -
- -

Issues

-
    -
  1. Open - https://github.com/JdeRobot/VisualCircuit/issues/324
  2. -
- - -
    -
  1. Midterm update linkedin post - https://www.linkedin.com/feed/update/urn:li:activity:7226124206420180992/
  2. -
]]>
Pankaj Keshav Borade
Coding Period Week 11 & 12: Aug 06 ~ Aug 202024-07-05T00:00:00+05:302024-07-05T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w11-12In the past two weeks, the main task has been to complete the remaining demo and resolve issues that arose along the way. A major issue was with the FSM circuit, where there were multiple inputs and outputs connected to a single port. This issue has been partially resolved; when the number of inputs and outputs is equal, the wires are mapped correctly, but if they are unequal, the issue persists. Another issue was with IDs remaining the same across multiple instances of the same block. This has been resolved using a queue (detailed in the “Achievements and Challenges” section). Additionally, there was a problem where, after pressing the Back button, the model data remained the same, leading to identical IDs for multiple instances. By the end of week 12, the line follower with the composed block feature was successfully solved.

- -

Goals

-
    -
  • Multiple instances of block issue
  • -
  • Line follower with composed block feature
  • -
  • Partially resolved the single port with multiple input/output issue
  • -
  • Completed Python file for CI workflow build test
  • -
- -

Sub-Goals

-
    -
  • Solved the line follower with a single level
  • -
  • Resolved the single port with multiple input/output issue when the number of inputs and outputs is the same
  • -
  • Resolved the issue of identical IDs across multiple instances of the same block
  • -
  • Resolved the issue of model data remaining the same when the Back button is pressed
  • -
  • Solved the line follower with composed block feature
  • -
  • Completed the Python file for the CI workflow
  • -
- -

Images

-

Composed circuit of line follower: -

- -

Internal perception composed block: -

- -

Global Input Output dialog box: -

- -

Accomplishment and Challenges

- -
    -
  • -

    Identical IDs across multiple instances of the same block

    -

    In the line follower demo, Dr. Jose Maria suggested using two generic PID blocks, which led to the issue of identical IDs across multiple instances. While the line follower worked with a single PID, using two PID instances is more appropriate as it minimizes errors in linear and angular velocities. The issue arose because multiple levels were converted into a single level after backend processing, resulting in identical IDs for both internal blocks, causing incorrect wire and block mapping. To resolve this, I added an extra script in the “Add as Block” function before the jsonModel.design is appended. This script iterates to modify the IDs with random IDs, and not only the block but also the design’s wire and layer block IDs need to be changed, which was achieved in this extra script.

    -
  • -
  • -

    Issue with model data remaining unchanged when the Back button is pressed

    -

    After solving the issue with identical IDs across multiple instances, another issue arose where, upon entering a package, the ID and internal data of the block remained the same as they were at the time of importing. This issue was due to the node layers in the editor, as the model of the editor was appended in the higher-level block stack. The code I wrote to solve the multiple instance issue involved modifying the IDs of the design model. To fix this, I added an extra iteration in the loadPackage function. In the editor, there were two objects—one for links and one for blocks—so both IDs needed to be changed along with the earlier design IDs.

    -
  • -
  • -

    Single port with multiple input/output issue

    -

    This issue occurred when David’s FSM circuit was created using the composed block feature. In David’s circuit, multiple blocks were attached to a single port. My approach was to use a queue operation to map all blocks, but there were many cases where the number of inputs and outputs was not the same, requiring the creation of extra links. The issue with equal numbers of input/output blocks was resolved using the queue approach.

    -
  • -
]]>
Pankaj Keshav Borade
Project Summary2024-07-05T00:00:00+05:302024-07-05T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/summaryProject Overview +Jekyll2024-08-28T17:08:31+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/feed.xmlGSoC 2024 VisualCircuit Block Library - JdeRobotPankaj Keshav BoradeProject Summary2024-08-26T00:00:00+05:302024-08-26T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/summaryProject Overview

This GSoC project focuses on adding a global block composition feature, resolving nested issues, modifying the current version’s single dependency codebase to a multi-level dependency, implementing two or more demo robotics applications, expanding the block library, automating the testing of VisualCircuit and its documentation using GitHub Actions, and releasing the new version with all issue fixes.

The last 16 weeks have been an incredible and exhilarating journey filled with learning, challenges, and accomplishments. It was a great experience to work on such an exciting project, applying my web development skills to the field of Robotics, a domain I’m deeply passionate about, and learning more about both areas along the way. These past few months were exciting and memorable, with late nights, early mornings, and sometimes not sleeping at all. The joy of completing tasks is hard to describe in words (though my weekly blog attempts to capture some of that emotion).

@@ -316,183 +201,286 @@ Firstmeet

Person Detector Block testing: -Firstmeet

]]>
Pankaj Keshav Borade
Coding Period Week 2: June 04 ~ June 102024-06-10T00:00:00+05:302024-06-10T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w2Welcome to the second week of Coding Week progress. In the Monday meeting, we discussed the minimum tasks required for the midterm evaluation, reviewed the previous tasks, and assigned tasks for the next week. One of the issues in VisualCircuit is that it doesn’t generate internal scripts for nested blocks. This issue prevents the creation of complex robotics applications. To address this, I will be modifying the block composition this week. Additionally, I created a basic frontend test and installation process within GitHub Actions. This week, I will work on the first global test with GitHub Actions.

+Firstmeet

]]>
Pankaj Keshav Borade
Coding Period Week 13: Aug 21 ~ Aug 262024-08-25T00:00:00+05:302024-08-25T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w13This is the final evaluation week, where ongoing and new errors were resolved, a demo video was created, and the summary report for the final evaluation of GSoC was written. New blocks, such as a generic PID and person detector, were also developed and tested by creating demo circuits. Although there are some loose ends left that I plan to address after GSoC, everything in the current version works perfectly. The remaining loose ends are additional features that need to be added.

Goals

    -
  • Create first global test workflow [In Progress]
  • -
  • Solve the issue of nested block [In Progress]
  • +
  • Develop generic PID and person detector blocks
  • +
  • Test new blocks by creating demo circuits
  • +
  • Refine the code and add comments
  • +
  • Resolve the issue with multiple instances of prebuilt package blocks
  • +
  • Create and edit demo video for final evaluation
  • +
  • Complete summary report and publish the video on youtube

Accomplishment and Challenges

  • -

    Learning tools for Automation - Selenium

    -

    To create a global test, I needed a tool that could automatically click respective options in the VisualCircuit application. I explored several technologies such as Puppeteer, Playwright, and Selenium. I chose Selenium as it is widely used for automation. I learned how Selenium works and how to use it.

    -
  • -
  • -

    Integreation of Selenium with Github Action

    -

    From my research, I observed that there are two ways to use Selenium with GitHub Actions: one involves the standard installation of Chrome and ChromeDriver, and the other uses the selenium/standalone-chrome Docker image. I chose the second method as it includes the latest Chrome and ChromeDriver, eliminating the need for a separate ChromeDriver. Additionally, it contains all the functionalities of the Chrome browser. Initially, the browser was not displaying correctly on the Selenium Grid, only showing the logo. To view the live action of the process, I opted for noVNC.

    -
  • -
  • -

    Automating clicking File and Open buttons in the Menubar

    -

    After successfully running selenium/standalone-chrome on my local machine, I automated the process of clicking the menubar buttons. I needed the XPATH to locate and perform the respective actions. I found the XPATH for the File and Open buttons from the Developer Console. Below is a GIF showing the automation process of opening the browser, launching VC, and clicking the respective buttons.

    -
  • -
+

Generic PID and person detector block

+

Now it’s time to add some blocks. First on the list is the Generic PID. A question that might arise is why we need this if there is already a PID block. Like you, I asked this question to my mentors, and they explained that the current PID block is designed for a particular use case where the PID is applied to angular velocity, while linear velocity remains constant. This PID block cannot be used for every case, which is why a generic PID block is needed that takes the error and provides a resulting value for both linear and angular velocity, not just angular. The generic PID can be used in any application.

-

Automating clicking File and Open buttons in the Menubar:

+

For the person detector block, I took reference from the Object Detector block. According to my mentor, we need a simple block that outputs an image with a selected box, indicating the detected person along with their coordinates, width, and height. Both blocks were tested by creating a demo application.

-

+

Generic PID and person detector block: +

-
    +

    Inside person detector block: +

    +
  • -

    Research about Block Composition

    -

    The first step was to understand the issue created by David Tapiador. I researched the data flow of opening prebuilt VC projects, adding as a block, and the build options. When the project is built, the dependency section includes package and design key-value pairs. The dependencies were not included, which may be the reason for this nested issue.

    +

    Multiple Instances Issue with Prebuilt Package Block

    +

    This unexpected error occurred in the code for handling multiple instances from the previous week when blocks were added from the prebuilt collection block. Upon verification, it was observed that the code I wrote was correct and should work for every package block since it was running in loadPackage, which is also called in the collection block. Therefore, the issue is not with the code itself, but rather with the debugging process. It was observed that when one collection block is added, the ID changes, but when adding another identical collection block, the ID changes again, altering the previous block ID. This seems to be modifying the entire model, and the reason is still unclear but needs to be investigated further.

  • -

    Adding interdependencies

    -

    For nested blocks, I modified the Dependency interface to include the interdependencies element. I also modified the package-model and converter for dependencies. Successfully, interdependencies appeared inside dependencies, but they were blank. This blank state is a great checkpoint as modifying internal structures introduced many errors. I am happy with the progress of this blank interdependencies issue.

    +

    Demo video and summary report

    +

    Almost everything was aligned correctly for the demo video, with some loose ends that are extra features and minor unexpected errors that can be resolved in the future. Apart from that, everything is functioning as expected. It was time to create the demo video showcasing the features that will be released in v3.6. In the video, I demonstrated the state before v3.6, the modifications made in v3.6, and how to use the composed and nested block features. After verification from my mentors, I published the video on YouTube and also wrote the summary report required for the final evaluation of GSoC.

    + +

    Composed and Nested Blocks Feature Demo - v3.6

    +
-

Integreation of interdependencies inside dependencies:

+

Final Note

+

With this, my GSoC work is complete, but I believe this is just the beginning of a new chapter with JdeRobot and open source. I will continue contributing as time allows, alongside my other commitments.

-

-

+

If you’ve been following from the beginning, thank you for reading up to week 13—I truly appreciate your time. If you started with this blog or any intermediate blog, you can read all the posts from day 0 to the present. A summary blog is also available, which covers the entire GSoC project progress. If you have any questions or comments, feel free to reach out to me through my social media handles provided in the sidebar. Again, thank you for visiting my blog and reading about my GSoC journey.

]]>
Pankaj Keshav Borade
Coding Period Week 11 & 12: Aug 06 ~ Aug 202024-08-20T00:00:00+05:302024-08-20T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w11-12In the past two weeks, the main task has been to complete the remaining demo and resolve issues that arose along the way. A major issue was with the FSM circuit, where there were multiple inputs and outputs connected to a single port. This issue has been partially resolved; when the number of inputs and outputs is equal, the wires are mapped correctly, but if they are unequal, the issue persists. Another issue was with IDs remaining the same across multiple instances of the same block. This has been resolved using a queue (detailed in the “Achievements and Challenges” section). Additionally, there was a problem where, after pressing the Back button, the model data remained the same, leading to identical IDs for multiple instances. By the end of week 12, the line follower with the composed block feature was successfully solved.

-

Commits

-
    -
  1. https://github.com/JdeRobot/VisualCircuit/commit/7ccbea013a311fe1d0af6e71408b84b3b7594f15
  2. -
  3. https://github.com/JdeRobot/VisualCircuit/commit/8ea1c0d35e1ee11f282a7407635ff899c538f34f
  4. -
- -

Previous PR Updates

-
    -
  1. Merged - https://github.com/JdeRobot/VisualCircuit/pull/309
  2. -
]]>
Pankaj Keshav Borade
Coding Period Week 3: June 11 ~ June 172024-06-10T00:00:00+05:302024-06-10T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w3On the 10th of June, during Monday’s meeting, Dr. JoseMaria explained the Global Input Output issue. Whenever the user creates a Robotics Application circuit, if it needs to generate a block, the user needs to modify the circuit, which is very time-consuming. Therefore, we need to implement the functionality for generating both the block and the circuit without modifying the circuit. This functionality will improve user performance on VC. Additionally, the tasks from the previous week were only partially completed, so they have been reassigned for this week.

Goals

    -
  • Modification of VC block compostion for Global Input Output [In Progress]
  • -
  • Create first global test workflow [In Progress]
  • -
  • Solve the issue of nested block [In Progress]
  • +
  • Multiple instances of block issue
  • +
  • Line follower with composed block feature
  • +
  • Partially resolved the single port with multiple input/output issue
  • +
  • Completed Python file for CI workflow build test
  • +
+ +

Sub-Goals

+
    +
  • Solved the line follower with a single level
  • +
  • Resolved the single port with multiple input/output issue when the number of inputs and outputs is the same
  • +
  • Resolved the issue of identical IDs across multiple instances of the same block
  • +
  • Resolved the issue of model data remaining the same when the Back button is pressed
  • +
  • Solved the line follower with composed block feature
  • +
  • Completed the Python file for the CI workflow
+

Images

+

Composed circuit of line follower: +

+ +

Internal perception composed block: +

+ +

Global Input Output dialog box: +

+

Accomplishment and Challenges

  • -

    Understanding the VC Block Composition

    -

    I went through some frontend files such as menu/index.tsx, project-info-dialog.tsx, and editor.ts. These files are responsible for editing the project information on the frontend side. Initially, I thought of adding Global Input Output functionality within the existing project editing interface. However, as I began implementing it, I realized that it was more difficult than anticipated since it required changing the Project Info interface in every file. Therefore, I decided to build a new dialog box that can be opened from the “Save Block” option in the menu bar.

    +

    Identical IDs across multiple instances of the same block

    +

    In the line follower demo, Dr. Jose Maria suggested using two generic PID blocks, which led to the issue of identical IDs across multiple instances. While the line follower worked with a single PID, using two PID instances is more appropriate as it minimizes errors in linear and angular velocities. The issue arose because multiple levels were converted into a single level after backend processing, resulting in identical IDs for both internal blocks, causing incorrect wire and block mapping. To resolve this, I added an extra script in the “Add as Block” function before the jsonModel.design is appended. This script iterates to modify the IDs with random IDs, and not only the block but also the design’s wire and layer block IDs need to be changed, which was achieved in this extra script.

  • -

    Implementation of Global Input Output on frontend

    -

    For choosing the Global Input Output, all inputs and outputs can be shown, and from there, the Global Input Output can be assigned. I created a new script for the dialog box and modified editor.ts and menu/index.tsx. Currently, all inputs and outputs are displayed. Next week, I will work on assigning the inputs and outputs as Global for the block.

    +

    Issue with model data remaining unchanged when the Back button is pressed

    +

    After solving the issue with identical IDs across multiple instances, another issue arose where, upon entering a package, the ID and internal data of the block remained the same as they were at the time of importing. This issue was due to the node layers in the editor, as the model of the editor was appended in the higher-level block stack. The code I wrote to solve the multiple instance issue involved modifying the IDs of the design model. To fix this, I added an extra iteration in the loadPackage function. In the editor, there were two objects—one for links and one for blocks—so both IDs needed to be changed along with the earlier design IDs.

  • +
  • +

    Single port with multiple input/output issue

    +

    This issue occurred when David’s FSM circuit was created using the composed block feature. In David’s circuit, multiple blocks were attached to a single port. My approach was to use a queue operation to map all blocks, but there were many cases where the number of inputs and outputs was not the same, requiring the creation of extra links. The issue with equal numbers of input/output blocks was resolved using the queue approach.

    +
  • +
]]>
Pankaj Keshav Borade
Coding Period Week 10: July 30 ~ Aug 052024-08-05T00:00:00+05:302024-08-05T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w10In the tenth week’s Monday meeting, we discussed progress until the ninth week and outlined the tasks for the upcoming week. The main goal is to perform a robotics application with new nested code. I chose David’s FSM issue for the robotics application. Mentor Dr. José María sent the GitHub link to David’s repository. Several issues arose, and one is still ongoing, which I will discuss in the Challenges section. Through this robotics application, several loose ends were identified, and I resolved them this week. However, one issue remains that I need to address.

+ +

Goals

+
    +
  • Solve the Robotics Application with nested and composed version (Found Issues)
-

Checkbox for global input output - dialog box:

+

Sub-Goals

+
    +
  • Understand David’s FSM circuit and issue
  • +
  • Replicate David’s VC Circuit with a newer version
  • +
  • Run the FSM on a single level
  • +
  • New issue: Nested parameters not appearing in the build file
  • +
  • Resolve the parameters issue by modifying earlier version code
  • +
  • New issue: Analyze the issue of nested FSM; unable to run single port with multiple IN and OUT.
  • +
  • Update the blog page with about, home, sidebar.
  • +
-

+

Images

+

Older version FSM single level circuit: +

+ +

Recreated working FSM circuit with nested code: + +

+ +

Output of single level: + +

+ +

Parameter issue: +

+ +

Single port - Multiple IN and Multiple OUT issue: +

+ +

Accomplishment and Challenges

  • -

    Solving the nested block with different approach

    -

    In this approach, I didn’t use node.dependencies but instead created blocks and wires for internal dependencies. This solution was suggested by ChatGPT, so I tried it. It involved creating internal wires for dependencies and making the linkages. I spent around two days on this, but it didn’t yield the desired results. Additionally, it was suggesting editing many internal components, so I dropped this idea and returned to my nested block solution.

    +

    Replicating David’s FSM Circuit

    +

    The nested issue was opened by David around a year ago when he faced this problem while creating the FSM circuit with VC. My first goal was to recreate the nested FSM circuit. You may wonder why recreate it? The circuit was made with an earlier version, and the internal blocks will not have interdependency if I build with the older .vc3. So, I had to recreate every block and circuit. There was an issue when I ran the parameters; they were missing, so I checked with data.json and found missing parameters.

  • -

    Solving the nested block with last week approach

    -

    In the previous week, I encountered blank dependencies. I noticed that the interface dependencies contained a single dependency, so I modified it to include an array and used recursive calls to add internal dependencies. Additionally, factory.tsx had not been changed, so I modified that as well. However, the issue of blank dependencies still persists. I need to consult the mentors regarding this issue, as I feel it can be resolved with some more effort.

    +

    Parameter Issue in Nested Code

    +

    The earlier code was developed for one code block dependency, similar to nested blocks. The parameter IDs depended on the “type ID” of the dependency, but if multiple blocks are inside the dependency, this method will have the same type ID, and the parameters cannot map to the correct block. This type_ID needed to be changed in nested code. All blocks in data.json are at a single level, so the types are basic blocks. Initially, I thought to create a random alphanumeric string of 30 characters as the parameter ID. After implementing it, many issues were found, such as if parameters are used in input and output, leading to more confusion in wire mapping. Then, I implemented a new ID not dependent on type_ID, and particular wires will map with blocks, so the issue of mapping extra wires also won’t occur.

    +
  • +
  • +

    Single level FSM Circuit

    +

    After solving the parameters issue, I proceeded with the single-level FSM circuit. The blocks such as laser_ROS2, motor_ROS2, and screen used by David were not from the block library. Initially, it didn’t work, and finding the issue took more time. After analyzing the internal code of the above blocks, they were customized. After modifying and recreating, the whole logic ran without any issue. I ran turtlebot3 in an empty world inside my local machine and ran the FSM logic with VC.

    +
  • +
  • +

    Issue in multi level FSM Circuit (Major issue)

    +

    After running the single level, I was confident it would run with nested, but as the saying goes, things don’t always go as planned. David used single port multiple OUT to different blocks and took input outside of the composed block from multiple blocks. However, I wrote for single IN - OUT, so it could not map the multiple blocks; it was taking one block and connecting to another block. This is a big issue as it requires looking again at the mapping of wires and adding conditions for such situations.

-

Previous PR Updates

+

PRs Created

    -
  1. Merged - https://github.com/JdeRobot/VisualCircuit-resources/pull/12
  2. -
]]>
Pankaj Keshav Borade
Coding Period Week 4: June 18 ~ June 242024-06-10T00:00:00+05:302024-06-10T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w4In the fourth week’s Monday meeting, I showed a working demo and discussed the previous week’s tasks. The mentors suggested working on block composition for global input/output. The other nested issue is quite complex and needs more time, so this task is postponed to other week.

+
  • Open - https://github.com/JdeRobot/VisualCircuit/pull/325
  • + + +

    Issues

    +
      +
    1. Open - https://github.com/JdeRobot/VisualCircuit/issues/324
    2. +
    + + +
      +
    1. Midterm update linkedin post - https://www.linkedin.com/feed/update/urn:li:activity:7226124206420180992/
    2. +
    ]]>
    Pankaj Keshav Borade
    Coding Period Week 9: July 23 ~ July 292024-07-29T00:00:00+05:302024-07-29T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w9During our Monday meeting, we discussed the progress I made on the nested and composed block issue and outlined what needs to be achieved in the upcoming weeks. Essentially, there were two main goals for this week, but the nested issue had many internal problems. In the current version, dependencies could only have a single code block, and wires and blocks were created for whole dependencies. If there were multiple codes, it would only take one code block and generate the data.json. Therefore, I also needed to fix this and make all links and blocks from multiple levels into a single layer in the backend processing. This is why resolving the nested issue took more time. Additionally, there were many errors that came up during the process, which further delayed progress. However, by the end of the week, the entire nested issue was resolved.

    +

    Goals

      -
    • Complete the first Selenium-based global test
    • -
    • Modification of VC block compostion for Global Input Output
    • +
    • Solve the nested issue completely
    • +
    • Integrate nested code into last week composed block code.
    • +
    + +

    Sub-Goals

    +
      +
    • Understanding backend processing for single-level dependencies.
    • +
    • Creating sample tests to determine necessary wires and blocks for the built zip file.
    • +
    • Fixing the issue of missing nested wires in data.json after backend processing.
    • +
    • Addressing the problem of missing nested internal blocks in data.json.
    • +
    • Modifying the current version’s single code block dependency code to support multi-level dependencies with multiple code blocks.
    • +
    • Writing code for processing wires, including filtering and mapping to required blocks.
    • +
    • Removing unwanted links between global inputs outputs and testing the nested issue code with different examples.
    +

    Images

    +

    Level1 Sample Circuit: +

    + +

    Level2 Inside test_second_block Block (nested level 1): +

    + +

    Level3 Inside test_first_block Block (nested level 2): +

    + +

    Before modification of nested issue - data.json: +

    + +

    After modification of nested issue - data.json: +

    + +

    Python Modules Scripts after processing: +

    + +

    Output including printing at every level and code block: +

    +

    Accomplishment and Challenges

    • -

      Pasting .vc3 file and opening the file in VC

      -

      I first tried putting the circuit file in the Selenium Docker container through a Python script, but it wasn’t a great solution, so I decided to put the circuit file through YAML using Docker commands. After solving this, I needed to open the file from a particular directory in the file manager dialog box. For this, OS-level control was needed, so I used the pyautogui library for opening the file in Visual Circuit.

      -
    • -
    • -

      Building and solving inseure download issue

      -

      There were many errors when building the project as the backend was running on localhost on the local machine and had to be accessed from the Docker container, resulting in fetch errors. These were resolved after modifying setting.py and .env. After that, the browser wasn’t allowing downloads as Chrome considered the HTTP frontend insecure. After some Googling and searching on StackOverflow, I found a solution. Finally, the whole process was completed automatically by Selenium. The complete process is shown in the GIF below. -Selenium based first automated global test:

      +

      Modifying the Current Version to Support Multi Code Block Dependency

    -

    +

    When I completed writing the entire logic, I found that multiple codes were not supported, and extra wires were created that couldn’t connect. Additionally, other code blocks of inter-dependency were not included in data.json, leading to improper linkage. I modified synthesize_modules and changed the logic for adding internal blocks, so they were not treated as whole dependencies. This way, the blocks were added at one level.

    • -

      Improving fetch Global Input and Output function

      -

      In the previous week, I was able to fetch the port data from all blocks, but it was using more iterations and not proper internal functions for fetching the data. So I improved the global input/output function and also added the submit and checklist handlers to pass data to other scripts.

      -
    • -
    • -

      Creating input output blocks automatically from checkbox data

      -

      Depending on the port chosen by the user, the particular global input/output block is generated automatically. It checks the port type, and according to that, the input or output block is generated with the same name. Initially, the global input/output block position is the same as the initial position, and the links are null.

      +

      Understanding Backend Processing by Creating Sample Tests

      +

      To understand the process, I created a sample test and added blocks and wires in data.json. This helped me see how the internal file structure of the zip file works after building. I drew the whole connection and tried to replicate it by modifying synthesis.py using recursive and iterative techniques until level 1 was achieved.

    • - -

      I researched the internal structure of the model and tried to access the links and respective link IDs of each block. After this, I wrote down all possible cases for creating a circuit by the user. One case is where the global input/output has zero links, so one link has to be created, and the source and target assigned. Another case is that there is already a link connected with the block, so according to the port type, the particular source or target has to be removed and a new one assigned. Apart from that, there are other cases that need to be tested in the future, such as if there are two links at the same port, which one to choose. I want to ask the mentors about these cases.

      +

      Fixing the Issue of Missing Nested Blocks After Backend Processing

      +

      I created the process_dependency function, which is called inside synthesize_modules. This function iterates over all blocks of a dependency and creates module Python scripts depending on the block type. Only code block type modules and block values are included in data.json. If there is a dependency inside a dependency, process_dependency is called recursively until no nested dependencies are left. This method ensures that only code blocks are included in the modules directory, while other blocks such as global input/output, dependencies, and constants are filtered out.

    • -

      Saving and retriving old blocks function

      -

      Before generating the .vc3 composed block file, the old model has to be saved so the user can continue working on the circuit without worrying about the blocks global input/output. The model and project info are saved in the stack, and whenever the build is completed, the old model is loaded. There were constant errors, such as storing the data in the stack but it was changing with changes, as I was storing this.activModel directly in the stack, causing changes in the stack. For that, I tried several methods using deepCopy, custom functions, and cloneDeep. Both deepCopy and custom functions didn’t work, so I used the cloneDeep library, which worked without any errors. Similar to the “Save as” functionality, I used that part of the code for generating .vc3 file.

      +

      Writing code for filtering and mapping the wires in backend

      +

      After obtaining the proper blocks in data.json, I focused on the wires. In the current version, level 1 blocks were being added to data.json, so I modified process_dependency to include every wire. There were wires for packages and global input/output, which required proper filtering and the creation of new links between the required blocks. I iterated over all wires selected from process_dependency and segregated them based on the wire’s source and target block ID. After that, in another iteration, I checked each wire with the filtered blocks in data.json to determine if the block was present, adding the key pair of ob:absent. Then, I created process_wire, where all wire mappings were handled. This function contains nested iterations:

    -

    Normal circuit to be converted for block: -

    - -

    Global input ouput port selection : -

    +
      +
    1. The first internal iteration iterates over all valid wires, checks for global input and output, and either saves the wire in a dictionary or removes the entire source-target link based on the presence of the absent value.
    2. +
    3. The second internal iteration checks the wire’s port, replacing package-type wire with the corresponding source-target dictionary generated in the last iteration.
    4. +
    -

    Generated block: -

    +

    This way, new links are created, and the absent value helps the code decide whether to loop again or exit process_wire.

    -

    Internal block structure: -

    +

    PRs Created

    +
      +
    1. Closed and Merged - https://github.com/JdeRobot/VisualCircuit/pull/322
    2. +
    3. Closed and Merged - https://github.com/JdeRobot/VisualCircuit/pull/323
    4. +

    Commits

      -
    1. https://github.com/JdeRobot/VisualCircuit/commit/f9bd5007fa83a4ee2503e1780006a425c1994372
    2. -
    3. https://github.com/JdeRobot/VisualCircuit/commit/51c82737938e5370e1e3047b5ee9d9bdeb117940
    4. -
    5. https://github.com/JdeRobot/VisualCircuit/commit/0d3759b154f110318e6b6b7e29fa61012262238a
    6. -
    ]]>
    Pankaj Keshav Borade
    Coding Period Week 5: June 25 ~ July 012024-06-10T00:00:00+05:302024-06-10T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w5On Monday’s meeting, we discussed possible cases for a composed block. Last week, I created the composed block functionality in that whenever a link exists in both input and output ports, the original link is removed, and a new link with the input/output block attached is added. However, this could cause a problem if someone mistakenly selects a port with internal wiring, potentially causing the robotics application to malfunction. Therefore, blocks with existing wiring should not be shown in the block selection dialog box. Additionally, an input port cannot have multiple wires, as this would create issues in determining which link to use. However, an output port can have multiple links, allowing data to be shared across both links. These changes need to be made this week, and I also need to refine the messy code. Dr. Jose Maria also discussed creating a demo application this week.

    +
  • https://github.com/JdeRobot/VisualCircuit/commit/a367ffb4f22dd3b2396633ef6e909108777e0376
  • +
  • https://github.com/JdeRobot/VisualCircuit/commit/3afffd77ab40766c36ebbbcb1bb603feb38b70eb
  • +
  • https://github.com/JdeRobot/VisualCircuit/commit/91ae5f1a8b4abe80ce3c2edf128467f6376f4644
  • +]]>
    Pankaj Keshav Borade
    Coding Period Week 8: July 16 ~ July 222024-07-22T00:00:00+05:302024-07-22T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w8In the eighth week’s Monday meeting, we discussed the issues I faced last week and the major issues encountered with the demo application, specifically with the composed block feature. Mentors explained the concept and showed the workflow to address the problem using an encoder and decoder example. The major issue was a nested issue, similar to the hurdles experienced in week 3 regarding nested blocks. This week, I completely focused on the nested issue and achieved significant progress compared to week 3.

    Goals

      -
    • Modify the composed block to follow specific rules
    • -
    • Refine the previous block composition code
    • -
    • Create demo applications with composed blocks
    • +
    • Solve the blank dependencies issue - nested issue
    • +
    • Resolve the issue of nested Python files not appearing in the Modules directories - nested issue
    +

    Images

    +

    Nested dependencies in .vc3/ .json file Level 2: +

    + +

    Nested dependencies in .vc3/ .json file Level 3: +

    + +

    Modules directory with all nested python files: +

    +

    Accomplishment and Challenges

    • - -

      As discussed above, we should not have more than one link at the input port, and we need to hide input ports with internal wiring from the block composition dialog box. I modified the globalInputOutput function to segregate ports based on links and port types. In last week’s code, only code blocks were supported, so I made changes to support every block. I also observed an issue with the text being fetched from the package, which was taking a 40-character name. I modified it to take the name port from the labels of the blocks.

      +

      Analyzing the Week 3 Code for the Nested Issue

      +

      Dr. Jose Maria suggested in the meeting to revisit the basics and look for solutions in the internal architecture. Therefore, I recreated the issue from week 3. I wrote two codes: one where a new node is created according to dependencies and new wiring was made. However, this approach was not sustainable due to the potential complexity from multiple dependencies. I dropped that idea. The second approach was recursion-based on frontend side, aimed at getting all dependencies, but it resulted in blank dependencies. After analyzing this solution, I changed the recursion solution from the package level.

    • - -

      For blocks with multiple wiring at the output side, a new link needs to be added with the respective global input/output attached. Unlike the global input block issue, this requires the parent global output block ID and the respective link ID so that the existing link is not modified. These changes were extensive and altered last week’s code, so I refined the overall code. After refinement, the entire global input/output block was tested with all cases and is working as expected.

      +

      Blank dependicies issue

      +

      Upon deeper analyzing into PackageBlockModel and factory.tsx, I observed that I had created nested dependencies that were not present in the interface of PackageBlockModel. I modified the dependency array for every script and added internal dependencies to the respective interface and methods. The solution was close to being resolve, but I took a different approach in week 3.

      +
    • +
    • +

      Python script in modules directory issue

      +

      Initially, the circuit was not building, but the Save as function was working. Due to nested dependencies, the synthesis file could not be processed. I added a recursive solution to get the nested dependencies from the frontend, which was very challenging. The files were being created but not at all levels. After debugging, I found that the issue was the missing internal dependencies at each level and the improper assignment of keys. The above images attached show the progress made this week.

    -

    Commits

    +

    PR Created

      -
    1. https://github.com/JdeRobot/VisualCircuit/commit/03c0b436eaea6d64c97d34d1dd1728b4de9556e6
    2. -
    ]]>
    Pankaj Keshav Borade
    Coding Period Week 6 & 7: July 02 - July 152024-06-10T00:00:00+05:302024-06-10T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w6-7All the issues and possible cases of composed blocks were resolved last week. In the Monday meeting on July 1st, I showed a dummy example of an adder using composed blocks, and the mentors discussed the robotics application that needs to be developed using the composed block feature. In the 6th week, I was busy with personal work and unable to complete my tasks on time, so I requested an extension for the 6th week’s work to be done in the 7th week. During the 6th week, I searched for Gazebo worlds and downloaded several open-source ones. My initial plan was to develop the drone gymkhana of RoboticsAcademy using composed blocks. However, it was not available in the newer version of RADI, so I could not obtain the world and models from RoboticsInfrastructure. I decided to go with the Follow Road exercise from RA, as it was already developed but with an earlier version of VC. I also encountered a major issue in composed block that I need to discuss with the mentors.

    +
  • https://github.com/JdeRobot/VisualCircuit/pull/322
  • +]]>
    Pankaj Keshav Borade
    Coding Period Week 6 & 7: July 02 - July 152024-07-15T00:00:00+05:302024-07-15T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w6-7All the issues and possible cases of composed blocks were resolved last week. In the Monday meeting on July 1st, I showed a dummy example of an adder using composed blocks, and the mentors discussed the robotics application that needs to be developed using the composed block feature. In the 6th week, I was busy with personal work and unable to complete my tasks on time, so I requested an extension for the 6th week’s work to be done in the 7th week. During the 6th week, I searched for Gazebo worlds and downloaded several open-source ones. My initial plan was to develop the drone gymkhana of RoboticsAcademy using composed blocks. However, it was not available in the newer version of RADI, so I could not obtain the world and models from RoboticsInfrastructure. I decided to go with the Follow Road exercise from RA, as it was already developed but with an earlier version of VC. I also encountered a major issue in composed block that I need to discuss with the mentors.

    Goals

    • Develop the Robotics Application with composed block
    • @@ -529,125 +517,126 @@ Selenium based first automated global test:

    Blank script and no internal script in the modules directory issue image: -

    ]]>
    Pankaj Keshav Borade
    Coding Period Week 8: July 16 ~ July 222024-06-10T00:00:00+05:302024-06-10T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w8In the eighth week’s Monday meeting, we discussed the issues I faced last week and the major issues encountered with the demo application, specifically with the composed block feature. Mentors explained the concept and showed the workflow to address the problem using an encoder and decoder example. The major issue was a nested issue, similar to the hurdles experienced in week 3 regarding nested blocks. This week, I completely focused on the nested issue and achieved significant progress compared to week 3.

    +

    ]]>
    Pankaj Keshav Borade
    Coding Period Week 5: June 25 ~ July 012024-07-01T00:00:00+05:302024-07-01T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w5On Monday’s meeting, we discussed possible cases for a composed block. Last week, I created the composed block functionality in that whenever a link exists in both input and output ports, the original link is removed, and a new link with the input/output block attached is added. However, this could cause a problem if someone mistakenly selects a port with internal wiring, potentially causing the robotics application to malfunction. Therefore, blocks with existing wiring should not be shown in the block selection dialog box. Additionally, an input port cannot have multiple wires, as this would create issues in determining which link to use. However, an output port can have multiple links, allowing data to be shared across both links. These changes need to be made this week, and I also need to refine the messy code. Dr. Jose Maria also discussed creating a demo application this week.

    Goals

      -
    • Solve the blank dependencies issue - nested issue
    • -
    • Resolve the issue of nested Python files not appearing in the Modules directories - nested issue
    • +
    • Modify the composed block to follow specific rules
    • +
    • Refine the previous block composition code
    • +
    • Create demo applications with composed blocks
    -

    Images

    -

    Nested dependencies in .vc3/ .json file Level 2: -

    - -

    Nested dependencies in .vc3/ .json file Level 3: -

    - -

    Modules directory with all nested python files: -

    -

    Accomplishment and Challenges

    • -

      Analyzing the Week 3 Code for the Nested Issue

      -

      Dr. Jose Maria suggested in the meeting to revisit the basics and look for solutions in the internal architecture. Therefore, I recreated the issue from week 3. I wrote two codes: one where a new node is created according to dependencies and new wiring was made. However, this approach was not sustainable due to the potential complexity from multiple dependencies. I dropped that idea. The second approach was recursion-based on frontend side, aimed at getting all dependencies, but it resulted in blank dependencies. After analyzing this solution, I changed the recursion solution from the package level.

      -
    • -
    • -

      Blank dependicies issue

      -

      Upon deeper analyzing into PackageBlockModel and factory.tsx, I observed that I had created nested dependencies that were not present in the interface of PackageBlockModel. I modified the dependency array for every script and added internal dependencies to the respective interface and methods. The solution was close to being resolve, but I took a different approach in week 3.

      + +

      As discussed above, we should not have more than one link at the input port, and we need to hide input ports with internal wiring from the block composition dialog box. I modified the globalInputOutput function to segregate ports based on links and port types. In last week’s code, only code blocks were supported, so I made changes to support every block. I also observed an issue with the text being fetched from the package, which was taking a 40-character name. I modified it to take the name port from the labels of the blocks.

    • -

      Python script in modules directory issue

      -

      Initially, the circuit was not building, but the Save as function was working. Due to nested dependencies, the synthesis file could not be processed. I added a recursive solution to get the nested dependencies from the frontend, which was very challenging. The files were being created but not at all levels. After debugging, I found that the issue was the missing internal dependencies at each level and the improper assignment of keys. The above images attached show the progress made this week.

      + +

      For blocks with multiple wiring at the output side, a new link needs to be added with the respective global input/output attached. Unlike the global input block issue, this requires the parent global output block ID and the respective link ID so that the existing link is not modified. These changes were extensive and altered last week’s code, so I refined the overall code. After refinement, the entire global input/output block was tested with all cases and is working as expected.

    -

    PR Created

    +

    Commits

      -
    1. https://github.com/JdeRobot/VisualCircuit/pull/322
    2. -
    ]]>
    Pankaj Keshav Borade
    Coding Period Week 9: July 23 ~ July 292024-06-10T00:00:00+05:302024-06-10T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w9During our Monday meeting, we discussed the progress I made on the nested and composed block issue and outlined what needs to be achieved in the upcoming weeks. Essentially, there were two main goals for this week, but the nested issue had many internal problems. In the current version, dependencies could only have a single code block, and wires and blocks were created for whole dependencies. If there were multiple codes, it would only take one code block and generate the data.json. Therefore, I also needed to fix this and make all links and blocks from multiple levels into a single layer in the backend processing. This is why resolving the nested issue took more time. Additionally, there were many errors that came up during the process, which further delayed progress. However, by the end of the week, the entire nested issue was resolved.

    - +
  • https://github.com/JdeRobot/VisualCircuit/commit/03c0b436eaea6d64c97d34d1dd1728b4de9556e6
  • +]]>
    Pankaj Keshav Borade
    Coding Period Week 4: June 18 ~ June 242024-06-24T00:00:00+05:302024-06-24T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w4In the fourth week’s Monday meeting, I showed a working demo and discussed the previous week’s tasks. The mentors suggested working on block composition for global input/output. The other nested issue is quite complex and needs more time, so this task is postponed to other week.

    Goals

      -
    • Solve the nested issue completely
    • -
    • Integrate nested code into last week composed block code.
    • +
    • Complete the first Selenium-based global test
    • +
    • Modification of VC block compostion for Global Input Output
    -

    Sub-Goals

    -
      -
    • Understanding backend processing for single-level dependencies.
    • -
    • Creating sample tests to determine necessary wires and blocks for the built zip file.
    • -
    • Fixing the issue of missing nested wires in data.json after backend processing.
    • -
    • Addressing the problem of missing nested internal blocks in data.json.
    • -
    • Modifying the current version’s single code block dependency code to support multi-level dependencies with multiple code blocks.
    • -
    • Writing code for processing wires, including filtering and mapping to required blocks.
    • -
    • Removing unwanted links between global inputs outputs and testing the nested issue code with different examples.
    • +

      Accomplishment and Challenges

      + +
        +
      • +

        Pasting .vc3 file and opening the file in VC

        +

        I first tried putting the circuit file in the Selenium Docker container through a Python script, but it wasn’t a great solution, so I decided to put the circuit file through YAML using Docker commands. After solving this, I needed to open the file from a particular directory in the file manager dialog box. For this, OS-level control was needed, so I used the pyautogui library for opening the file in Visual Circuit.

        +
      • +
      • +

        Building and solving inseure download issue

        +

        There were many errors when building the project as the backend was running on localhost on the local machine and had to be accessed from the Docker container, resulting in fetch errors. These were resolved after modifying setting.py and .env. After that, the browser wasn’t allowing downloads as Chrome considered the HTTP frontend insecure. After some Googling and searching on StackOverflow, I found a solution. Finally, the whole process was completed automatically by Selenium. The complete process is shown in the GIF below. +Selenium based first automated global test:

        +
      -

      Images

      -

      Level1 Sample Circuit: -

      +

      -

      Level2 Inside test_second_block Block (nested level 1): -

      +
        +
      • +

        Improving fetch Global Input and Output function

        +

        In the previous week, I was able to fetch the port data from all blocks, but it was using more iterations and not proper internal functions for fetching the data. So I improved the global input/output function and also added the submit and checklist handlers to pass data to other scripts.

        +
      • +
      • +

        Creating input output blocks automatically from checkbox data

        +

        Depending on the port chosen by the user, the particular global input/output block is generated automatically. It checks the port type, and according to that, the input or output block is generated with the same name. Initially, the global input/output block position is the same as the initial position, and the links are null.

        +
      • +
      • + +

        I researched the internal structure of the model and tried to access the links and respective link IDs of each block. After this, I wrote down all possible cases for creating a circuit by the user. One case is where the global input/output has zero links, so one link has to be created, and the source and target assigned. Another case is that there is already a link connected with the block, so according to the port type, the particular source or target has to be removed and a new one assigned. Apart from that, there are other cases that need to be tested in the future, such as if there are two links at the same port, which one to choose. I want to ask the mentors about these cases.

        +
      • +
      • +

        Saving and retriving old blocks function

        +

        Before generating the .vc3 composed block file, the old model has to be saved so the user can continue working on the circuit without worrying about the blocks global input/output. The model and project info are saved in the stack, and whenever the build is completed, the old model is loaded. There were constant errors, such as storing the data in the stack but it was changing with changes, as I was storing this.activModel directly in the stack, causing changes in the stack. For that, I tried several methods using deepCopy, custom functions, and cloneDeep. Both deepCopy and custom functions didn’t work, so I used the cloneDeep library, which worked without any errors. Similar to the “Save as” functionality, I used that part of the code for generating .vc3 file.

        +
      • +
      -

      Level3 Inside test_first_block Block (nested level 2): -

      +

      Normal circuit to be converted for block: +

      -

      Before modification of nested issue - data.json: -

      +

      Global input ouput port selection : +

      -

      After modification of nested issue - data.json: -

      +

      Generated block: +

      -

      Python Modules Scripts after processing: -

      +

      Internal block structure: +

      -

      Output including printing at every level and code block: -

      +

      Commits

      +
        +
      1. https://github.com/JdeRobot/VisualCircuit/commit/f9bd5007fa83a4ee2503e1780006a425c1994372
      2. +
      3. https://github.com/JdeRobot/VisualCircuit/commit/51c82737938e5370e1e3047b5ee9d9bdeb117940
      4. +
      5. https://github.com/JdeRobot/VisualCircuit/commit/0d3759b154f110318e6b6b7e29fa61012262238a
      6. +
      ]]>Pankaj Keshav BoradeCoding Period Week 3: June 11 ~ June 172024-06-17T00:00:00+05:302024-06-17T00:00:00+05:30http://localhost:4000/gsoc2024-Pankaj_Borade/code-w3On the 10th of June, during Monday’s meeting, Dr. JoseMaria explained the Global Input Output issue. Whenever the user creates a Robotics Application circuit, if it needs to generate a block, the user needs to modify the circuit, which is very time-consuming. Therefore, we need to implement the functionality for generating both the block and the circuit without modifying the circuit. This functionality will improve user performance on VC. Additionally, the tasks from the previous week were only partially completed, so they have been reassigned for this week.

      +

      Goals

      +
        +
      • Modification of VC block compostion for Global Input Output [In Progress]
      • +
      • Create first global test workflow [In Progress]
      • +
      • Solve the issue of nested block [In Progress]
      • +

      Accomplishment and Challenges

      • -

        Modifying the Current Version to Support Multi Code Block Dependency

        +

        Understanding the VC Block Composition

        +

        I went through some frontend files such as menu/index.tsx, project-info-dialog.tsx, and editor.ts. These files are responsible for editing the project information on the frontend side. Initially, I thought of adding Global Input Output functionality within the existing project editing interface. However, as I began implementing it, I realized that it was more difficult than anticipated since it required changing the Project Info interface in every file. Therefore, I decided to build a new dialog box that can be opened from the “Save Block” option in the menu bar.

        +
      • +
      • +

        Implementation of Global Input Output on frontend

        +

        For choosing the Global Input Output, all inputs and outputs can be shown, and from there, the Global Input Output can be assigned. I created a new script for the dialog box and modified editor.ts and menu/index.tsx. Currently, all inputs and outputs are displayed. Next week, I will work on assigning the inputs and outputs as Global for the block.

      -

      When I completed writing the entire logic, I found that multiple codes were not supported, and extra wires were created that couldn’t connect. Additionally, other code blocks of inter-dependency were not included in data.json, leading to improper linkage. I modified synthesize_modules and changed the logic for adding internal blocks, so they were not treated as whole dependencies. This way, the blocks were added at one level.

      +

      Checkbox for global input output - dialog box:

      + +

      • -

        Understanding Backend Processing by Creating Sample Tests

        -

        To understand the process, I created a sample test and added blocks and wires in data.json. This helped me see how the internal file structure of the zip file works after building. I drew the whole connection and tried to replicate it by modifying synthesis.py using recursive and iterative techniques until level 1 was achieved.

        -
      • -
      • -

        Fixing the Issue of Missing Nested Blocks After Backend Processing

        -

        I created the process_dependency function, which is called inside synthesize_modules. This function iterates over all blocks of a dependency and creates module Python scripts depending on the block type. Only code block type modules and block values are included in data.json. If there is a dependency inside a dependency, process_dependency is called recursively until no nested dependencies are left. This method ensures that only code blocks are included in the modules directory, while other blocks such as global input/output, dependencies, and constants are filtered out.

        +

        Solving the nested block with different approach

        +

        In this approach, I didn’t use node.dependencies but instead created blocks and wires for internal dependencies. This solution was suggested by ChatGPT, so I tried it. It involved creating internal wires for dependencies and making the linkages. I spent around two days on this, but it didn’t yield the desired results. Additionally, it was suggesting editing many internal components, so I dropped this idea and returned to my nested block solution.

      • -

        Writing code for filtering and mapping the wires in backend

        -

        After obtaining the proper blocks in data.json, I focused on the wires. In the current version, level 1 blocks were being added to data.json, so I modified process_dependency to include every wire. There were wires for packages and global input/output, which required proper filtering and the creation of new links between the required blocks. I iterated over all wires selected from process_dependency and segregated them based on the wire’s source and target block ID. After that, in another iteration, I checked each wire with the filtered blocks in data.json to determine if the block was present, adding the key pair of ob:absent. Then, I created process_wire, where all wire mappings were handled. This function contains nested iterations:

        +

        Solving the nested block with last week approach

        +

        In the previous week, I encountered blank dependencies. I noticed that the interface dependencies contained a single dependency, so I modified it to include an array and used recursive calls to add internal dependencies. Additionally, factory.tsx had not been changed, so I modified that as well. However, the issue of blank dependencies still persists. I need to consult the mentors regarding this issue, as I feel it can be resolved with some more effort.

      +

      Previous PR Updates

        -
      1. The first internal iteration iterates over all valid wires, checks for global input and output, and either saves the wire in a dictionary or removes the entire source-target link based on the presence of the absent value.
      2. -
      3. The second internal iteration checks the wire’s port, replacing package-type wire with the corresponding source-target dictionary generated in the last iteration.
      4. -
      - -

      This way, new links are created, and the absent value helps the code decide whether to loop again or exit process_wire.

      - -

      PRs Created

      -
        -
      1. Closed and Merged - https://github.com/JdeRobot/VisualCircuit/pull/322
      2. -
      3. Closed and Merged - https://github.com/JdeRobot/VisualCircuit/pull/323
      4. -
      - -

      Commits

      -
        -
      1. https://github.com/JdeRobot/VisualCircuit/commit/a367ffb4f22dd3b2396633ef6e909108777e0376
      2. -
      3. https://github.com/JdeRobot/VisualCircuit/commit/3afffd77ab40766c36ebbbcb1bb603feb38b70eb
      4. -
      5. https://github.com/JdeRobot/VisualCircuit/commit/91ae5f1a8b4abe80ce3c2edf128467f6376f4644
      6. -
      ]]>
      Pankaj Keshav Borade
      \ No newline at end of file +
    • Merged - https://github.com/JdeRobot/VisualCircuit-resources/pull/12
    • +]]>Pankaj Keshav Borade \ No newline at end of file diff --git a/docs/_site/index.html b/docs/_site/index.html index 4ca7ca6..1e290ea 100644 --- a/docs/_site/index.html +++ b/docs/_site/index.html @@ -183,9 +183,11 @@

      Mentors

    • Toshan Luktuke
    -

    Official Repository: VisualCircuit
    -Github Issues: Summary
    -Pull Requests: Summary

    +

    Official Repository: VisualCircuit
    +Project Summary: 🔍 Explore Summary
    +About: ℹ️ Explore About
    +Github Issues: View Issues
    +Pull Requests: See Pull Requests

    Recent Posts

    @@ -239,6 +241,45 @@

    +
    +
    + +

    + + Coding Period Week 13: Aug 21 ~ Aug 26 + + +

    + + +

    + + + + + + + + + + + + 3 minute read + + + +

    + + +

    This is the final evaluation week, where ongoing and new errors were resolved, a demo video was created, and the summary report for the final evaluation of G...

    +
    +
    + + + + + +
    diff --git a/docs/assets/images/thirtyeight.png b/docs/assets/images/thirtyeight.png new file mode 100644 index 0000000..c0378cd Binary files /dev/null and b/docs/assets/images/thirtyeight.png differ diff --git a/docs/assets/images/thirtyseven.png b/docs/assets/images/thirtyseven.png new file mode 100644 index 0000000..6ae1221 Binary files /dev/null and b/docs/assets/images/thirtyseven.png differ diff --git a/docs/index.md b/docs/index.md index 6f83409..45a427b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -31,6 +31,8 @@ This GSoC Project focuses on adding a global block composition feature, resolvin - [Toshan Luktuke](https://github.com/toshan-luktuke) -**Official Repository:** [VisualCircuit](https://github.com/JdeRobot/VisualCircuit/) -**Github Issues**: [Summary](https://github.com/JdeRobot/VisualCircuit/issues?q=author%3ABkPankaj+) -**Pull Requests:** [Summary](https://github.com/JdeRobot/VisualCircuit/pulls?q=author%3ABkPankaj+) \ No newline at end of file +**Official Repository:** [VisualCircuit](https://github.com/JdeRobot/VisualCircuit/)
    +**Project Summary:** [🔍 Explore Summary](https://theroboticsclub.github.io/gsoc2024-Pankaj_Borade/summary/)
    +**About:** [ℹ️ Explore About](https://theroboticsclub.github.io/gsoc2024-Pankaj_Borade/About/)
    +**Github Issues**: [View Issues](https://github.com/JdeRobot/VisualCircuit/issues?q=author%3ABkPankaj+)
    +**Pull Requests:** [See Pull Requests](https://github.com/JdeRobot/VisualCircuit/pulls?q=author%3ABkPankaj+)
    \ No newline at end of file