gramaziokohler / roslibpy

Python ROS Bridge library
MIT License
273 stars 56 forks source link

can not get topics or server #35

Closed Fimode closed 5 years ago

Fimode commented 5 years ago

i have a problem, i use get_topics() but return 'None', i am sure it connected, when i use is_connect(), it returns True

gonzalocasas commented 5 years ago

The issue was that the get_topics method (and other similar ROS API methods) were only async, so, they return the value inside the callback, not directly as the return value. This is now changed, so by default (i.e. if no callback is passed), the method will return directly the values as expected.

gonzalocasas commented 5 years ago

@Fimode just released 0.7.0 which fixes this behavior. Also added documentation of how to use the feature: https://roslibpy.readthedocs.io/en/latest/examples.html#querying-ros-api