Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
altineller opened this issue Sep 27, 2023 · 3 comments

Comments

@altineller
Copy link

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
Copy link

Hello, how did it solve?

@altineller
Copy link
Author

Hello, how did it solve?

#104

@dheera
Copy link
Owner

dheera commented Oct 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants