You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ROS (www.ros.org) a service (=an RPC method) is defined by a class that has request_type and response_type fields with the types of the argument and return value an calling the service. One passes the service class to ServiceProxy constructor to create a service proxy object:
However, it seems I can't access subfields of a TypeVar ("name T.RequestType is not defined").
Of course, any other solution that will solve this problem (or is better than having a proxy function that takes the request and response types as parameters as well, which we will likely do in our project) is good as well.
PS: I've noticed that I can't use the type defined in the service class directly since as explained in #7866, it will be considered a variable, but I control the type stub generation so I can add there a 1-element Union which seems to work, so it's not a problem.
The text was updated successfully, but these errors were encountered:
In ROS (www.ros.org) a service (=an RPC method) is defined by a class that has
request_type
andresponse_type
fields with the types of the argument and return value an calling the service. One passes the service class to ServiceProxy constructor to create a service proxy object:To annotate it, I would like to be able to do:
However, it seems I can't access subfields of a TypeVar ("name T.RequestType is not defined").
Of course, any other solution that will solve this problem (or is better than having a proxy function that takes the request and response types as parameters as well, which we will likely do in our project) is good as well.
PS: I've noticed that I can't use the type defined in the service class directly since as explained in #7866, it will be considered a variable, but I control the type stub generation so I can add there a 1-element Union which seems to work, so it's not a problem.
The text was updated successfully, but these errors were encountered: