tuftsBaxter / ROS-for-LabVIEW-Software

49 stars 23 forks source link

SubScriberExample.vi not subscribing topics when it starts before ROS Publisher on Ubuntu #9

Open 130s opened 7 years ago

130s commented 7 years ago

First, thank you for such a convenient tool!

Our client from heavy industry is experiencing an issue. As I've included links to some of the existing threads, this seems to be a common issue. We don't have LabView (let alone its SDK) setting but we can ask our customer to test the code once someone could provide a patch candidate. Or let me know if you have other thoughts.

Thank you.

Issue description

SubScriberExample.vi does not print the subscribing topic's content when it starts before ROS Master Publisher on Ubuntu.

How to reproduce the issue

ubunta-term-1$ roscore
:
started roslaunch server http://192.168.128.50:60187/
ros_comm version 1.11.21

SUMMARY
========

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.21

NODES

auto-starting new master
process[master]: started with pid [9563]
ROS_MASTER_URI=http://192.168.128.50:11311/

setting /run_id to 602ed6ce-5a3d-11e7-8eae-000bab77d7ad
process[rosout-1]: started with pid [9576]
started core service [/rosout]
ubunta-term-2$ rosrun rospy_tutorials talker.py

[INFO] [WallTime: 1498460635.811131] hello world 1498460635.81
[INFO] [WallTime: 1498460635.911309] hello world 1498460635.91
[INFO] [WallTime: 1498460636.011506] hello world 1498460636.01
[INFO] [WallTime: 1498460636.111556] hello world 1498460636.11

Then on Windows run SubScriberExample.vi that starts printing the topic.

On Ubuntu, kill talker by Ctrl-C then re-run. Then the issue occurs.

Environment tested

Workaround found (but not acceptable)

Stop SubScriberExample.vi by pressing STOP button, then re-run it starts printing topics again.

Similar issues

CC @7675t

7675t commented 7 years ago

@130s It's not 'before ROS master' but 'before ROS publiser'. The ROS master(roscore) is started at first and never stopped.

130s commented 7 years ago

@7675t thanks, OP updated.

Also I didn't include where we got httplib.BadStatusLine: '' error, which is this.

ubunta-term-3$ rosnode info /LVROS38 
--------------------------------------------------------------------------------
Node [/LVROS38]
Publications: None

Subscriptions: 
 * /chatter [std_msgs/String]

Services: None

contacting node http://192.168.128.55:50054 ...
Traceback (most recent call last):
  File "/opt/ros/indigo/bin/rosnode", line 35, in <module>
    rosnode.rosnodemain()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosnode/__init__.py", line 793, in rosnodemain
    sys.exit(_rosnode_cmd_info(argv) or 0)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosnode/__init__.py", line 621, in _rosnode_cmd_info
    rosnode_info(node)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosnode/__init__.py", line 584, in rosnode_info
    print(get_node_connection_info_description(node_api, master))
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosnode/__init__.py", line 525, in get_node_connection_info_description
    pid = _succeed(node.getPid(ID))
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1303, in single_request
    response = h.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1089, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 444, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 408, in _read_status
    raise BadStatusLine(line)
httplib.BadStatusLine: ''