xiaohongshu
xiaohongshu
add-repository
Add a new Git repository to the message registry for automatic message type loading. Use when the user wants to support message types from a new ROS2 repository, or when adding support for a new message package.
Full skill instructions
This skill guides you through adding a new Git repository to the zenoh_ros2_sdk/_repositories.py file to enable automatic message type loading.
First, identify the repository URL and explore its structure to find message packages.
The user may provide:
https://github.com/ros2/geometry2.git)geometry2)tf2_msgs)Use curl to check the repository structure:
# List all directories in the repository
curl -s https://api.github.com/repos/ros2/geometry2/contents | \
python3 -c "import sys, json; data = json.load(sys.stdin); \
dirs = [item['name'] for item in data if item['type'] == 'dir']; \
print('\n'.join(sorted(dirs)))"
Check which directories contain message definitions:
# Check if a package has a msg directory
curl -s https://api.github.com/repos/ros2/geometry2/contents/tf2_msgs | \
python3 -c "import sys, json; data = json.load(sys.stdin); \
print('\n'.join([item['name'] for item in data if item['type'] == 'dir']))"
Check what messages are in a package:
# List .msg files in a package
curl -s https://api.github.com/repos/ros2/geometry2/contents/tf2_msgs/msg | \
python3 -c "import sys, json; data = json.load(sys.stdin); \
msgs = [item['name'] for item in data if item['name'].endswith('.msg')]; \
print('\n'.join(sorted(msgs)))"
Identify the repository layout pattern:
Structure: <repo_root>/<package>/msg/<message>.msg
common_interfaces, rcl_interfaces, geometry2msg/ directoryStructure: <repo_root>/msg/<message>.msg or <repo_root>/<package>/msg/<message>.msg
example_interfacesChoose an appropriate commit or tag:
jazzy, iron, humble) for consistency with other repositoriesjazzy to match existing repositories (rcl_interfaces, common_interfaces, example_interfaces, geometry2)rolling branch only if you need latest development featuresCheck available tags:
curl -s https://api.github.com/repos/ros2/geometry2/tags | \
python3 -c "import sys, json; data = json.load(sys.stdin); \
print('\n'.join([tag['name'] for tag in data[:10]]))"
Edit zenoh_ros2_sdk/_repositories.py and add a new entry to MESSAGE_REPOSITORIES:
# Repository name (descriptive, matches repo name)
"repository_name": MessageRepository(
url="https://github.com/ros2/repository_name.git",
commit="jazzy", # Use jazzy for consistency with other repositories
cache_path="repository_name", # Local cache directory name
msg_path="", # Empty for standard structure: <package>/msg/<message>.msg
packages=[
"package1", # List all message packages in this repository
"package2",
# ... more packages
],
),
"package_name": MessageRepository(
url="https://github.com/ros2/package_name.git",
commit="jazzy", # Use jazzy for consistency, or specific tag/commit
cache_path="package_name",
msg_path="", # Adjust if messages are at repo root vs package subdirectory
packages=[
"package_name", # Single package
],
),
# Geometry2 (contains tf2_msgs and other TF2-related packages)
# This repository contains TF2 transform message definitions
# Reference: https://github.com/ros2/geometry2
"geometry2": MessageRepository(
url="https://github.com/ros2/geometry2.git",
commit="jazzy", # Use specific commit/tag for reproducibility
cache_path="geometry2",
msg_path="", # Messages are at <package>/msg/<message>.msg
packages=[
"tf2_msgs", # Contains TFMessage, TF2Error messages
],
),
The PACKAGE_TO_REPOSITORY mapping is automatically generated at the bottom of the file. Verify it includes your new packages:
# Mapping from message package namespace to repository name
PACKAGE_TO_REPOSITORY: Dict[str, str] = {}
for repo_name, repo in MESSAGE_REPOSITORIES.items():
for package in repo.packages:
PACKAGE_TO_REPOSITORY[package] = repo_name
This ensures packages like tf2_msgs map to geometry2 repository.
Run linting to ensure code quality:
# Check for linting errors
# (The linter will automatically check when you edit the file)
Verify the repository works by testing message loading:
from zenoh_ros2_sdk import load_message_type, get_message_class
# Load a message type from the new repository
load_message_type("tf2_msgs/msg/TFMessage")
TFMessage = get_message_class("tf2_msgs/msg/TFMessage")
if TFMessage:
print("Successfully loaded message from new repository!")
rcl_interfaces - Core ROS2 interfaces (builtin_interfaces, action_msgs, etc.)common_interfaces - Standard messages (std_msgs, geometry_msgs, sensor_msgs, etc.)example_interfaces - Example messages and servicesgeometry2 - TF2 messages (tf2_msgs)ros2_interfaces - Additional ROS2 interfacesrosidl_defaults - Default message definitions~/.cache/zenoh_ros2_sdk/ (or $ZENOH_ROS2_SDK_CACHE)jazzy as the default commit tag to match existing repositories for consistency and reproducibilityxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience