LabVIEW Publisher & ROS Listener Issue
I am having issues when trying to publish a string message from LabVIEW to ROS. When I run the publisher in LabVIEW and then the subscriber in ROS, I am not receiving any data (string) in my ROS terminal.
I am using:
- ROS Kinetic & Ubuntu 16.04LTS
- LabVIEW 2018 (with ROS for LabVIEW package installed)
Below is the listener python code I am using in ROS. I got this code from the ROS tutorials.
#!/usr/bin/env python
## Simple talker demo that listens to std_msgs/Strings published
## to the 'chatter' topic
import rospy
from std_msgs.msg import String
def callback(data):
rospy.loginfo(rospy.get_caller_id() + 'I heard %s', data.data)
def listener():
# In ROS, nodes are uniquely named. If two nodes with the same
# name are launched, the previous one is kicked off. The
# anonymous=True flag means that rospy will choose a unique
# name for our 'listener' node so that multiple listeners can
# run simultaneously.
rospy.init_node('listener', anonymous=True)
rospy.Subscriber('chatter', String, callback)
# spin() simply keeps python from exiting until this node is stopped
rospy.spin()
if __name__ == '__main__':
listener()
I have also set up the publisher in LabVIEW (see images attached of front panel and block diagram). C:\fakepath\LabVIEW to ROS.JPG
Any advice is greatly appreciated.