ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Fix package installation files

asked 2022-08-28 16:09:41 -0500

Asmox gravatar image

Hello, I'm new into ROS2 and many of concepts are still unclear for me. Once I noticed that I cannot rebuild custom definition of service. Disregarding the reason, I followed some guidelines to remove log install and build directories within workspace. And then my package has totally broken - I'm unable to build it. Everytime I try, I'm getting error:

$ colcon build
Starting >>> cpp_pubsub
Starting >>> yoctoservice
Finished <<< cpp_pubsub [0.95s]                                                             
--- stderr: yoctoservice                         
CMake Error at CMakeLists.txt:8 (find_package):
  By not providing "Findyoctoservice.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "yoctoservice", but CMake did not find one.

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

    yoctoserviceConfig.cmake
    yoctoservice-config.cmake

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


---
Failed   <<< yoctoservice [3.80s, exited with code 1]

Summary: 1 package finished [4.59s]
  1 package failed: yoctoservice
  1 package had stderr output: yoctoservice

I tried to use sourcing opt/ros/humble/setup.bash, . install/setup.bash, but no result. I have my yoctoservice package files stored in workspace/src/yoctoservice. Can I fix installation of this package somehow?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-08-29 03:22:32 -0500

ravijoshi gravatar image

I highly suspect the commands and paths you have mentioned.

  1. opt/ros/humble/setup.bash should be /opt/ros/humble/setup.bash
  2. . install/setup.bash should be install/local_setup.bash

Finally, please make sure that you can see your workspace by executing printenv | grep PATH as shown below:

$ printenv | grep PATH

AMENT_PREFIX_PATH=/home/ravi/ros2_ws/install/examples_rclpy_minimal_publisher:/opt/ros/galactic

COLCON_PREFIX_PATH=/home/ravi/ros2_ws/install

PYTHONPATH=/home/ravi/ros2_ws/install/examples_rclpy_minimal_publisher/lib/python3.8/site-packages:/opt/ros/galactic/lib/python3.8/site-packages

LD_LIBRARY_PATH=/opt/ros/galactic/opt/yaml_cpp_vendor/lib:/opt/ros/galactic/opt/rviz_ogre_vendor/lib:/opt/ros/galactic/lib/x86_64-linux-gnu:/opt/ros/galactic/lib::/usr/local/cuda-11.1/lib64

PATH=/opt/ros/galactic/bin:/home/ravi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda-11.1/bin:/home/ravi/.local/bin

This is how my workspace is structured:

.
├── Desktop
├── Documents
├── Downloads
├── Music
├── Pictures
├── Public
├── ros2_ws
│   ├── build
│   ├── install
│   ├── log
│   └── src
│       └── minimal_publisher
├── Templates
└── Videos
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-08-28 16:09:41 -0500

Seen: 303 times

Last updated: Aug 29 '22