Exercise 6.2 Could NOT find iri_wam_reproduce_trajectory


When building the custom message following the steps of 6.2 I get this error which is completely unrelated to this unit. It is going to the unit_5_services I created and giving me an error. However, when I ran catkin_make in the previous unit it worked fine. Please help.

user:~/catkin_ws$ catkin_make
Base path: /home/user/catkin_ws
Source space: /home/user/catkin_ws/src
Build space: /home/user/catkin_ws/build
Devel space: /home/user/catkin_ws/devel
Install space: /home/user/catkin_ws/install
#### Running command: "cmake /home/user/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/user/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/user/catkin_ws/install -G Unix Makefiles" in "/home/user/catkin_ws/build"
-- Using CATKIN_DEVEL_PREFIX: /home/user/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/user/catkin_ws/devel;/home/simulations/public_sim_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/user/catkin_ws/devel;/home/simulations/public_sim_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.5", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/user/catkin_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.5")
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.9
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 5 packages in topological order:
-- ~~  - my_custom_srv_msg_pkg
-- ~~  - my_examples_pkg
-- ~~  - my_package
-- ~~  - topics_quiz
-- ~~  - unit_5_services
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'my_custom_srv_msg_pkg'
-- ==> add_subdirectory(my_custom_srv_msg_pkg)
-- +++ processing catkin package: 'my_examples_pkg'
-- ==> add_subdirectory(my_examples_pkg)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- my_examples_pkg: 1 messages, 0 services
-- +++ processing catkin package: 'my_package'
-- ==> add_subdirectory(my_package)
-- +++ processing catkin package: 'topics_quiz'
-- ==> add_subdirectory(topics_quiz)
-- +++ processing catkin package: 'unit_5_services'
-- ==> add_subdirectory(unit_5_services)
-- Could NOT find iri_wam_reproduce_trajectory (missing: iri_wam_reproduce_trajectory_DIR)
-- Could not find the required component 'iri_wam_reproduce_trajectory'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "iri_wam_reproduce_trajectory" with any of the following names:


  Add the installation prefix of "iri_wam_reproduce_trajectory" to
  CMAKE_PREFIX_PATH or set "iri_wam_reproduce_trajectory_DIR" to a directory
  containing one of the above files.  If "iri_wam_reproduce_trajectory"
  provides a separate development package or SDK, be sure it has been
Call Stack (most recent call first):
  unit_5_services/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed


Its notan issue related to you. Most of the units are independent environments. Thatmeans that in previous unit you had the iriwam simulations and all its dependencies.
But in this next unit with the bb8 simulation, the iriwam_reproduce_trajectory is not there.

So I would suggest to ways around this:

  1. You remove the unit5packages you created thatdepends on that package.
  2. You go to the unit 5 , copythat package to your workspace and then you will have it always, and be able to compile always. I woudl suggets this secondone, that way you will be able to have all your code always.

How to:

Go to Unit5 and execute the following commands:

roscd iri_wam_reproduce_trajectory
cd ..
cp -r iri_wam_reproduce_trajectory /home/user/catkin_ws/src

Now you can go to any unit and compile and the iri_wam_reproduce_trajectory package will not give issues :wink:


Sadly - the environment here seems to be more different. Even having ensured I source catkin_ws/devel/setup.bash, I get the following:

user:~/catkin_ws$ roscd iri_wam_reproduce_trajectory
roscd: No such package/stack 'iri_wam_reproduce_trajectory'

Seems to not even be installed in the bb8 (exercise 6) environment. Perhaps I should pkg create an exercise 6 package without that dependency instead of reusing the exercise 5 package.

Or perhaps not - catkin build will still try to make exercise 5.
Ok - in exercise 5, you can open up CMakeLists.txt, and comment out the package:

find_package(catkin REQUIRED COMPONENTS
#   iri_wam_reproduce_trajectory

That way catkin build works.