rcl/rcl.h: No such file or directory
- Version or commit hash: humble
Steps to reproduce the issue
idf.py build
Expected behavior
A complete build
Actual behavior
/home/rahgirrafi/esp/vaccumbot_firmware/components/examples/int32_publisher/main/main.c:11:10: fatal error: rcl/rcl.h: No such file or directory 11 | #include <rcl/rcl.h> | ^~~~~~~~~~~
Additional information
I worked around it by writing my project inside the example directory. The projects are building perfectly from there. I assume it has something to do with the CMake.
Facing the same problem! I'm attempting to prebuild the component once and use it instead of building it everytime I idf.py fullclean it.
@rahgirrafi can you please elaborate on how you exactly where able to work around this issue? I'm also getting fatal error: rcl/rcl.h: No such file or directory 11 message. When running the example as shown in the readme.
@RickerStem I created my project inside the example directory of this repository (along with other example projects) and I didn't face the problem anymore.
I noticed that example projects provided by this component weren't failing to build. So, Instead of adding this repo to my project's component directory, I cloned this repo first, then created my project in the same directory where the other example projects (int32_publisher, int32_subscdiber etc.) are provided. Then everything worked fine.
@rahgirrafi thank you for your quick response, I will try this in the coming days!
- Version or commit hash: humble
Steps to reproduce the issue
idf.py build
Expected behavior
A complete build
Actual behavior
/home/rahgirrafi/esp/vaccumbot_firmware/components/examples/int32_publisher/main/main.c:11:10: fatal error: rcl/rcl.h: No such file or directory 11 | #include <rcl/rcl.h> | ^~~~~~~~~~~Additional information
check ESP-IDF 4.4.5 version and tap
idf.py fullclean idf.py reconfigure idf.py build
I tried again but was not able to build as @rahgirrafi suggested.
I noticed that example projects provided by this component weren't failing to build.
For me they are failing?
@Waelhechmi I tried as you suggested docker pull espressif/idf:v4.4.5 then docker run and pull this repo inside the container. but still the same issue.
Any suggestions, or examples?
@RickerStem . Try replacing the CMakeLists.txt file with these codes.
`file(GLOB_RECURSE SRC_FILES "${CMAKE_CURRENT_LIST_DIR}/.c" "${CMAKE_CURRENT_LIST_DIR}/.cpp")
idf_component_register(SRCS ${SRC_FILES} INCLUDE_DIRS "include")`
@rahgirrafi Thank you for the suggestion, didn't get it to work.
@rahgirrafi Thank you for the suggestion, didn't get it to work.
Sorry to hear that.
I can offer to arrange a meeting to take a look into your project structure (If you are okay with it). I would like to see why it isn't working with you. I have used this method to solve this issue on multiple devices.
If I can identify the issue, I can try to find a solution and close this issue.
Found a (cumbersome) way to build the example/int32_publisher from this repo.
Note: I'm using a Ubuntu 24.04.03 LTS, VM on Win11.
- Installed ESP-IDF v5.2.5 (Espressif guide)
- . $HOME/esp/esp-idf/export.sh
- pip3 install catkin_pkg lark-parser colcon-common-extensions
- git clone -b jazzy https://github.com/micro-ROS/micro_ros_espidf_component.git
- cd /micro_ros_espidf_component/examples/int32_publisher
- idf.py set-target esp32
- idf.py menuconfig
- idf.py flash
@rahgirrafi Thank you for the suggestion, didn't get it to work.
Sorry to hear that.
I can offer to arrange a meeting to take a look into your project structure (If you are okay with it). I would like to see why it isn't working with you. I have used this method to solve this issue on multiple devices.
If I can identify the issue, I can try to find a solution and close this issue.
That's very kind of you! Maybe we can arrange something later. I think it's on me, I'm not an expert on CMake and ESP-IDF. But I was expecting the example and docker example to work.