We'd like to use crazyswarm2 packages. However we got below error about motion_capture stuff. How to figure out that problem, thanks.

ntukenmez3@ae-icps-407120:~/Documents/crazyswarm2$ source /opt/ros/humble/setup.bash 

ntukenmez3@ae-icps-407120:~/Documents/crazyswarm2$ colcon build

Starting >>> crazyflie_interfaces
Finished <<< crazyflie_interfaces [7.81s]                     
Starting >>> crazyflie_py
Starting >>> crazyflie                     
Starting >>> crazyflie_sim
Finished <<< crazyflie_py [0.87s]                                             
Starting >>> crazyflie_examples
Finished <<< crazyflie_sim [1.11s]                            
--- stderr: crazyflie                                                                       
CMake Error at CMakeLists.txt:18 (find_package):
  By not providing "Findmotion_capture_tracking_interfaces.cmake" in
  CMAKE_MODULE_PATH this project has asked CMake to find a package
  configuration file provided by "motion_capture_tracking_interfaces", but
  CMake did not find one.

  Could not find a package configuration file provided by
  "motion_capture_tracking_interfaces" with any of the following names:


  Add the installation prefix of "motion_capture_tracking_interfaces" to
  CMAKE_PREFIX_PATH or set "motion_capture_tracking_interfaces_DIR" to a
  directory containing one of the above files.  If
  "motion_capture_tracking_interfaces" provides a separate development
  package or SDK, be sure it has been installed.

Failed   <<< crazyflie [1.43s, exited with code 1]
Aborted  <<< crazyflie_examples [0.79s]                           

Summary: 3 packages finished [9.71s]
  1 package failed: crazyflie
  1 package aborted: crazyflie_examples
  1 package had stderr output: crazyflie

2 Answers 2


Most likely that your motion_capture_tracking_interfaces package did not compile/is not present.

If the package is present in the same workspace, i.e., if your src directory looks like the following:

|-> crazyflie
|    | . . .
|-> crazyflie_examples
|    | . . .
|-> crazyflie_py
|    | . . . 
|-> motion_capture_tracking_interfaces

Then you can try compiling the motion_capture_tracking_interfaces package first by using colcon build --packages-select motion_capture_tracking_interfaces.

You should also examine if you made an error (maybe a typo) in the find_packages section of the CMakeLists.txt of the package is calling the correct package name. I have had multiple instances of this error where I mistakenly called find_package(<project>-mgs REQUIRED) which led me to this error.

P.S.: On the off-chance that you might need to actually write the Config.cmake yourself, this answer on StackOverflow is one of the best explanations I have come across.

  • $\begingroup$ I think you were right. Because I run colcon build in a different directory (ntukenmez3@ae-icps-407120:~/Documents/crazyswarm2$ colcon build). So, it did not work. $\endgroup$ Oct 5, 2023 at 15:51

Since I don't have any reputation yet to comment I'll just add this as a separate answer. The documentation for the crazyswarm2 project is here with the installation instructions, to make sure that the packages are in the right folders.


Motion_capture_tracking_interfaces is part of a different package on which crazyswarm2 depends on.

This question was also asked on the project github discussions as well: ros2-crazyswarm2, for more background information.

(I'm a co-maintainer at crazyswarm2).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.