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

Services Don't Seem To Work #20

Open
nate-jackson opened this issue Apr 30, 2018 · 20 comments
Open

Services Don't Seem To Work #20

nate-jackson opened this issue Apr 30, 2018 · 20 comments

Comments

@nate-jackson
Copy link

With the latest rmw_coredx_cpp, we aren't seeing services working correctly.

If we run ros2 run demo_nodes_cpp add_two_ints_server and ros2 run demo_nodes_cpp add_two_ints_client, the client never finds the server.

When we run ros2 topic list, we see services as well as regular pub/sub topics. We've also seen that get_service_names_and_types is not implemented, which makes ros2 service list fail. Normal ros2 behavior is that ros2 topic list would list pub/sub topics only, and ros2 service list lists services only.

@ClarkTucker
Copy link
Contributor

Are you sure you're looking at the latest? get_service_names_and_types() is implemented...

@nate-jackson
Copy link
Author

We were using as of 4-25. We'll check the latest.

@nate-jackson
Copy link
Author

Here is what we see on the latest: https://github.com/tocinc/rmw_coredx/blob/27adf9cb1d7e818b5dd0140cb3378c3d3087db54/rmw_coredx_cpp/src/rmw_get_service_names_and_types.cpp

It appears that it isn't implemented and always returns an error.

@ClarkTucker
Copy link
Contributor

Sure enough...

@nate-jackson
Copy link
Author

We've been trying to implement it in our fork, but we're just running into issue after issue. Things are done differently in this rmw than they are in fastrtps, so it's hard to use fastrtps as a guide. So we're getting lost in the weeds. Any help would be greatly appreciated.

@ClarkTucker
Copy link
Contributor

I'll take a look.

@nate-jackson
Copy link
Author

We've found one problem that was causing services to be created incorrectly. In summary, the partition strings were backwards in create_service. We can submit a pull request if you'd like, but it's a simple enough fix. Either way is fine, let us know.

@nate-jackson
Copy link
Author

We just submitted that pull request. #21

@ClarkTucker
Copy link
Contributor

I just committed an implementation of get_service_names_and_types(). The test:

ros2 run demo_nodes_cpp add_two_ints_server &
ros2 run demo_nodes_cpp add_two_ints_client

seems to work OK for me now.

@nate-jackson
Copy link
Author

Ok. The test for if get_service_names_and_types works is actually ros2 topic list and ros2 service list. The topic list should not list services. The service list should.

Sorry there were multiple issues in this one issue. We'll try your latest and see if it works. Thanks for the speedy responses.

@nate-jackson
Copy link
Author

We still see ros2 topic list listing both services and topics, and ros2 service list lists nothing.

@ClarkTucker
Copy link
Contributor

ClarkTucker commented May 1, 2018

Yep, I see that also.

But it seems that neither one of those (ros2 topic list or ros2 service list) calls any rmw_coredx methods. I'm not sure how the data gets populated.

I'm not sure where to look...

@ClarkTucker
Copy link
Contributor

Just a note on my progress...

I've found that running ros2 topic list (for example) starts a daemon that services HTTP POST requests to obtain the requested information. I'm now looking into the daemon to see what's going on...

@ClarkTucker
Copy link
Contributor

OK, now that I see how the daemon is working, I think I've got a handle on things. Stay tuned...

@ClarkTucker
Copy link
Contributor

OK, I just merged a change that fixes the behavior of get_service_names_and_types() as well as get_topic_names_and_types(). The ros2 topic list -t, ros2 service list -t, and ros2 run demo_nodes_cpp add_two_ints_service/client tests work for me now. I think this will address the issue. Check it out when you have a chance.
Thanks!

@ClarkTucker
Copy link
Contributor

Gentle ping... have you been able to verify the latest?

@nate-jackson
Copy link
Author

nate-jackson commented May 14, 2018

It seems that it behaved differently on different computers. On one computer, it worked, on one it didn't. We still need to investigate. It should be noted that this same behavior happened with the older version too.

Are you able to successfully run the ros1_bridge with it?
ros2 run ros1_bridge dynamic_bridge -- --bridge-all-topics

@nate-jackson
Copy link
Author

OK I've had some time to look at this. I now see ros2 topic list and ros2 service list look correct. However, we don't see the dynamic bridge working properly.

Here is my test:
Terminal 1 - source ros1 and run roscore
Terminal 2 - source ros2 (with this newest rmw_coredx) and run ros2 run demo_nodes_cpp talker
Terminal 3 - source ros1, then source ros2 (with this newest rmw_coredx) and run ros2 run ros1_bridge dynamic_bridge -- --bridge-all-2to1-topics
Terminal 4 - source ros1 and run rostopic echo /chatter

Terminal should be outputting what talker is sending.

The errors I'm seeing come from the dynamic bridge. It is repeatedly spitting out

invalid service type 'DescribeParameters', skipping...
invalid service type 'GetParameterTypes', skipping...
invalid service type 'GetParameters', skipping...
invalid service type 'ListParameters', skipping...
invalid service type 'SetParameters', skipping...
invalid service type 'DescribeParameters', skipping...
invalid service type 'GetParameterTypes', skipping...
invalid service type 'GetParameters', skipping...
invalid service type 'ListParameters', skipping...
invalid service type 'SetParameters', skipping...

which makes me think something is amiss with this new service stuff. All of this works with the previous rmw_coredx before these latest fixes for services.

Let me know if you need more info. We are using ros1 kinetic. Ubuntu 16.04 on intel x64 machine. Coredx version is 4.2.0

@nate-jackson
Copy link
Author

Gentle ping. Any progress on this?

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

2 participants