A comprehensive Robot Framework library for ROS2 operations
Project description
Robot Framework ROS2 Library
A comprehensive Robot Framework library for testing and automating ROS2 applications.
Features
Core ROS2 Operations
- Topic Operations: List topics, get topic info, echo messages, publish messages, wait for topics
- Service Operations: List services, call services, get service info, wait for services
- Node Operations: List nodes, get node info, wait for nodes
- Parameter Operations: List, get, set parameters, check parameter existence
- Launch Operations: Launch files and packages, find launch files, manage launch processes
- Run Operations: Run nodes directly, run with remapping, find executables, manage node processes
Native ROS2 Python Node Operations (NEW!)
- Native Topic Operations: Direct publishing/subscribing using ROS2 Python nodes
- Native Service Operations: Direct service calls using ROS2 Python service clients
- Native Parameter Operations: Direct parameter access using ROS2 Python parameter clients
- Native TF2 Operations: Direct transform operations using ROS2 Python TF2
- Message Storage: Automatic message buffering and retrieval
- Real-time Communication: Low-latency, high-performance ROS2 communication
Advanced Features
- Process Management: Start, monitor, and terminate ROS2 processes
- Discovery: Find launch files and executables in packages
- Remapping: Topic and service remapping for node execution
- Timeout Support: Configurable timeouts for all operations
- Hybrid Mode: Automatic fallback from native to CLI operations when needed
Installation
pip install -e .
Quick Start
Basic Usage
*** Settings ***
Library ROS2ClientLibrary use_native_node=True
*** Test Cases ***
Test Basic ROS2 Operations
# List available topics
${topics}= List Topics
Log Available topics: ${topics}
# Check if a specific topic exists
${exists}= Topic Exists /chatter
Should Be True ${exists}
# Get topic information
${info}= Get Topic Info /chatter
Log Topic info: ${info}
Test Native ROS2 Operations
# Subscribe to a topic using native ROS2 node
${success}= Native Subscribe Topic /chatter std_msgs/msg/String
Should Be True ${success}
# Publish a message using native ROS2 node
${success}= Native Publish String /chatter "Hello World!"
Should Be True ${success}
# Wait for and get the message
${message}= Native Wait For Message /chatter timeout=5.0
Should Not Be None ${message}
Log Received: ${message}[data]
Launch and Run Operations
*** Settings ***
Library ROS2ClientLibrary
*** Test Cases ***
Test Launch File
# Launch a ROS2 launch file
${process}= Launch Package demo_nodes_cpp talker_listener.launch.py
Should Not Be Equal ${process} ${None}
# Wait for topics to appear
${available}= Wait For Topic /chatter timeout=10.0
Should Be True ${available}
# Echo some messages
${messages}= Echo Topic /chatter count=3
# Clean up
${terminated}= Terminate Launch Process ${process}
Should Be True ${terminated}
Test Run Node
# Run a node directly
${process}= Run Node demo_nodes_cpp talker
Should Not Be Equal ${process} ${None}
# Wait for the node to start
Sleep 2s
# Check if process is running
${running}= Is Process Running ${process}
Should Be True ${running}
# Terminate the process
${terminated}= Terminate Node Process ${process}
Should Be True ${terminated}
Running Examples
# Run the basic test
robot examples/basics/ros2_basic_test.robot
# Run the Nav2 monitoring test
robot examples/medium/nav2_simple_monitoring_test.robot
Tested with Navigation2
This library has been extensively tested with Navigation2 applications. For testing and validation purposes, we used the following repository:
Test Repository: navigation2_ignition_gazebo_turtlebot3
Test Coverage
The library has been validated with:
- ✅ Basic Navigation: Point-to-point navigation tasks
- ✅ Obstacle Avoidance: Dynamic obstacle detection and avoidance
- ✅ Path Planning: Global and local path planning algorithms
- ✅ Recovery Behaviors: Navigation recovery and error handling
- ✅ Multi-robot Scenarios: Testing with multiple robot instances
Note: While extensively tested with this specific repository, the library is designed to work with any ROS2 project and can be used with any ROS2-based robotic system, including custom robots, different navigation stacks, and various simulation environments.
Test Results
Here's an example of the test output and monitoring capabilities:
Documentation
See the docs/ directory for comprehensive documentation and examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ros2_robotframework-0.1.0.tar.gz.
File metadata
- Download URL: ros2_robotframework-0.1.0.tar.gz
- Upload date:
- Size: 3.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3cdf37e3a25af49f7fa5578d5461de5717cee3cd125dcf00e06569c5b40344a
|
|
| MD5 |
1184db260fc6daf137ae64f8146e845b
|
|
| BLAKE2b-256 |
bb080cae4ee77a367b9a8a9a43c9cc8baac45d848b4949082277886040010e91
|
Provenance
The following attestation bundles were made for ros2_robotframework-0.1.0.tar.gz:
Publisher:
release.yml on bekirbostanci/ros2_robotframework
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ros2_robotframework-0.1.0.tar.gz -
Subject digest:
d3cdf37e3a25af49f7fa5578d5461de5717cee3cd125dcf00e06569c5b40344a - Sigstore transparency entry: 514929996
- Sigstore integration time:
-
Permalink:
bekirbostanci/ros2_robotframework@7aaf596a9b762a45eea67163543d17a04c53d906 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/bekirbostanci
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7aaf596a9b762a45eea67163543d17a04c53d906 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ros2_robotframework-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ros2_robotframework-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83ea31ff1a5fb66cc6c6e7287d4df36cff48619fa9473517169ced4416b347e9
|
|
| MD5 |
92b254422645d896edcdcdc7b3caab1f
|
|
| BLAKE2b-256 |
30cbfe51b6fb7880bbf5f01d28a48d7e29a2099a5ea92483059c1c2a22b6effe
|
Provenance
The following attestation bundles were made for ros2_robotframework-0.1.0-py3-none-any.whl:
Publisher:
release.yml on bekirbostanci/ros2_robotframework
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ros2_robotframework-0.1.0-py3-none-any.whl -
Subject digest:
83ea31ff1a5fb66cc6c6e7287d4df36cff48619fa9473517169ced4416b347e9 - Sigstore transparency entry: 514930031
- Sigstore integration time:
-
Permalink:
bekirbostanci/ros2_robotframework@7aaf596a9b762a45eea67163543d17a04c53d906 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/bekirbostanci
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7aaf596a9b762a45eea67163543d17a04c53d906 -
Trigger Event:
release
-
Statement type: