Custom interface in micro ros
how to create the custom interface in espidf_component. i tried to add header file in cmakelist but its not working.
cmakelist.txt
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS "$ENV{HOME}/esp/micro_ros_espidf_component-humble") include_directories("$ENV{HOME}/ros2_ws/install/custom_interface/include") include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(cmd_vel)
i tried to add in main/cmakelist.txt. But that will not work as well
hi @Hariveerabadran you can use
Directory structure recommended is
project/ ├── main/ │ ├── CMakeLists.txt │ └── main.c ├── components/ │ └── custom_interface/ │ ├── include/ │ │ └── custom_interface.h │ ├── src/ │ │ └── custom_interface.c │ └── CMakeLists.txt └── CMakeLists.txt
and in components/custom_interface/CMakeLists.txt change for add file *.c
idf_component_register( SRCS "src/custom_interface.c" INCLUDE_DIRS "include" )