A developer-friendly, opinionated framework for ROS 2.
Project description
Genesys: An Opinionated ROS 2 Framework
Genesys is a developer-friendly, opinionated framework for ROS 2 designed to reduce boilerplate, streamline common workflows, and provide a "happy path" for robotics development. It wraps the powerful but sometimes verbose ROS 2 toolchain in a single, intuitive CLI, allowing you to focus on logic, not setup.
Core Philosophy
The goal of Genesys is not to replace ROS 2, but to enhance it. It addresses common pain points for both beginners and experienced developers:
- Complex Build Systems: Automates package creation, dependency management, and the
colconbuild process. - Verbose Boilerplate: Uses decorators (Python) and macros (C++) to simplify node, publisher, and subscriber creation.
- Manual Configuration: Auto-generates and registers launch files, configuration, and executables.
- Fragmented Tooling: Provides a single, unified CLI (
genesys) for creating, building, running, and simulating your projects.
Key Principle: Every Genesys project remains a 100% valid ROS 2 project. You can always fall back to colcon build and ros2 run at any time.
Features
- Unified CLI: A single entry point (
genesys) for all your development tasks. - Project Scaffolding: Create a standardized workspace structure with
genesys new. - Interactive Code Generation: Use
genesys make pkgandgenesys make nodeto interactively build packages and nodes with zero boilerplate, now including interactive selection for node types like publishers, subscribers, services, actions, and lifecycle nodes. - Automated Build & Sourcing:
genesys buildhandlescolconand environment sourcing automatically. - Simplified Execution: Run nodes by name with
genesys run <node_name>or launch entire packages withgenesys launch <pkg_name>. - One-Command Simulation: Launch Gazebo with your world and robot model using
genesys sim <world_file>. - Decorator-Based API: A clean, declarative way to define ROS 2 components in Python.
- Expanded Tooling: Provides a suite of commands for common ROS 2 tasks, from listing nodes and topics to managing parameters and debugging.
- Environment Doctor: A simple command (
genesys doctor) to check if your environment is configured correctly, including a check for missing dependencies viarosdep.
Installation
-
Prerequisites:
- An installed ROS 2 distribution (e.g., Humble, Iron).
- The
ROS_DISTROenvironment variable must be set (e.g.,export ROS_DISTRO=humble).
-
Install the CLI: Clone this repository and run the following command from the project root (
Genesys/):pip install -e .
OR Install without cloning the repo
pip install genesys-framework-cli
This installs the
genesyscommandMake the command available immediately
export PATH="$(python3 -m site --user-base)/bin:$PATH"
(Optional) Add permanently so you don't repeat this step
echo 'export PATH="$(python3 -m site --user-base)/bin:$PATH"' >> ~/.bashrc
-
Verify Installation: Open a new terminal and run the environment checker:
genesys doctorIf all checks pass, you're ready to go!
Quickstart: Your First Project
This workflow demonstrates the "happy path" for creating a new project from scratch.
-
Create a new workspace:
genesys new my_robot_ws cd my_robot_ws
This creates a standard directory structure (
src/,launch/,config/, etc.). -
Create a package with a node: The interactive wizard will guide you through the process, prompting you to select the node type (e.g., Publisher, Subscriber, etc.).
genesys make pkg demo_pkg --with-node
This generates
src/demo_pkg, includingpackage.xml,setup.py, a node filedemo_pkg/demo_pkg_node.py, and auto-generates a corresponding launch file. -
Build the project:
genesys buildThis runs
colcon build --symlink-installand sources the environment for you. Thedemo_pkg_nodeis now a runnable executable. -
Run your node:
genesys run demo_pkg_node
Genesys finds which package the node belongs to and executes
ros2 run demo_pkg demo_pkg_nodeunder the hood.
Command Reference
Workspace & Project Management
| Command | Description |
|---|---|
genesys new <project_name> |
Creates a new, structured ROS 2 workspace. |
genesys make pkg <pkg_name> |
Interactively creates a new Python or C++ package in src/. |
genesys make node <node_name> --pkg <pkg> |
Creates a new node with interactive type selection and registers it within an existing package. |
genesys make interface |
Scaffolds custom message, service, and action files. |
genesys build |
Builds the entire workspace using colcon and sources the environment. |
Execution & Simulation
| Command | Description |
|---|---|
genesys run <node_name> |
Runs a node by its executable name without needing the package name. |
genesys launch <pkg>[:<file>] |
Launches a package's default launch file or a specific one. |
genesys launch --all |
Launches the default.launch.py from all packages in the workspace. |
genesys sim <world_file> |
Starts a Gazebo simulation with the specified world and a robot model. |
ROS 2 Tooling
| Command | Description |
|---|---|
genesys node list |
Lists all active nodes. (Equivalent to ros2 node list) |
genesys node info <node> |
Displays information about a specific node. (Equivalent to ros2 node info) |
genesys topic list |
Lists all active topics. |
genesys topic info <topic> |
Displays information about a topic. |
genesys topic echo <topic> |
Prints messages from a topic to the console. |
genesys topic pub <topic> <msg_type> <args> |
Publishes a message to a topic from the CLI. |
genesys service list |
Lists all active services. |
genesys service call <srv_name> <srv_type> <args> |
Calls a service from the CLI. |
genesys param list |
Lists parameters for a node. |
genesys param get <node> <param> |
Gets a parameter value from a node. |
genesys param set <node> <param> <value> |
Sets a parameter value on a node. |
genesys param dump |
Dumps all parameters from a node to a file. |
genesys debug record <topics> |
Records data from specified topics. |
genesys debug replay <file> |
Replays recorded data from a .db3 file. |
genesys doctor |
Checks for common environment and configuration issues. |
The Genesys Way: Decorators & Auto-generation
Genesys dramatically reduces boilerplate by using Python decorators to define ROS 2 constructs. When you create a node with make node, it comes pre-filled with a working example.
Example: A Simple Publisher Node
from genesys.decorators import node, timer, publisher
from genesys.helpers import spin_node
from std_msgs.msg import String
@node("my_talker_node")
class MyTalker:
def __init__(self):
self.counter = 0
@timer(period_sec=1.0)
@publisher(topic="chatter", msg_type=String)
def publish_message(self):
"""
This method runs every second. The String it returns is
automatically published to the 'chatter' topic.
"""
msg = String()
msg.data = f"Hello from Genesys! Message #{self.counter}"
self.logger.info(f'Publishing: "{msg.data}"') # logger is auto-injected
self.counter += 1
return msg
def main(args=None):
spin_node(MyTalker, args)
if __name__ == '__main__':
main()
When you run genesys make node or genesys build, the framework:
- Scans for these decorators.
- Auto-registers
my_talker_nodeas an executable insetup.py. - Auto-generates/updates a launch file (
launch/<pkg_name>_launch.py) to include this node.
This means your node is ready to run immediately without manually editing any build or launch files.
Example: A Simple Subscriber Node
from genesys.decorators import node, subscriber
from genesys.helpers import spin_node
from std_msgs.msg import String
@node("my_listener_node")
class MyListener:
def __init__(self):
# The logger is automatically injected by the @node decorator.
self.logger.info("Listener node has been initialized.")
@subscriber(topic="chatter", msg_type=String)
def message_callback(self, msg):
"""
This method is called whenever a message is received on the 'chatter' topic.
The message is automatically passed as an argument.
"""
self.logger.info(f'I heard: "{msg.data}"')
def main(args=None):
spin_node(MyListener, args)
if __name__ == '__main__':
main()
New Decorators
In addition to the ones above, Genesys introduces new decorators for advanced ROS 2 concepts, further reducing boilerplate:
@lifecycle_node: Defines a ROS 2 Lifecycle Node and handles the state callbacks (on_configure,on_activate, etc.).@service: Registers a service server and automatically handles requests and responses.@action_server: Registers an action server with support for feedback and result generation.@parameter: Defines a node parameter, automatically loading values from a YAML config file and injecting them.
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 genesys_framework_cli-0.1.3.tar.gz.
File metadata
- Download URL: genesys_framework_cli-0.1.3.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92446ff2e21cc80c831a243a1c652f1574ba79e016cf6fb87fae16213eb4299b
|
|
| MD5 |
8f9681b796b9d4c64574a633867480b4
|
|
| BLAKE2b-256 |
ab9f4ed7dad2dc3d1d61c50ed68f79a09cff77c9c0151522dc7eb3cd393c70b6
|
File details
Details for the file genesys_framework_cli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: genesys_framework_cli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 37.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2da38de5ba005d7d22874fbe0e28349190dac6b3fa738005357b87406b91b40a
|
|
| MD5 |
64e0fec5113a161d7fd48025faeda010
|
|
| BLAKE2b-256 |
cd6f69d8d3796f51c7b32ecb2533f0fc9f0ec63117e5f167f70873fb513c53f1
|