Skip to content

BUG Rosmodel-Parser not working as expected with Services #40

@pglr

Description

@pglr

Description

Running the Rosmodel-parser with Service-Clients and Servers results in wrong results.

Steps to reproduce:

  1. Create Rosmodel with the rosmodel-generator
  2. Add subs,pubs,action-cli & server as well as service-cli & server
  3. output it as a file
  4. parse that file with the rosmodel_parser

Expected behaviour:

All interfaces should show up (pubs, subs, ...):

Rosmodel Parser
Package name: ['test_pkg']
Artifact name: ['test_artifact']
Node name: ['test_node']

Publishers: 
    Name: ['my_pub1'] Type: ['std_msgs.Bool']
Subscribers: 
    Name: ['my_sub2'] Type: ['std_msgs.String']
Service Servers: 
    Name: ['add_two_ints3'] Type: ['example_interface.AddTwoInts']
Service Clients: 
    Name: ['add_two_ints4'] Type: ['example_interface.AddTwoInts']
Action Servers: 
    Name: ['navigate/bot'] Type: ['nav2_msgs.TestThis']
Action Clients: 
    Name: ['navigate'] Type: ['nav2_msgs.NavigateToPose']

Actual behaviour:

Rosmodel Parser
Package name: ['test_pkg']
Artifact name: ['test_artifact']
Node name: ['test_node']

Service Servers: 
    Name: ['add_two_ints3'] Type: ['example_interface.AddTwoInts']
Service Clients: 
    Name: ['add_two_ints4'] Type: ['example_interface.AddTwoInts']

Error/Bug:

Finally found the error to be how the model gets saved into the file and how the parser expects it to be structured. These two don't match so the parser only parses a part of the model.

Rosmodel-Parser Code

rosmodel_parser

Ros-metamodel-core Code

ros_metamodel_core

Solution:

Rearange the expected structure inside the rosmodel-parser to meet the metamodel definition :

rosmodel_parser-fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions