Repository navigation
Replies: 1 comment 7 replies
|
Hi @bcap52 , Nice solution for FollowLine exercise! Yes, for now the approach is to mirror the existing Python HAL as closely as possible. The main focus is on making the access to robot sensors and actuators as easy as possible to the RoboticsAcademy users. A cpp library providing some methods for that is a good approach. In addition, once that milestone is achieved, you could explore also other alternative C++ API designs, measuring and reporting their advantages. Cheers, |
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey everyone, I'm Abdulrehman, a 3rd year Robotics student currently applying for GSoC 2026 with JdeRobot, specifically for Project #2: Extending C++ support for more exercises in RoboticsAcademy.
As part of the application process I set up the RADI Docker environment and worked through the Follow Line exercise to get familiar with the platform and workspace. I can see why they ask applicants to do this. It gives you a real feel for how the HAL works, how exercises are structured, and how the simulator behaves before you start thinking about contributing.
For the exercise itself my approach was fairly straightforward. I converted the camera image to HSV and created two binary masks for the upper and lower color bounds, combining them with a bitwise OR to isolate the red line as white pixels against a black background. From there I used image moments to find the centroid of the line (m10/m00) and compared it against the image center to get my error.
For control I went with a simple PD controller, kept linear speed constant and used the proportional and derivative terms to drive angular velocity. One thing I caught early on was getting the error sign backwards which made the car turn the wrong way. Quick fix but a good reminder that sign conventions matter more than you'd think.
Demo video
One thing I've been thinking about since completing this is that the Follow Line exercise is one of the two that already supports C++ and having done it in Python first I can already see where the HAL abstraction does the heavy lifting. For the project itself I'm curious, when extending C++ support to new exercises is the approach typically to mirror the existing Python HAL as closely as possible, or is there room to design the C++ API with the language's strengths in mind like performance, type safety, and lower level hardware access?
Would love to hear thoughts from the mentors or anyone who's worked on the C++ side of the codebase.
All reactions