Post

Week 4 - Docs Updates & Frequency Control with Rate (June 30 ~ July 07)

Week 4 - Docs Updates & Frequency Control with Rate (June 30 ~ July 07)

Hey everyone!
This week I got back to my GSoC project with JdeRobot after taking a short break for my exams. It’s been good to dive back in and continue with the ROS 2-native port of the Follow Line exercise.


Objectives for the Week

  • Implement frequency control using rclpy.Rate
  • Update the exercise documentation page with ROS 2 topics and new module info
  • Fix logging in the VNC Console
  • Image output in the GUI

What I Worked On

We started the week with our regular mentor sync-up to review where I left off and set fresh goals for this sprint after my exam break.

The first major task was updating the documentation for the Follow Line exercise. I restructured the page to clearly include ROS 2-native instructions alongside the existing HAL approach. I also got feedback from the mentors, iterated on the structure, and then pushed the updates to a dedicated branch on gh-pages.


After finishing the docs work, I moved on to implementing frequency control using Rate. With this change, the ROS 2-native port now supports all three mechanisms for event loop control:

  • spin()
  • spin_once()
  • create_rate()

This gives users flexibility in choosing how they want to manage execution frequency in their solutions.


I also continued working on fixing the logging behavior in the VNC Console. Right now, logs appear in the Docker terminal but not in the web-based VNC terminal. After some investigation, I found that ROS 2 needs to be initialized with the right environment variables to send logs to stdout, which the VNC console can read. I checked with my mentors and they pointed out that I’d need to modify the .env file in the RoboticsInfrastructure repo to make this work—something I hadn’t realized earlier. This is still in progress.


Another key focus area was the image output in the GUI. I managed to get the pipeline working so that user code can publish processed images to /webgui_image. The GUI module subscribes to this topic and displays the images in the frontend. However, there’s still a blocker: right now, the user still needs to import GUI and call showImage() to trigger the display, even though the message is received on the topic. This seems to be due to ROS initialization and threading issues that I’m continuing to debug.

Weekly progress update meet
Current GUI Output


PRs & Issues Raised

Here are the contributions made this week:

Issues

Pull Requests


Key Learnings & Outcomes

  • Integrated rclpy.Rate to offer user-level frequency control in ROS 2-native code
  • Updated the Follow Line documentation to clearly cover ROS 2-native usage
  • Clarified what changes are required in the infrastructure to enable VNC logging from user scripts
  • Prototyped and validated image publishing to /webgui_image, identifying threading and initialization issues to fix next

I will be having my mid-phase review this coming week.

Thanks for reading! Next up, I’ll finalize the GUI image publishing mechanism and continue refining the frequency and logging logic to better support ROS 2-native workflows.

Until next week —
Ashish

This post is licensed under CC BY 4.0 by the author.