# The Linux Foundation - GSoC 2021 Project Report
### LIDAR visualization application on AGL using ROS2
This report is a requirement of the `Final Evaluations phase` of [Google Summer of Code](https://summerofcode.withgoogle.com/) program. I [worked](https://summerofcode.withgoogle.com/projects/#6514840987762688) with the Linux Foundation, under Automotive Grade Linux on the project to ```LIDAR visualization application on AGL using ROS2```, the original proposal for the project can be found [here](https://growupboron.github.io/blog/the-linux-foundation-gsoc-2021-proposal/).
[The Linux Foundation](https://www.linuxfoundation.org/) is the nonprofit consortium dedicated to fostering the growth of Linux. [Automotive Grade Linux](https://www.automotivelinux.org/) is an open-source project hosted by The Linux Foundation that is building an open operating system and framework for automotive applications.
## Project Deliverables
* Integrate yocto based [meta-ros](https://layers.openembedded.org/layerindex/branch/master/layer/meta-ros/) layer with Automotive Grade Linux (AGL) [layers](https://docs.automotivelinux.org/en/master/#3_Developer_Guides/6_AGL_Layers/1_Overview/) to support Robot Operating System (ROS 2) infrastructure.
* Create [custom recipes](https://wiki.yoctoproject.org/wiki/TipsAndTricks/Creating_Recipes_for_ROS_modules) for ROS modules to support [LIDAR drivers](https://github.com/YDLIDAR/ydlidar_ros2_driver) and other unmet dependencies that might arise.
* Develop a visualization application for AGL by implementing [hector mapping](https://layers.openembedded.org/layerindex/recipe/33068/) using LIDAR using ROS2.
* Ultimately documenting the whole implementation methodology, so that the developer community can easily carry on with and independently develop relevant ROS applications on AGL.
## Community Bonding
Owing to timezone differences, my mentor and I scheduled the right time and medium for contact: triweekly Zoom Calls and constant communication over Signal and IRC. Further refinement of objectives and goals were set to ensure that the proposed plan of action for the development of ```meta-agl-ros2``` was in line with the priorities of the project. Setup the [personal blog](https://growupboron.github.io/blog/) to log progress for future reference and help future Google Summer of Code applicants and aspiring student developers alike. I started engaging actively within the AGL community by regularly participating in the [Weekly Developer Call](https://wiki.automotivelinux.org/dev-call-info). Since I had prior academic commitments and was already well accustomed to the AGL community. We decided to go ahead with the ```Coding Phase``` earlier than the GSoC timeline.
## Work Done
### Weekly Updates
All of the progress is well documented in the form of weekly updates over the ```agl-dev-community``` [mailing list](https://lists.automotivelinux.org/g/agl-dev-community/search?q=GSoC) and [personal blog](https://growupboron.github.io/blog/) :
- Week 0 & 1 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9210) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-0-1/))
- Week 2 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9231) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-2/))
- Week 3 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9249) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-3/))
- Week 4 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9259) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-4/))
- Week 5 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9306) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-5/))
- Week 6 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9318) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-6/))
- Week 7 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9335) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-7/))
- Week 8 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9344) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-8/))
- Week 9 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9362) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-9/))
- Week 10 ([mailing list](https://lists.automotivelinux.org/g/agl-dev-community/message/9369) | [blog](https://growupboron.github.io/blog/gsoc-weekly-update-week-10/))
### Commits / Change Requests
- [Gerrit: #26559](https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-devel/+/26559) : meta-agl-ros2: Support for ros2 minimal & ydlidar
- [Gerrit: #26568](https://gerrit.automotivelinux.org/gerrit/c/AGL/AGL-repo/+/26568) : Add meta-ros layer as external dependency
- [Gerrit: #26384](https://gerrit.automotivelinux.org/gerrit/c/AGL/documentation/+/26384) : Replaced $AGL_TOP with <AGL_TOP> where relevant | master
- [Gerrit: #26396](https://gerrit.automotivelinux.org/gerrit/c/AGL/documentation/+/26396) : Replaced $AGL_TOP with <AGL_TOP> where relevant | koi
- [Gerrit: #26397](https://gerrit.automotivelinux.org/gerrit/c/AGL/documentation/+/26397) : Replaced $AGL_TOP with <AGL_TOP> where relevant | jellyfish
- [Github: #858](https://github.com/ros/meta-ros/pull/858) : google-benchmark: use "main" branch
- [agl-images-gsoc21-boron](https://drive.google.com/drive/folders/1qpzreI1uwKjW-Jj9n70i7gGba6-QwPka?usp=sharing) : Contains all the iterations of AGL images and SDKs built over the span of GSoC.
- [WIP] [agl-liq](https://github.com/growupboron/agl-liq) : Porting [liq](https://github.com/shigmas/Liq) to AGL for being the LIDAR visualization application.
**NOTE:** Some of the [Change Requests](https://gerrit.automotivelinux.org/gerrit/q/hashtag:%2522gsoc%2522+(status:open+OR+status:merged)+owner:shankhoghosh123%2540gmail.com) might be going in through review and further changes can take place.
## Final Comments
### Future Work
- Develop and finesse [agl-liq](https://github.com/growupboron/agl-liq) by porting [liq](https://github.com/shigmas/Liq) to AGL for being the LIDAR visualization application.
- Becoming proficient with AGL developer tools, especially `Gerrit` has been quite a worthwhile effort.
- Balancing academics along with GSoC was quite hectic but due to the mutual understanding with the mentors, I was able to overcome this.
### What did I learn?
- I was able to learn how to develop using the Yocto project and correspondingly improve my understanding on ROS2 framework.
- I also learned a lot more about Automotive Grade Linux organization especially their developer tools, workflow, and developmental pipeline.
- My technical writing skills have definitely become better and have led me to contribute more effectively and robustly to academic research projects.
### Post GSoC
- I plan to maintain and add to the Automotive Grade Linux’s repositories for the foreseeable future and work on continually improving it.
- I will keep contributing and help other new contributors to explore and learn projects in this organization.
- This project gave me the necessary experience and rigor to contribute meaningfully and efficiently to my role as Data Acquisition Engineer for [FSAE Team Fateh](https://teamfateh.com/).
I would like to express my gratitude to my mentors [Jan-Simon Möller](https://www.automotivelinux.org/blog/developer-showcase-jansimon-moller/) and [Walt Miner](https://www.automotivelinux.org/about/leadership/) for mentoring me through GSoC and also to the whole AGL community for being so inclusive and friendly.
Overall, It was one of the best professional experience that I undertook this year. I have been fascinated with AGL for as long as I have been a Data Acquisition Engineer for [FSAE Team Fateh](https://teamfateh.com/) and the fact that I was able to contribute to the organization is an honor.