uzh-rpg / agile_autonomy

Repository Containing the Code associated with the Paper: "Learning High-Speed Flight in the Wild"
GNU General Public License v3.0
605 stars 164 forks source link

Bad Callback on running test script #88

Open AnshShah3009 opened 1 year ago

AnshShah3009 commented 1 year ago
[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 commented 1 year ago

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 commented 11 months ago

i have the same issue, did you fix it?

AnshShah3009 commented 11 months ago

@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 commented 11 months ago

@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 commented 10 months ago

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.