[ros-users] calling a service in rospy without a type

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Rosen Diankov
Date:  
To: ros-users
Subject: [ros-users] calling a service in rospy without a type
Because service types are passed when the hand shacking between two
clients occurs, it seems that it would, theoretically, be possible to
call a service from rospy without specifying the topic name:

rospy.ServiceProxy('myservice')(myparam=1)

The internal rospy mechanics could import the correct service
depending on the type.

In fact, is it really necessary to specify the python service class if
a user doesn't particularly care what the service type is? Not having
to declare a service type could reduce the number of explicit imports
in a python code, and potentially make python code independent of the
types.

I guess this argument would also apply to the subscribers of topics..

rosen,