Skip to content

rosidl_adapter does not emit include guards #911

@Muon

Description

@Muon

Converting a .msg to ROS IDL using rosidl_adapter does not add include guards. This means that, after preprocessing (using GCC for example), definitions may appear multiple times in the source. This is a problem for using OMG IDL tooling with ROS IDL. According to OMG IDL v4.2:

  • Section 7.5.2 "Scoping Rules and Name Resolution" states "An identifier can only be defined once in a scope."
  • Section 7.5.3 "Special Scoping Rules for Type Names" states "Once a type has been defined anywhere within the scope of a module, interface or value type, it may not be redefined except within the scope of a nested module, interface or value type, or within the scope of a derived interface or value type."

I'm not sure whether this is a deliberate difference, but if it is, it should be documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions