rosrust icon indicating copy to clipboard operation
rosrust copied to clipboard

How to use custom .srv

Open IceSentry opened this issue 3 years ago • 6 comments

I'm not sure I understand where I should put a custom .srv to be able to then use it with rosrust_msg. Is there a way to have it locally in a crate that uses rosrust?

IceSentry avatar Sep 27 '20 03:09 IceSentry

Hi, I am currently trying to implement such a thing and integrate it with catkin and roslaunch.

You can find my work on this example repo.

By now, I'm stuck at runtime with this error after a rosservice info (...) :

contacting node http://localhost:34227/ ...
ERROR: remote call failed: Method not implemented

pmirabel avatar Nov 09 '20 15:11 pmirabel

rosnode info on a rosrust node also has the same Method not implemented error, but so far it doesn't look like it is hurting the ability of the node to run or communicate with other nodes on topics- so the service could be working fine, just no info?

lucasw avatar Nov 09 '20 16:11 lucasw

Thx for the answer. Unfortunately, I get an error wathever action I attempt with my rosservice. Just to be 100% sure, if my service request is a string named action, the rosservice CLI call would be rosservice call /my_service "action:'my string'" ?

pmirabel avatar Nov 09 '20 16:11 pmirabel

Does tab complete not work on the rust node rosservice call? (It may be leveraging a rosservice info behind the scenes)

If you make an example C++ or python node in your project that implements the same service you can sort out what is not working in rosrust vs. a typo or some other mistake- and having example nodes in C++ or python alongside rust versions is super valuable for people new to rust (like me).

lucasw avatar Nov 09 '20 16:11 lucasw

Does tab complete not work on the rust node rosservice call? (It may be leveraging a rosservice info behind the scenes)

Yep, autocompletion does not work either.

If you make an example C++ or python node in your project (...)

Good one, thank you !

pmirabel avatar Nov 09 '20 17:11 pmirabel

Hi, @adnanademovic @IceSentry , I think that this issue could be closed :

  • create a service : https://gitlab.com/pmirabel/rosrust-boilerplate/-/tree/custom_srv
  • resolve ipv6 conflict : https://github.com/adnanademovic/rosrust/issues/46#issuecomment-726269177

pmirabel avatar Jan 13 '21 13:01 pmirabel