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

Rosen Diankov rosen.diankov at gmail.com
Fri Jun 18 22:57:36 UTC 2010


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,



More information about the ros-users mailing list