dheera / rosboard

ROS node that turns your robot into a web server to visualize ROS topics
Other
822 stars 161 forks source link

unable to create subscriber with "AttributeError: 'Subscriber' object has no attribute '_sub'" #118

Closed altineller closed 9 months ago

altineller commented 9 months ago

Hello,

I can run the rosboard, and the web page shows up, but when adding a topic, it gives the following error:

INFO] [1695774220.093828816] [rosboard_node]: Subscribing to /odom

[rcutils|error_handling.c:108] rcutils_set_error_state() This error state is being overwritten:

'Unknown QoS history policy, at ./src/qos.cpp:61'

with this new error message:

'create_publisher() failed setting topic QoS, at ./src/subscription.cpp:221'

rcutils_reset_error() should be called after error handling to avoid this. <<<

[rcutils|error_handling.c:108] rcutils_set_error_state() This error state is being overwritten:

'create_publisher() failed setting topic QoS, at ./src/subscription.cpp:221, at ./src/rcl/subscription.c:108'

with this new error message:

'invalid allocator, at ./src/rcl/subscription.c:218'

rcutils_reset_error() should be called after error handling to avoid this. <<< invalid allocator, at ./src/rcl/subscription.c:218 [WARN] [1695774220.115531469] [rosboard_node]: Failed to create subscription: invalid allocator, at ./src/rcl/subscription.c:218 Traceback (most recent call last): File "/home/can/rosboard_ws/install/rosboard/lib/python3.10/site-packages/rosboard/rosboard.py", line 261, in sync_subs self.local_subs[topic_name] = rospy.Subscriber( File "/home/can/rosboard_ws/install/rosboard/lib/python3.10/site-packages/rosboard/rospy2/init.py", line 225, in init self._sub = _node.create_subscription(topic_type, topic_name, self._ros2_callback, qos, event_callbacks = rclpy.qos_event.SubscriptionEventCallbacks()) File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/node.py", line 1370, in create_subscription subscription_object = _rclpy.Subscription( rclpy._rclpy_pybind11.RCLError: Failed to create subscription: invalid allocator, at ./src/rcl/subscription.c:218 Exception ignored in: <function Subscriber.del at 0xffffa4e47be0> Traceback (most recent call last): File "/home/can/rosboard_ws/install/rosboard/lib/python3.10/site-packages/rosboard/rospy2/init.py", line 231, in del _node.destroy_subscription(self._sub) AttributeError: 'Subscriber' object has no attribute '_sub'

I have tried both on the robot and laptop to see if it was a QoS problem, but could not get around the error.

Best Regards, C.A.

NINGCONG2021 commented 9 months ago

Hello, how did it solve?

altineller commented 9 months ago

Hello, how did it solve?

https://github.com/dheera/rosboard/pull/104

dheera commented 9 months ago

Let me investigate. Meanwhile try using an earlier commit or release branch.