1 minute read

On 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

  • Modify the composed block to follow specific rules
  • Refine the previous block composition code
  • Create demo applications with composed blocks

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.

  • 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.

Commits

  1. https://github.com/JdeRobot/VisualCircuit/commit/03c0b436eaea6d64c97d34d1dd1728b4de9556e6

Updated: