ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Embed request fields from another .srv files into my .srv

asked 2017-01-07 11:07:09 -0500

130s gravatar image

updated 2017-01-07 11:36:58 -0500

Service_Description_Specification says:

You cannot embed another .srv inside of a .srv.

The syntax of .srv files aligns with that of msg so there should be nothing specific to srv (it's just the format where request and response fields need to be defined is different). Is there any reason why we can't embed another .srv files into my .srv?


UPDATE: Reponding to the comment from @NEngelhard. What I wanted to do is to import request fields from an existing .srv file into the request field of my .srv.

Then I've come to realize that importing an entire .srv file, which obviously includes both request and response fields, into the request field of my .srv would result in undesirable situation.

So I changed my title to ask if there's a way to import req fields only from existing .srv.

edit retag flag offensive close merge delete

Comments

1

How would you like to embed the inner service? If you integrate it into the request, then your new request would also include the result-definition of the inner service. What do you want to do?

NEngelhard gravatar image NEngelhard  ( 2017-01-07 11:29:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-01-09 01:58:32 -0500

mgruhler gravatar image

I'm pretty sure this is not possible without much hacky fiddeling.

You could, however, create a GeneralServiceRequest.msg that you could include there, if you want.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2017-01-07 11:07:09 -0500

Seen: 418 times

Last updated: Jan 09 '17