IDE Rule: Ros Ros2
IDE Rule: Ros Ros2 is a verified IDE_RULE blueprint on Promptally in Framework IDE Rules optimized for leading AI models. Cursorrules_Mdc specification for IDE Rule: Ros Ros2. Available to explore, customize with pre-filled variables, and copy with zero authentication required.
Technical Specifications
| Specification | Value |
|---|---|
| Artifact type | IDE RULE (Framework IDE Rules) |
| Compatible engines | Universal / Model Agnostic |
| Input variables | None (pre-filled) |
| Approximate tokens | 536 |
| Source file | .cursorrules |
| Access tier | Free public (MIT) |
Pre-Filled Template
--- description: ROS and ROS2 rules for packages, nodes, launch files, messages, services, actions, simulation, and testing globs: ["**/*.py", "**/*.cpp", "**/*.hpp", "**/*.h", "package.xml", "CMakeLists.txt", "**/*.launch.py", "**/*.msg", "**/*.srv", "**/*.action", "**/*.urdf", "**/*.xacro"] alwaysApply: false --- # ROS and ROS2 Rules ## Package Structure - Keep packages focused on one robot capability or integration boundary. - Use `package.xml` and `CMakeLists.txt` or `setup.py` consistently with the package type. - Keep launch files under `launch/`, configs under `config/`, messages under `msg/`, services under `srv/`, and actions under `action/`. - Use namespaces and remapping instead of hardcoded topic names when nodes may be reused. ## Nodes and Interfaces - Keep nodes small and composable. - Use parameters for tunable behavior; declare ROS2 parameters explicitly. - Prefer messages for state streams, services for quick request/response operations, and actions for long-running goals with feedback. - Use standard message types before creating custom interfaces. - Document topic, service, action, frame, and parameter contracts. ## Timing and Frames - Use ROS time when simulation or bag replay matters. - Use `tf2` for frame transforms and document frame names. - Avoid blocking callbacks; move long work to timers, worker threads, or actions. - Set QoS profiles intentionally for sensor data, latched-like config, and reliable command paths. ## Build and Test - Use `colcon build` and keep package dependencies explicit. - Run linters and formatters used by the workspace. - Add launch tests or integration tests for multi-node behavior. - Use simulation, bags, or recorded fixtures for repeatable sensor scenarios. - Test failure cases such as missing transforms, stale sensor data, and unavailable services. ## Common Mistakes - Do not hardcode absolute paths; use package share directories. - Do not publish commands without validating frame, units, and timestamp assumptions. - Do not create custom messages when a standard message fits. - Do not ignore QoS mismatches between publishers and subscribers.
How to use this ide rule
- Review the pre-filled example and source files above.
- Copy the template or download
.cursorrules, then use it in your model, IDE, or workflow tool. - Compare your result with the sample output when one is provided.
Frequently Asked Questions
How do I use IDE Rule: Ros Ros2?
Open the ide rule on Promptally, review the pre-filled example, then copy the template or download .cursorrules and paste it into your model, IDE or workflow tool. IDE Rule: Ros Ros2 is a static blueprint with no dynamic variables. Copy it and use it as-is.
Is IDE Rule: Ros Ros2 free?
Yes. IDE Rule: Ros Ros2 is free to view, copy and download on Promptally without creating an account. It is published under the MIT license.
What variables does IDE Rule: Ros Ros2 need?
IDE Rule: Ros Ros2 is a static blueprint with no dynamic variables. Copy it and use it as-is.