micro-ROS / micro_ros_espidf_component

micro-ROS ESP32 IDF component and sample code
Apache License 2.0
229 stars 53 forks source link

Adding a custom interface or message to esp-idf microROS #242

Closed Ncouch64 closed 2 months ago

Ncouch64 commented 2 months ago

Hello, another basic question again because I have gotten a little confused about how to get a custom service working. I read other issues about adding the ROS2 built package to an extra_packages directory. When I add in and try and build however I see the error output

CMake Error at CMakeLists.txt:9 (find_package):
  By not providing "Findcv_interface.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "cv_interface", but CMake did not find one.

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

    cv_interfaceConfig.cmake
    cv_interface-config.cmake

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

I may be skipping a step here as I am still really new to the microROS system and am working my way through various tutorials. Thanks for the assistance!

Ncouch64 commented 2 months ago

Interesting, I may have figured out the problem but I am still testing it. I was digging through random github issues on a separate repo and found someone talking about the use of a command -

 make -f libmicroros.mk clean

that will rebuild the microROS component. I did not previously know about this. After running this command within the microROS component, the ros2 package I added to the extra packages folder was built and added to the library. When trying to build it no long fails at the #include step, still making sure it works though.

Ncouch64 commented 2 months ago

I have figured this out.