Skip to content

feat: Add ROS Action (.action) schema parser #13

@zhexuany

Description

@zhexuany

Issue Description

Robocodec does not support parsing ROS action definitions (.action files). Actions are used for long-running goal-oriented tasks in ROS (e.g., navigation, manipulation).

Background

A ROS action file defines three messages separated by "---":

# Example: Fibonacci.action
int32 order  # Goal
---
int32[] sequence  # Result
---
float32 progress  # Feedback

The three parts are: Goal, Result, and Feedback.

Proposed Solution

Extend the schema parser to handle .action files with a new ActionSchema type.

Requirements

  • Add action_parser.rs module in src/schema/parser/
  • Parse action definition format (Goal --- Result --- Feedback)
  • Support ROS1 actionlib and ROS2 action formats
  • Integrate with unified parser (auto-detect .action files)
  • Add ActionSchema type to src/schema/ast.rs
  • Support action type references in message schemas
  • Add unit tests for various action formats
  • Add integration tests with real .action files
  • Update documentation

Acceptance Criteria

  1. Can parse standard ROS action definitions
  2. Correctly separates Goal, Result, and Feedback messages
  3. Handles nested types and arrays in action definitions
  4. Round-trip parsing preserves all information

Test Cases

  • Simple actions (primitive types only)
  • Actions with arrays
  • Actions with nested message types
  • Real-world actions (e.g., control_msgs/FollowJointTrajectory, fibonacci/Fibonacci)

References


Priority: P1 - Core ROS completeness
Estimated effort: Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-P1High priority - core completenessschemaRelated to schema parsing (msg, srv, action, IDL)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions