Post

Week 5 - Mid Term Evaluation & Phase Two Begins! (July 07 ~ July 14)

Week 5 - Mid Term Evaluation & Phase Two Begins! (July 07 ~ July 14)

Hey everyone!
This week marked an important milestone as I wrapped up the mid-term evaluation and kicked off Phase Two of my GSoC project with JdeRobot. It was a packed week of work to get back on schedule after my exam break, and I’m excited to share the progress.


Objectives for the Week

  • ROS Native Solution for follow_line exercise
  • Image output in the GUI
  • Fix logging in the VNC Console

What I Worked On

We began the week with the Mid-term evaluation. It was a valuable chance to reflect on the progress so far, review the work with my mentors, and set clear goals for the next phase. I’m happy to share that I passed with positive feedback, which has been very motivating.

GSoc Feedback from mentors
GSoc Feedback from mentors

The first ticket I worked on was implementing a solution for the follow line exercise using ROS. With the progress made in the last few weeks, apart from some minor issues, the follow line exercise now supports ROS native implementation. The solution developed is fully written in ROS, except for the GUI which partially uses the GUI module to display images (this will be fixed soon).

Follow line exercise ROS Native implementation
Follow line exercise ROS Native implementation


After working on the ROS native solution, I started work on the image output in the GUI as well as the logging for the VNC Console. These two issues have been hurdles towards completion of the ROS native implementation. I was able to get them working (somewhat), but this is due to race conditions resulting in poor performance. Let me break it down.

Image output in the GUI

I was able to get this working, but the output isn’t as expected. To understand what the issue is, let me give a short summary on how this is being implemented.

Logic flow:

Topic Check: _setup_auto_mode_if_possible() checks if /webgui_image topic exists

If topic exists:

  1. Creates CameraNode("/webgui_image") to subscribe to it
  2. Sets auto_image_mode = True
  3. Starts _unified_image_loop() thread

If topic doesn’t exist:

  1. No camera node created
  2. auto_image_mode = False
  3. Only manual mode available

This way if the topic exists , GUI automatically subscribes to it and starts showing the image published to it in the GUI, if the topic does not exist user can manually use the showImage() function to show an image on the GUI. This has been implemented and is working.

Automatic image sub from topic /cam_f1_left/camera_info :

Automatic image sub from topic
Automatic image sub from topic /cam_f1_left/camera_info

Heres the debugging output from the GUI module:

1
2
3
4
Initializing GUI...
['/cam_f1_left/camera_info', '/cam_f1_left/image_raw', '/cam_f1_left/image_raw/compressed', '/cam_f1_left/image_raw/compressedDepth', '/cam_f1_left/image_raw/theora', '/clock', '/cmd_vel', '/odom', '/parameter_events', '/performance_metrics', '/rosout', '/tf']
GUI Mode: {'auto_mode': True, 'topic_subscribed': '/webgui_image', 'manual_mode_available': True}
GUI initialized!

Now the issue is that:

  • The GUI module needs to be initialized within the user’s code
  • A race condition exists which prevents the automatic functionality from working

The Problem: Timing Race Condition

    1. GUI initializes first → checks for /webgui_image topic → doesn’t exist yet
    1. Sets manual mode only
    1. Then user’s code starts → creates /webgui_image topic
    1. Too late! GUI already decided it’s manual mode

Fix logging in the VNC Console

The VNC logging also faces a similar race condition issue. The following environment variables need to be initialized in the .env file:

1
2
3
export RCUTILS_LOGGING_USE_STDOUT=1
export RCUTILS_LOGGING_BUFFERED_STREAM=0
export RCUTILS_CONSOLE_OUTPUT_FORMAT="[{severity}] [{name}]: {message}"

These need to be initialized before ROS is initialized. Unfortunately, with my current development setup, I haven’t been able to achieve this.

For both issues, I will be taking input from my mentors to see how we can fix this.


Additional Progress

In addition to the main tasks, I also worked on a few other areas. I started work on the vaccum cleaner exercise. Due to how the ros native implementation is being done , i was able to get the exercise working with minimal changes. This means that most if not all exercises will be able to support ROS native implementation with minimal changes. The only hurdle will be to adapt the GUI modules for the exercises to support ROS native implementation.

Vaccum Cleaner exercise
Vaccum Cleaner exercise

I also started work on the documentation for the vaccum cleaner exercise. The documentation is being updated to include the ROS native implementation and how to use it similar to the follow line exercise documentation. I have raised a issue and a PR for the same. Although the documentation is not complete yet, as i need some inputs from my mentors on how to implement few things for the exercise.


PRs & Issues Raised

Here are the contributions made this week:

Issues

Pull Requests


Key Learnings & Outcomes

  • Successfully implemented ROS native solution for the follow line exercise
  • Implemented & gained insights into handling image output in the GUI and logging in the VNC Console
  • Vaccum cleaner exercise ROS native implementation explored
  • Documentation for ROS native implementation (vaccum cleaner exercise) started

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.