IMRCLab / crazyswarm2

A Large Quadcopter Swarm
MIT License
117 stars 64 forks source link

crazyflie-interfaces build issue and Empy 4.0.0 incompatible #553

Open knmcguire opened 3 months ago

knmcguire commented 3 months ago

I've just did a fresh install of crazyswarm2 on my 24.04 so I'll make an issue of those that are still current.

When installing, usually empy needs to be installed as well with pip3 install empy lark catkin-pkg which is currently missing from our documentation. This is necessary for building the crazyflie_interfaces (rosidl).

However, there is currently an incompatibility with Empy 4.0.0 which causes these two errors:

...
    File "/opt/ros/jazzy/lib/python3.12/site-packages/rosidl_adapter/resource/__init__.py", line 51, in evaluate_template
      em.BUFFERED_OPT: True,
      ^^^^^^^^^^^^^^^

  AttributeError: module 'em' has no attribute 'BUFFERED_OPT'

...

    File "/opt/ros/jazzy/lib/python3.12/site-packages/rosidl_adapter/resource/__init__.py", line 69, in evaluate_template
      _interpreter.shutdown()
      ^^^^^^^^^^^^^^^^^^^^^

  AttributeError: 'NoneType' object has no attribute 'shutdown'

solution

This is due to this error: https://github.com/ros2/rosidl/issues/779

Downgrade empy to:

pip3 install empy==3.3.4
suojinhui commented 5 days ago

But I am using python 3.12, which is not compatible with empy==3.3.4

knmcguire commented 4 days ago

aii... that's not awesome. And unfortunately no bug fix in sight at the original issue at rosidl.

But what do you mean with incompatible? I could install this pip package for 3.12. What kind of error messages are you getting?

suojinhui commented 4 days ago

I found that I made a mistake in the conda environment and the local environment. You are right. I have installed a lower version of empy and solved the problem.