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

Bad Callback on running test script #88

Open
AnshShah3009 opened this issue Oct 17, 2023 · 5 comments
Open

Bad Callback on running test script #88

AnshShah3009 opened this issue Oct 17, 2023 · 5 comments

Comments

@AnshShah3009
Copy link

AnshShah3009 commented Oct 17, 2023

[ERROR] [1697558138.151880, 148.512000]: bad callback: <bound method PlanBase.callback_depth of <PlannerLearning.PlannerLearning.PlanLearning object at 0x7f2a3e48b450>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/baymax/Desktop/agile_autonomy_ws/catkin_aa/src/agile_autonomy/planner_learning/src/PlannerLearning/PlannerBase.py", line 206, in callback_depth
    depth = self.bridge.imgmsg_to_cv2(data, '16UC1')
  File "/opt/ros/noetic/lib/python3/dist-packages/cv_bridge/core.py", line 163, in imgmsg_to_cv2
    dtype, n_channels = self.encoding_to_dtype_with_channels(img_msg.encoding)
  File "/opt/ros/noetic/lib/python3/dist-packages/cv_bridge/core.py", line 99, in encoding_to_dtype_with_channels
    return self.cvtype2_to_dtype_with_channels(self.encoding_to_cvtype2(encoding))
  File "/opt/ros/noetic/lib/python3/dist-packages/cv_bridge/core.py", line 91, in encoding_to_cvtype2
    from cv_bridge.boost.cv_bridge_boost import getCvType
ImportError: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined symbol: ffi_type_pointer, version LIBFFI_BASE_7.0

@AnshShah3009
Copy link
Author

AnshShah3009 commented Oct 17, 2023

From my analysis, it looks like an opencv, cv_bridge and rospy compatiblity issue, Can someone suggest what version should i use. @antonilo what do you suggest?

@Hofalen
Copy link

Hofalen commented Dec 14, 2023

i have the same issue, did you fix it?

@AnshShah3009
Copy link
Author

@Hofalen The problem was related to libffi version in the conda environment. Try installing earlier subversion(3.7.x) of python in the conda env, should solve the issue.

@Hofalen
Copy link

Hofalen commented Dec 14, 2023

@AnshShah3009 thanks for the quick answer! I proceed to install python 3.7.8 and it worked. I had the 3.7.17 before

@Cryptheon
Copy link

Another option would be to use ros_numpy and replace the lines of code with an equivalent (use numpify from ros) you don't need cv_bridge in this case.

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