Week-8

    2 minute read    

As I was waiting for the Formula1 car to be released for ROS Noetic, meanwhile we decided to add more features to the tool.

User Defined Block

A user defined block was implemented during this week in which the user can specify the number of inputs, outputs and paramaters. The user is provided with the option of enter his own code in that block. The application will then synthesize the block along with its parameters and send it to the Python backend. The interface asks the user to enter the name of the ports and then any block of visualcircuit can be connected to it. The user can also save this block for future use.

Link to Issue & Pull Request

code.png

Python View Code

As a lot of times to properly understand something, you need to know what is going on under the hood. For that purpose we decided that the user must be allowed to see the code inside a block so he can set the parameters accordingly and someone can learn what is going on inside a block or how a block functions. Instead of navigating to the directory where the code is placed, a user can just simply use the frontend to view the code.

Link to Issue & Pull Request

Editable Code

Sometimes a block cannot provide complete functionality along with its parameters, like an example would be a color filter, you can provide the color range with the parameters but sometimes for a color like ‘red’ we need to provide 2 color ranges. Now we cannot add more and more paramaters so it is better to allow the user to modify the code from the frontend to suit his need. A user may modify the behavior of an existing block by just clicking on a block and edit the code behind the block. This block must not change the original block and must be created as a new block and saved if required.

Link to Issue & Pull Requesr

code.png

Consoles

Most of the time, one needs to know whether their applicaiton is working as expected or all of the blocks were created and connected. Also some extra information might be required from the blocks to be displayed. For that purpose a console was created using Tkinter which allows to display information about the project, data from different blocks, their execution speeds as well as provide an interface to exit the application.

code.png

Adding Information and Constant Block

To add comments to the application an information block was addded. Also, to provide paramaters to user defined blocks someone might need extra constants or paramaters which need to be fed to that block. For that purpose, these 2 new blocks were created.

Demo

At the end, an initial demo of properly functioning VisualCircuit can be found below: