ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Help fixing error with ROSWeb and rosbridge. 'module' object has no attribute 'get_topics'

asked 2019-04-06 03:55:45 -0500

jptalledo gravatar image

updated 2019-04-06 09:33:22 -0500

gvdhoorn gravatar image

Hi

Trying to use ROSWeb and rosbridge on ROS Melodic, I am getting an error when trying to get topics.

I got the repository cloned:

https://github.com/EESC-LabRoM/rosweb

The error I am getting is the following:

[ERROR] [1554540327.493189]: Error processing request: 'module' object has no attribute 'get_topics'
['Traceback (most recent call last):\n', '  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 629, in _handle_request\n    response = convert_return_to_response(self.handler(request), self.response_class)\n', '  File "/home/hel/gitlab/ros/catkin_ws/src/rosbridge_suite/rosapi/scripts/rosapi_node", line 97, in get_action_servers\n    topics = proxy.get_topics(rosapi.glob_helper.topics_glob)\n', "AttributeError: 'module' object has no attribute 'get_topics'\n"]
[ERROR] [1554540327.495821]: [Client 0] [id: call_service:/rosapi/action_servers:4] call_service ServiceException: service [/rosapi/action_servers] responded with an error: error processing request: 'module' object has no attribute 'get_topics'

any suggestions to workaround this error?

edit retag flag offensive close merge delete

Comments

Hi I've also just started to experiment with this package and have exactly the same problem. Did you find any solution yet?

Thanks

DRos gravatar image DRos  ( 2019-04-11 06:39:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-04-11 07:33:00 -0500

jptalledo gravatar image

You need to clone rosbridge repo into your workspace.

Then, modified the rosapi_node. In specific this section:

def get_action_servers(request):
    """ Called by the rosapi/GetActionServers service. Returns a list of action servers based on actions standard topics """
    topics = proxy.get_topics(rosapi.glob_helper.topics_glob)
    action_servers = proxy.filter_action_servers(topics)
return GetActionServersResponse(action_servers)

change it to:

def get_action_servers(request):
    """ Called by the rosapi/GetActionServers service. Returns a list of action servers based on actions standard topics """
    topics = proxy.get_topics_and_tyes(rosapi.glob_helper.topics_glob)
    """ action_servers = proxy.filter_action_servers(topics) """
return ""

Are you using Image_Viewer as well? There is another bug/issue with rosweb/ROS Melodic.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-04-06 03:55:45 -0500

Seen: 847 times

Last updated: Apr 11 '19