Difference between revisions of "BeagleBoard/GSoC/2021 Proposal/DhruvaGole"

From eLinux.org
Jump to: navigation, search
(Details of implementation)
(Timeline)
Line 71: Line 71:
 
* Introductory YouTube video  
 
* Introductory YouTube video  
 
* Setting up beaglebone-ai i.e flashing [https://beagleboard.org/latest-images up to date Linux image] and connect to local area network (LAN) via either Ethernet or WiFi.  
 
* Setting up beaglebone-ai i.e flashing [https://beagleboard.org/latest-images up to date Linux image] and connect to local area network (LAN) via either Ethernet or WiFi.  
* Try to run existing example codes from this [https://github.com/jadonk/librobotcontrol/tree/master/examples repository]
+
* Try to run bare_minimum code from this [https://github.com/jadonk/librobotcontrol/tree/master/examples repository]
* Making the rc/button.h and rc/led.h libraries compatible with the AI board.
+
* Making the [http://strawsondesign.com/docs/librobotcontrol/button_8h.html button.h] and [http://strawsondesign.com/docs/librobotcontrol/led_8h.html led.h] libraries compatible with the AI board.
 
.
 
.
 
|-
 
|-
 
| June 15 || Milestone #2 ||
 
| June 15 || Milestone #2 ||
* Implementing rc_led_set, rc_led_cleanup, rc_button_cleanup and the rc_set_state functions.  
+
* Implementing rc_led_set, rc_led_cleanup, rc_button_cleanup and the rc_set_state functions specific to beagle AI.  
 
* Testing the above functions
 
* Testing the above functions
 
* Writing documentation for same
 
* Writing documentation for same
* Setting up documentation generators like readthedocs
 
 
|-
 
|-
 
| June 22 || Milestone #3 ||
 
| June 22 || Milestone #3 ||

Revision as of 00:37, 1 April 2021


Proposal for Librobotcontrol Lib support for Beagleboard AI

About Student: Dhruva Gole
Mentors: Jason Kridner
Code: gsoc-application
Wiki: http://elinux.org/BeagleBoard/GSoC/ProposalTemplate
GSoC: GSoC entry

About your project

Project name: librobotcontrol support for BeagleBone AI

Status

This project is currently just a proposal.

Proposal

Completed all the requirements listed on the ideas page. The code for the cross-compilation task can be found here submitted through the pull request #149.

Description

Introduction

BeagleBone gets used a lot in automation tasks, be they in industrial, building, home or otherwise. Software that helps enable individual hobbyists, but can bridge into professional automation tasks, is strongly desired.
The Robot Control Library package contains the C library and example/testing programs for the Robot Control project. This project began as a hardware interface for the Robotics Cape and later the BeagleBone Blue and was originally called Robotics_Cape_Installer. It grew to include an extensive math library for discrete time feedback control, as well as a plethora of POSIX-compliant functions for timing, threads, program flow, and lots more, all aimed at developing robot control software on embedded computers.

This project will enable the control of the Beaglebone's PRUs using remoteproc and rpmsg driver rather than using uio drivers. The PRU is a dual core micro-controller system present on the AM335x SoC which powers the BeagleBone. It is meant to be used for high speed jitter free IO control. Being independent from the linux scheduler and having direct access to the IO pins of the BeagleBone Black, the PRU is ideal for offloading IO intensive tasks.

The library and example programs are primarily written in C, and has been well tested on the BeagleBone Blue.

Why to port it to the BeagleBone AI?
Built on the proven BeagleBoard.org® open source Linux approach, BeagleBone® AI fills the gap between small SBCs and more powerful industrial computers. Based on the Texas Instruments AM5729, developers have access to the powerful SoC with the ease of BeagleBone® Black header and mechanical compatibility. BeagleBone® AI makes it easy to explore how artificial intelligence (AI) can be used in everyday life via the TI C66x digital-signal-processor (DSP) cores and embedded-vision-engine (EVE) cores supported through an optimized TIDL machine learning OpenCL API with pre-installed tools. Focused on everyday automation in industrial, commercial and home applications.
It uses the Dual Arm® Cortex®-A15 microprocessor subsystem and further specs can be found on the official website

What I like most about librobotcontrol, is that it allows new users to get a very intuitive hardware interface for the board it is being used on. Currently it only supports Robotics Cape and the BeagleBone Blue and Black. But with the evolution of AI on the edge, porting this library to be used onboard the BeagleBone® AI will prove to be very useful to a lot of hardware enthusiasts, AI/ML developers and hobbyists to deploy edge computing solutions along with easy to program hardware.

-->

Features to be implemented
  1. Port this package to support the BeagleBone® AI.
  2. Port all the existing examples to run on BeagleBone® AI.
  3. Add the necessary docs on librobotcontrol website .

Details of implementation

Port this library to support the BeagleBone® AI.
The BeagleBone® Blue lacks TI C66x digital-signal-processor (DSP) cores and embedded-vision-engine (EVE) cores which the AI board has. This enables machine learning tools to be integrted with a device capable of programmable hardware IOs. However it still lacks a proper hardware interface which is where the need to provide librobotcontrol support comes in.
The beaglebone AI has many programmable PRU General-Purpose Output and Input pins as give on https://github.com/beagleboard/beaglebone-ai/wiki/System-Reference-Manual#detailed-hardware-design device docs page]
Implement a library to simplify tasks like writing to a pin, reading from a pin, delay, accessing memory.
Port all the existing examples to use remoteproc.
Reimplement stock examples in librobotcontrol repository
  1. bare_minimum
  2. blink
  3. read and write operation of UART buses
  4. test_adc
I intend to add simple examples like LED Blink, LED toggle switch, etc to the examples directory

Timeline

May 4 Proposal accepted or rejected Community Bonding Period and discussion on the project and resources available.
June 1 Pre-work complete Coding officially begins!
June 8 Milestone #1
  • Introductory YouTube video
  • Setting up beaglebone-ai i.e flashing up to date Linux image and connect to local area network (LAN) via either Ethernet or WiFi.
  • Try to run bare_minimum code from this repository
  • Making the button.h and led.h libraries compatible with the AI board.

.

June 15 Milestone #2
  • Implementing rc_led_set, rc_led_cleanup, rc_button_cleanup and the rc_set_state functions specific to beagle AI.
  • Testing the above functions
  • Writing documentation for same
June 22 Milestone #3
  • Implementing rc/time.h library and it's functions rc_nanos_since_epoch(), rc_nanos_since_boot, rc_nanos_thread_time.
  • Testing the above functions
  • Writing documentation for same
June 29 - July 3 18:00 UTC Milestone #4 (Phase 1 evaluations)
  • Demonstrating use of implemented functions by creating and executing an example program to demonstrate use of LEDs and button handlers.
  • Finalizing and documenting everything done till now, submitting first report for evaluation.
July 10 Milestone #5
  • Implementing a tool to convert PASM binaries to ELF binaries, accepted by remoteproc.
  • Testing the above tool
  • Writing documentation
July 17 Milestone #6
  • Porting all the example codes to use the remoteproc based prussdrv
  • Adding more simple examples like LED Blink, LED toggle switch, etc.
July 24 Milestone #7
  • Add option to use clpru for compilation
  • Writing documentation
July 27 - July 31 18:00 UTC Milestone #8 (Phase 2 evaluations)
  • Demonstrating use of tool to convert binaries to ELF binaries and use of clpru
  • Finalizing and documenting everything done till now, submitting second report for evaluation
August 3 Milestone #9
  • Implementing wrapper library
  • Adding documentation for the wrapper library
  • Testing the library
August 10 Milestone #10
  • Solving issues #44, #41, #49
  • Completing the documentation
  • Taking feedback from mentors
August 17 Milestone #11 Completion YouTube video
August 24 - August 31 18:00 UTC Final week Students submit their final work product and their final mentor evaluation
August 31 - September 7 18:00 UTC End of Session Mentors submit final student evaluations

Experience and approach

I have decent experience in C++, C and Python. I have done several projects involving embedded systems like ESP32, I well-versed with freeRTOS. I recently did a project on ESP32, in which I used ESP to control and plot PID loop running on the embedded device, plotting the values on a python GUI. Other than that I have developed firmware for a 3 DOF arm based on a ESP32 custom board. I did a internship with a embedded deviced startup, where I built:

  1. Built TCP network stack for embedded IoT Devices
  2. Implemented Synchronous TCP server using Boost.Asio(C++) and Boost.Thread(C++)
  3. Implemented a tool to calculate round trip time(RTT) of tcp packets

I actively contribute to open source and do a lot of mini projects throughout the year, you can find my several more interesting projects at my github page

Contingency

I believe that if I get stuck on my project and my mentor isn’t around, I will use the resources that are available to me. Some of those information portals are listed below.

  1. https://git.ti.com/pru-software-support-package
  2. https://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs PRU Guide
  3. https://markayoder.github.io/PRUCookbook/ Mark Yoder's cookbook is a excellent guide
  4. Derek Molly's beagle bone guide provides all the information needed for getting up and running with my beagle.
  5. The technical reference manuals provided by TI on am3358 and am5729 are the best source
  6. Processor SDK Linux Software Guide is a good reference material
  7. sysfs remoteproc class documentation

Benefit

The reason I have been pushing is because I understood remoteproc loading is to have better support in mainline, and that means longer-term support for the community
-Jason Kridner