ros / joint_state_publisher

http://wiki.ros.org/joint_state_publisher
50 stars 81 forks source link

AttributeError: JointStatePublisher instance has no attribute 'source_update_cb' #36

Closed igzubov closed 4 years ago

igzubov commented 4 years ago

Getting this error on Ubuntu 16.04 and ROS Kinetic: [ERROR] [1582565767.970762]: bad callback: <bound method JointStatePublisher.source_cb of <joint_state_publisher.JointStatePublisher instance at 0x7ff0c19dc5a8>> Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback cb(msg) File "/opt/ros/kinetic/lib/python2.7/dist-packages/joint_state_publisher/__init__.py", line 202, in source_cb if self.source_update_cb is not None: AttributeError: JointStatePublisher instance has no attribute 'source_update_cb'

Why source_update_cb is set to None aftrer subscribers are created? Shouldn't this variable be initialized before creating subscribers?

sloretz commented 4 years ago

@igzubov thanks for the report! Would you mind trying #41 on your system and reporting if it fixes the issue?

igzubov commented 4 years ago

@sloretz tested, fixes.

sloretz commented 4 years ago

Thanks @igzubov , closing as fixed by #41 and #43