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.
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
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:
- Creates
CameraNode("/webgui_image")
to subscribe to it - Sets
auto_image_mode = True
- Starts
_unified_image_loop()
thread
If topic doesn’t exist:
- No camera node created
auto_image_mode = False
- 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 /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
- GUI initializes first → checks for
/webgui_image
topic → doesn’t exist yet
- GUI initializes first → checks for
- Sets manual mode only
- Then user’s code starts → creates
/webgui_image
topic
- Then user’s code starts → creates
- 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.
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
- ROS 2 solution example (This is a private repo)
- Vaccum cleaner exercise Docs (Ros Native)
- Fix logging in VNC Console
Pull Requests
- Follow line ros native implementation ( using show Image) (This is a private repo)
- initial vaccum cleaner commit
- Update ros-native with humble-devel changes (Week 5 sync)
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