Post

Week 6 - ROS 2 Follow Line GUI Updates and Vacuum Cleaner Implementation (July 14 ~ July 21)

Week 6 - ROS 2 Follow Line GUI Updates and Vacuum Cleaner Implementation (July 14 ~ July 21)

Hey everyone!
This week was quite productive as I continued to work on the ROS 2-native port of the Follow Line and Vacuum Cleaner exercises and made significant progress in implementing the necessary features for a smooth user experience.


Objectives for the Week

  • Update GUI to support publishing of images for the Web UI (Ros Native Follow Line)
  • ROS 2 solution example (Subscriber based WebGUI)
  • Getting started with vaccum cleaner exercise
  • Vaccum Cleaner Solution ( without GUI implementation )
  • Vaccum cleaner exercise Docs (Ros Native)

What I Worked On

This week, I focused on implementing the ROS 2-native solution for the Follow Line exercise and started work on the Vacuum Cleaner exercise. The main tasks included updating the GUI to support image publishing for the Web UI, creating a ROS 2 solution example, and with the Vacuum Cleaner exercise.

Follow Line

The first ticket I worked on was fixing the race condition issue for the /webgui_image topic in the Follow Line exercise. I implemented a solution where the topic is created in the backend on exercise startup. This ensured that the topic existed when the GUI module was initialized. This way, the GUI module can automatically subscribe to the topic and display the images without requiring the user to manually call showImage().

I’m happy to report that this solution is working well and the GUI now displays images as expected!


After working on the GUI module, I moved on to updating the ROS 2 solution example for the Follow Line exercise. This involved creating a new solution that uses the /webgui_image topic to publish images, allowing the GUI to automatically subscribe to the topic and display it in the Web UI. I also ensured that the solution is compatible with the ROS 2-native implementation and follows best practices for publishing and subscribing to topics.

Follow line exercise ROS Native implementation
Follow line exercise ROS Native implementation (Using Subscriber based GUI)


Vacuum Cleaner Exercise

I started working on the Vacuum Cleaner exercise, which is another important part of the ROS 2-native port. The first step was to create a basic solution that implements the core functionality of the exercise without the GUI. This involved setting up the necessary ROS 2 nodes, publishers, and subscribers to handle the vacuum cleaner’s operations.

I approached this by prototyping the laser and bumper topics to get and process data into a similar format as the HAL, but implemented by the user code in a ROS-native manner. I was able to successfully implement the basic functionality of the vacuum cleaner, allowing it to navigate and process the laser and bumper data effectively.

Vacuum cleaner exercise ROS Native implementation
Vacuum cleaner exercise ROS Native implementation (Prototyping)


After this, I worked on and successfully implemented the complete ROS 2-native solution for the Vacuum Cleaner exercise. The solution involves the vacuum cleaner navigating through the environment by first exploring it in a spiral pattern and then moving based on that exploration. Here’s a short video of the implementation in action:

Vacuum cleaner exercise ROS Native implementation
Vacuum cleaner exercise ROS Native implementation

Although the implementation works as intended, I still need to work on the GUI integration for this exercise. This will be my focus in the coming week.

I’ve also started working on the documentation for the Vacuum Cleaner exercise, ensuring it provides clear instructions for users to understand how to implement the exercise in a ROS 2-native manner. This includes details on the topics used, expected behaviors, and how to run the exercise. I am considering adding a section on how to get processed data from the topics similar to the HAL approach but with the ROS 2-native implementation. However, I need to discuss this with my mentors to finalize the approach.


PRs & Issues Raised

Here are the contributions made this week:

Issues

Pull Requests

Key Learnings & Outcomes

  • Resolved race condition issues with backend topic creation for reliable GUI communication
  • Enhanced understanding of ROS 2 publisher-subscriber patterns with web UI integration
  • Implemented vacuum cleaner navigation using spiral exploration and sensor data processing

Thanks for reading! I’m excited about the progress made this week and looking forward to tackling the challenges ahead. If you have any questions or feedback, feel free to reach out!

Until next week —
Ashish

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