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

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: Rosen Diankov
Dato:  
Til: ros-users
Emne: [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,