AI & Robotics Lab
18 subscribers
71 photos
26 videos
9 files
100 links
Explore AI code generation, robotics, and ROS with original projects and hands-on guides. Follow along as I share my experience, code samples, and tips for building intelligent systems.
Download Telegram
ROS2 Nodes Factory

I'm excited to share a project I've been working on recently: a ROS2 nodes factory! ๐Ÿ› 

After taking a short break from my regular posts, I've been focused on developing a framework that can automatically generate ROS2 components using AI. The project, called Codestral ROS2 Generator, is now available on my GitHub page.

โš ๏ธ What makes this project special?

The framework follows a "test-driven coding" philosophy - you simply define your ROS2 interfaces and write tests for how your node should behave. Then the generator, powered here by Mistral's Codestral latest model, creates code that satisfies those requirements.

For example, I've included a working implementation of a service that calculates object height (remember my previous experiments with this). The generator was able to create a fully functional ROS2 service node that passes all 14 tests.

๐Ÿš€ Getting started

๐Ÿ““Project's README and Example instruction explain how to setup and use the generator - you can try it in action.
๐Ÿ“” The documentation explains the system architecture and guides you through creating custom ROS2 nodes for your specific needs.

The project integrates with Mistral AI's powerful Codestral model to understand ROS2 concepts and generate appropriate code. While my previously described method for getting Codestral API keys is not supported yet, you can obtain a free experimental key from the API Keys section of La Plateforme, which works perfectly with this project (also it allows to try any other Mistral models).

๐Ÿค Contributions welcome

I'd love to collaborate with anyone interested in improving this framework. Whether you want to add support for more ROS2 components, improve the code generation, or enhance the examples, contributions are very welcome!

Happy generating! Let me know if you try it out!

#ROS #Codestral #CodeGenerating
โšก1๐Ÿ”ฅ1
Codestral ROS2 Generator tech description.

๐Ÿ‘‹ I've just published a detailed technical overview in Russian of my Codestral ROS2 Generator project - an AI-powered solution that automatically generates ROS2 components (nodes, services, actions) using the Codestral model.

๐Ÿ’กThe article covers:
- Complete project architecture.
- Key classes and their interactions.
- The generation workflow from prompt to tested code.
- Performance metrics and evaluation.

Check out the full technical breakdown on my blog: Let's Go Design

#CodeGenerating #ROS #Codestral
๐Ÿ”ฅ1๐Ÿ†’1
๐ŸŒ Codestral ROS2 Gen: Network Scanner Extension Now Available!

โšก๏ธHere it is - the second release of Codestral ROS2 Gen with a powerful new feature: the NetworkScanner!

๐Ÿ” What's New in This Release
The NetworkScanner module with efficient network discovery capabilities:
โ€ข Fast ICMP-based scanning for host discovery
โ€ข Asynchronous packet handling for optimized performance
โ€ข Configurable scan parameters (timeout, interval, etc.)
โ€ข Seamless integration with the existing ROS2 generation pipeline

๐Ÿ›  How It Works
The NetworkScanner uses optimized ICMP echo requests (pings) to detect active hosts on a network. It employs an innovative approach with:
โ€ข Synchronous packet sending for precise timing control
โ€ข Asynchronous response collection for efficient handling
โ€ข Smart timeout management for reliable results
โ€ข Clean ROS2 message publishing for network status information

๐Ÿงช Key Components
โ€ข network_scanner.py: Core scanning orchestration
โ€ข network_host.py: Host state management
โ€ข scan_operation.py: Context-managed scanning operations
โ€ข network_parser.py: Network targets parsing

Full codebase documentation is available on projects's GitHub pages ๐Ÿ“™

๐Ÿš€ Try It Yourself
The detailed example documentation shows how to generate your own network scanner nodes. You can even use the standalone nscan command-line tool for quick testing!

This extension builds upon core generation system, demonstrating how the Codestral generator can create complex, functional ROS2 components with system-level interactions. ๐Ÿค–

#ROS2 #AI #NetworkScanning #Robotics #CodeGenerating #Codestral
โšก1๐Ÿคฏ1
๐Ÿ‘จโ€๐Ÿ”ฌTesting Results: ROS2 Network Scanner Generation

I want to share the results from my test of ROS2 Network Scanner generation example.

After running 30 iterations of generating the ROS2 Network Scanner:
โ€ข Total test duration: ~6 hours 15 minutes
โ€ข Average successful generation time: ~2 minutes per attempt
โ€ข Distribution of attempts: Right-skewed (median: 4, mean: 6.7)

This means that, on average, the generator produces working code in about 13 minutes - quite reasonable performance for automated code generation in my opinion!

Failure Analysis
Looking at where generation stopped, the distribution clearly demonstrates the generator's stability:
โ€ข Over 80% stopped at the testing stage
โ€ข ~15% were successful attempts
โ€ข Only about 5% failed during the PARSING or GENERATION stages

Test Coverage Patterns
Examining the test pass rates revealed two distinct patterns:
โ€ข Basic functionality (7 tests): Node startup with valid/invalid parameters and handling overlapping scans using nscan utility
โ€ข Advanced scenarios (9 tests): Including handling invalid JSON format in the node <-> nscan interface and managing outdated scan results

This suggests that generating code with specific behavior for edge cases remains challenging.

I've included all metrics and analysis notebooks in my project repository, so feel free to explore the data yourself!

#ROS2 #AI #NetworkScanning #Robotics #CodeGenerating #Codestral #testing
๐Ÿ”ฅ2