Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pglr opened this issue Sep 13, 2022 · 0 comments
Open

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

pglr opened this issue Sep 13, 2022 · 0 comments

Comments

@pglr
Copy link

pglr commented Sep 13, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant