IMRCLab / crazyswarm2

A Large Quadcopter Swarm
MIT License
118 stars 61 forks source link

colcon build --symlink-install #485

Closed Guohao23 closed 6 months ago

Guohao23 commented 6 months ago

ubuntu:20.04 ros2:galatic colcon build --symlink-install The following error message was generated

guo@Guo:~/ros2_ws$ colcon build --symlink-install
[0.346s] ERROR:colcon.colcon_core.package_augmentation:Exception in package augmentation extension 'python_setup_py': not enough values to unpack (expected at least 2, got 1)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/package_augmentation/__init__.py", line 97, in augment_packages
    retval = extension.augment_packages(
  File "/usr/lib/python3/dist-packages/colcon_core/package_augmentation/__init__.py", line 48, in augment_packages
    self.augment_package(
  File "/usr/lib/python3/dist-packages/colcon_python_setup_py/package_augmentation/python_setup_py.py", line 45, in augment_package
    desc.dependencies[dependency_type] = {
  File "/usr/lib/python3/dist-packages/colcon_python_setup_py/package_augmentation/python_setup_py.py", line 46, in <setcomp>
    create_dependency_descriptor(d)
  File "/usr/lib/python3/dist-packages/colcon_core/package_augmentation/python.py", line 134, in create_dependency_descriptor
    metadata['version_lt'] = _next_incompatible_version(version)
  File "/usr/lib/python3/dist-packages/colcon_core/package_augmentation/python.py", line 157, in _next_incompatible_version
    *unchanged, increment, dropped = version_tuple
ValueError: not enough values to unpack (expected at least 2, got 1)

Starting >>> crazyflie_interfaces
Starting >>> motion_capture_tracking_interfaces
Starting >>> cflib
Finished <<< motion_capture_tracking_interfaces [0.31s]                       
Starting >>> motion_capture_tracking
--- stderr: cflib                                                          
Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    long_description = (directory / 'README.md').read_text()
  File "/usr/lib/python3.8/pathlib.py", line 1236, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.8/pathlib.py", line 1222, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/usr/lib/python3.8/pathlib.py", line 1078, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
---
Failed   <<< cflib [0.43s, exited with code 1]
Aborted  <<< crazyflie_interfaces [0.44s]
Aborted  <<< motion_capture_tracking [0.13s]

Summary: 1 package finished [0.69s]
  1 package failed: cflib
  2 packages aborted: crazyflie_interfaces motion_capture_tracking
  1 package had stderr output: cflib
  4 packages not processed
knmcguire commented 6 months ago

I've updated your comment to have the code in the right format.

The colcon build seems to fail on a package called CFlib, which is the Crazyflie python library I assume? If the crazyflie-lib-python is in there, that is not setup to be a ROS package at all.

If you want the latest cflib build from source, you'll need to clone the repository in a completely different directory outside of the ROS workspace.

Guohao23 commented 6 months ago

Hi, thanks for your reply. I have made modifications to the ROS workspace and resolved the issue. When I follow https://imrclab.github.io/crazyswarm2/installation.html, 7. set up software-in-the-loop simulation (optional). I finished install swig,and make cf2_defconfig. But when I run make bindings_python, generate an error. If you could reply to me, I would greatly appreciate it。

guo@Guo:~/crazyswarm2/crazyflie-firmware$ make bindings_python Makefile:213: warning: overriding recipe for target 'bindings_python' tools/kbuild/Makefile.kbuild:147: warning: ignoring old recipe for target 'bindings_python' make[1]: Entering directory '/home/guo/crazyswarm2/crazyflie-firmware/build' GEN ./Makefile scripts/kconfig/conf --silentoldconfig Kconfig make[1]: Nothing to be done for 'bindings_python'. make[1]: Leaving directory '/home/guo/crazyswarm2/crazyflie-firmware/build' swig -python -Isrc/modules/interface -Isrc/hal/interface -Isrc/utils/interface -Isrc/modules/interface/controller -Isrc/platform/interface -Isrc/modules/interface/outlierfilter -Isrc/modules/interface/kalman_core -o build/cffirmware_wrap.c bindings/cffirmware.i python3 bindings/setup.py build_ext --inplace In file included from src/modules/interface/kalman_core/kalman_core.h:56, from build/cffirmware_wrap.c:2757: src/utils/interface/cf_math.h:35:10: fatal error: arm_math.h: No such file or directory 35 | #include "arm_math.h" | ^~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 make: *** [Makefile:214: bindings_python] Error 1 Thank you again

knmcguire commented 6 months ago

Hi! I'm closing this issue since the problem was resolved.

For your other question, could you please start a discussion here https://github.com/IMRCLab/crazyswarm2/discussions. That is the proper place for support. Also remember to start one discussion per issue