Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lovemehta/ca0799f36ad3a2436307f98773ddc404 to your computer and use it in GitHub Desktop.
Save lovemehta/ca0799f36ad3a2436307f98773ddc404 to your computer and use it in GitHub Desktop.
Work done for RoboComp under Google Summer of Code - 2017

About me and the project:

My name is Love Mehta. I am a Bachelor of Technology (B.Tech), Final Year, Computer Science and Engineering undergraduate student at Indian Institute of Technology, Ropar.

The main goal of the project was to extend the current component generation tool of RoboComp to be capable of producing JavaScript based components. Here is a blog post that contains a brief explanation of the project.

Main checkpoints of the project in the GSoC Duration:

  1. Getting familiar with Ice framework.
  2. Integrating Ice 3.6 with RoboComp
  3. Making a JavaScript based RoboComp component
  4. Integrating the Ice 3.7 with RoboComp (ZeroC released the new version during the summer)
  5. Understanding and Implemeting JS support (only for client based components) in Robocompdsl Tool

I have added 5 blogposts to document my work in proper way. Some of them are posted on the robocomp website here alongwith other projects. Rest of them will be added the website soon. I have hosted them on github and used th elinks below as and when required.

Here is the link to the repository which contains the new version of RoboComp framework, which supports JavaScript component functionality - RoboComp- JS

I have updated all the files I have changed and made this repository to support my work for the RoboComp framework. Most of the work was committed in chunks and the work record is known by mentor informally through hangout chats. The code generation tool currently does not covers all the aspects of the component code generation, working parallel to the python and cpp code generation but it is well equipped with basic code generation in JavaScript supporting the importing of pre defined interfaces and generating components that can connect to pre defined interfaces.

The Introductory blog post - link

Initially I was not even aware of a twig in the haystack. I gradually started experimenting with the codebase and referred to the tutorials listed here to gain some good understanding of the framework. Initial interactions with the mentors helped me setup my mind with the work ethics and the working environment in the community. The link in the title explains about the project in detail. I also was not experienced much with python but cpp and js were my strengths. I worked on my pyhton skills and also studied about the cog tool later on as required by the project.

Integrating the Ice 3.6 into RoboComp

Until the ice 3.5 version ZEROC did not use to provide any kind of support for the js components. But with the introduction of ice 3.6 they started providing the ice module with node. Now it was possible to write js components amd connect them to other language components using the ice framework. I faced several challenges while integrating the 3.6. The complete blog post can be read here.

Making a JavaScript based RoboComp component

I wrote the first ever RoboComp component in JS which can connect to other components by importing their interfaces. This required going through the ice demos and asking some questions on the ice forums. Later on I also found out that ice 3.6 did not support hashmaps which I was trying to use and was failing at in making the component. It was just badluck and was fine when ice 3.7 was realeased.

A tutorial for making a js compoent exists here.

Integrating Ice 3.7:

Integration of Ice 3.7 was easy it required the similar updates in the build files. Some of the new functionality was added and it can be read on the ICE website too.

Commits corresponding to changes are here(These commits are not in a chronological significant timeline. They were done later on by me when I had to publish my work for submission): Update

** Understanding and Implemeting JS support (only for client based components) in Robocompdsl Tool:**

The robocompdsl tool is the tool used for generation of components in the framework. Now earlier it only supported the cpp and pyhton code generation by parsing the cdsl and idsl files. After a lot of work I managed to add some basic code generation functionality for js and we were good to go. Now I am well acquainted with the code an dwill be adding full support soon. This is the major portion of the component generation process. There are several concepts and functionalities involved which are explained here in this post. An important commit can be seen here - COG

Generating a js component Tutorial:

Last post was about adding support to the robocompdsl tool. Now we show how to generate a tool and work on it. A short Tutorial on generating a component using the updated robocompdsl tool is given here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment