Eror in ros basics

i keep getting that error

Invoking “cmake” failed

i tried to delete devel and build and use catkin_make but no change
it says that it cannot find “iri_warm_reproduce_trajectory” package also but i am sure i did every thing write.

the full messag is

import os
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
-- Using CATKIN_ENABLE_TESTING: ON
-- 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
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 4 packages in topological order:
-- ~~  - my_example
-- ~~  - my_service_client_example_pkg
-- ~~  - my_service_server_example_pkg
-- ~~  - unit_5_services
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'my_example'
-- ==> add_subdirectory(my_example)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- my_example: 1 messages, 0 services
-- +++ processing catkin package: 'my_service_client_example_pkg'
-- ==> add_subdirectory(my_service_client_example_pkg)
-- +++ processing catkin package: 'my_service_server_example_pkg'
-- ==> add_subdirectory(my_service_server_example_pkg)
-- +++ processing catkin package: 'unit_5_services'
-- ==> add_subdirectory(unit_5_services)
-- Could NOT find iri_warm_reproduce_trajectory (missing: iri_warm_reproduce_trajectory_DIR)
-- Could not find the required component 'iri_warm_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_warm_reproduce_trajectory" with any of the following names:

   iri_warm_reproduce_trajectoryConfig.cmake
   iri_warm_reproduce_trajectory-config.cmake

 Add the installation prefix of "iri_warm_reproduce_trajectory" to
 CMAKE_PREFIX_PATH or set "iri_warm_reproduce_trajectory_DIR" to a directory
 containing one of the above files.  If "iri_warm_reproduce_trajectory"
 provides a separate development package or SDK, be sure it has been
 installed.
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

my python file

import os
#! /usr/bin/env python

import rospy
from iri_wam_reproduce_trajectory.srv import ExecTraj , ExecTrajRequest
import rospkg

rospack = rospkg.RosPack()
# This rospack.get_path() works in the same way as $(find name_of_package) in the launch files.
traj = rospack.get_path('iri_wam_reproduce_trajectory') + "/config/get_food.txt"
rospy.init_node("my_node")
rospy.wait_for_service("/execute_trajectory")
execute_traj_service = rospy.ServiceProxy("/execute_trajectory" ,ExecTraj )
execute_tarj_object = ExecTrajRequest()
execute_tarj_object.file = traj
result = execute_traj_service(execute_tarj_object)
print(result)

my launch

import os

<launch> 
     <include file = "$(find iri_wam_reproduce_trajectory)/launch/start_service.launch"/>
     <node pkg = 'unit_5_services' type = 'my.py' name = 'my_node' output = 'screen' />

</launch>

I suppose you are doing exercise 5, and running your code in the unit 6 - Understanding ROS Services - Clients.

Before running catkin_make, try:

source /home/simulations/public_sim_ws/devel/setup.bash
1 Like

Hello @80601,

It seems there might be a small typo causing your error. The error mentions “iri_warm_reproduce_trajectory”, but it was likely intended to be “iri_wam_reproduce_trajectory,” specifically “wam” without the “R.”

I’d suggest thoroughly reviewing all instances where you’ve used the package name, including your Python files and launch files, to ensure consistency and accuracy.

Best regards,