Code Monkey home page Code Monkey logo

micro_ros_espidf_component's Introduction

banner banner

micro-ROS component for ESP-IDF

This component has been tested in ESP-IDF v4.4, and v5.2 with ESP32, ESP32-S2, ESP32-S3 and ESP32-C3.

Dependencies

This component needs colcon and other Python 3 packages inside the IDF virtual environment in order to build micro-ROS packages:

. $IDF_PATH/export.sh
pip3 install catkin_pkg lark-parser colcon-common-extensions

Middlewares available

This package support the usage of micro-ROS on top of two different middlewares:

In order to select it, use idf.py menuconfig and go to micro-ROS Settings > micro-ROS middleware

Usage

You can clone this repo directly in the components folder of your project.

If you encounter issues during the build process, ensure that you are running in a clean shell environment without the ROS 2 setup script sourced.

Example

In order to test a int32_publisher example:

. $IDF_PATH/export.sh
cd examples/int32_publisher
# Set target board [esp32|esp32s2|esp32s3|esp32c3]
idf.py set-target esp32
idf.py menuconfig
# Set your micro-ROS configuration and WiFi credentials under micro-ROS Settings
idf.py build
idf.py flash
idf.py monitor

To clean and rebuild all the micro-ROS library:

idf.py clean-microros

Is possible to use a micro-ROS Agent just with this docker command:

# UDPv4 micro-ROS Agent
docker run -it --rm --net=host microros/micro-ros-agent:iron udp4 --port 8888 -v6

Build with docker container

It's possible to build this example application using preconfigured docker container. Execute this line to build an example app using docker container:

docker run -it --rm --user espidf --volume="/etc/timezone:/etc/timezone:ro" -v  $(pwd):/micro_ros_espidf_component -v  /dev:/dev --privileged --workdir /micro_ros_espidf_component microros/esp-idf-microros:latest /bin/bash  -c "cd examples/int32_publisher; idf.py menuconfig build flash monitor"

Dockerfile for this container is provided in the ./docker directory and available in dockerhub. This approach uses ESP-IDF v5.

Using serial transport

By default, micro-ROS component uses UDP transport, but is possible to enable UART transport or any other custom transport setting the colcon.meta like:

...
"rmw_microxrcedds": {
    "cmake-args": [
        ...
        "-DRMW_UXRCE_TRANSPORT=custom",
        ...
    ]
},
...

An example on how to implement this external transports is available in examples/int32_publisher_custom_transport.

Available ports are 0, 1 and 2 corresponding UART_NUM_0, UART_NUM_1 and UART_NUM_2.

Is possible to use a micro-ROS Agent just with this docker command:

# Serial micro-ROS Agent
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:foxy serial --dev [YOUR BOARD PORT] -v6

Purpose of the Project

This software is not ready for production use. It has neither been developed nor tested for a specific use case. However, the license conditions of the applicable Open Source licenses allow you to adapt the software to your needs. Before using it in a safety relevant setting, make sure that the software fulfills your requirements and adjust it according to any applicable safety standards, e.g., ISO 26262.

License

This repository is open-sourced under the Apache-2.0 license. See the LICENSE file for details.

For a list of other open-source components included in ROS 2 system_modes, see the file 3rd-party-licenses.txt.

Known Issues/Limitations

There are no known limitations.

micro_ros_espidf_component's People

Contributors

acuadros95 avatar andyblightleeds avatar brettrd avatar donraphaco avatar dsryzhov avatar jamoralp avatar mergify[bot] avatar ms71 avatar pablogs9 avatar russelljoyce avatar ulipe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

micro_ros_espidf_component's Issues

Build of "addtwoints_server" example fails using idf.py, despite following all the setup steps

Issue template

  • Hardware description: Generic desktop running Ubuntu 20.04
  • RTOS: FreeRTOS
  • Installation type: idf.py
  • Version or commit hash: galactic

Steps to reproduce the issue

Once esp-idf has been setup under ~/esp:

  • cd ~/esp/
  • Source export.sh from the esp-idf folder
    Detecting the Python interpreter
    Checking "python" ...
    Python 3.8.0
    "python" has been detected
    Adding ESP-IDF tools to PATH...
    Using Python interpreter in /home/safdar/.espressif/python_env/idf4.4_py3.8_env/bin/python
    Checking if Python packages are up to date...
    Python requirements from /home/safdar/esp/esp-idf/requirements.txt are satisfied.
    Added the following directories to PATH:
      /home/safdar/esp/esp-idf/components/esptool_py/esptool
      /home/safdar/esp/esp-idf/components/espcoredump
      /home/safdar/esp/esp-idf/components/partition_table
      /home/safdar/esp/esp-idf/components/app_update
    Done! You can now compile ESP-IDF projects.
    Go to the project directory and run:
      idf.py build
  • Ensure any ROS environment has not been sourced:
    (base) safdar@obelix:~/esp/addtwoints_server$ echo $PATH | grep -i "ros"
    <Nothing>
    
    (base) safdar@obelix:~/esp/addtwoints_server$ env | grep ROS
    <Nothing>
    
    (base) safdar@obelix:~/esp/addtwoints_server$ env | grep -i "ament"
    <Nothing>
  • cd esp-idf/components
  • git clone [email protected]:micro-ROS/micro_ros_espidf_component.git
  • cd ~/esp
  • Copy over the example project:
    cp -r ~/esp/esp-idf/components/micro_ros_espidf_component/examples/addtwoints_server .
  • Run> idf.py set-target esp32
    (base) safdar@obelix:~/esp/addtwoints_server$ idf.py set-target esp32
    Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
    Executing action: fullclean
    Executing action: set-target
    Set Target to: esp32, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
    Running cmake in directory /home/safdar/esp/addtwoints_server/build
    Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /home/safdar/esp/addtwoints_server"...
    -- Found Git: /usr/bin/git (found version "2.25.1") 
    -- Component directory /home/safdar/Arduino does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Desktop does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Documents does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Downloads does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Music does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Pictures does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Public does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Templates does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Unity does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/Videos does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/anaconda3 does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/code does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/esp does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/ray_results does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/snap does not contain a CMakeLists.txt file. No component will be added
    -- Component directory /home/safdar/steamvr does not contain a CMakeLists.txt file. No component will be added
    -- The C compiler identification is GNU 8.4.0
    -- The CXX compiler identification is GNU 8.4.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/safdar/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
    -- Check for working C compiler: /home/safdar/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
    -- Check for working C compiler: /home/safdar/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /home/safdar/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
    -- Check for working CXX compiler: /home/safdar/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
    -- Building ESP-IDF components for target esp32
    -- Project sdkconfig file /home/safdar/esp/addtwoints_server/sdkconfig
    Loading defaults file /home/safdar/esp/addtwoints_server/sdkconfig.defaults...
    -- Found PythonInterp: /home/safdar/.espressif/python_env/idf4.4_py3.8_env/bin/python (found version "3.8") 
    -- Found Perl: /usr/bin/perl (found version "5.30.0") 
    -- App "addtwoints_server" version: 1
    -- Adding linker script /home/safdar/esp/addtwoints_server/build/esp-idf/esp_system/ld/memory.ld
    -- Adding linker script /home/safdar/esp/esp-idf/components/esp_system/ld/esp32/sections.ld.in
    -- Adding linker script /home/safdar/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
    -- Adding linker script /home/safdar/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
    -- Adding linker script /home/safdar/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
    -- Adding linker script /home/safdar/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
    -- Adding linker script /home/safdar/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
    -- Adding linker script /home/safdar/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
    -- Adding linker script /home/safdar/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
    -- Adding linker script /home/safdar/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
    -- Using Micro XRCE-DDS middleware
    -- Components: app_trace app_update asio bootloader bootloader_support bt cbor cmock coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_ipc esp_lcd esp_local_ctrl esp_netif esp_phy esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test ieee802154 jsmn json libsodium log lwip main mbedtls mdns micro_ros_espidf_component mqtt newlib nghttp nvs_flash openssl openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
    -- Component paths: /home/safdar/esp/esp-idf/components/app_trace /home/safdar/esp/esp-idf/components/app_update /home/safdar/esp/esp-idf/components/asio /home/safdar/esp/esp-idf/components/bootloader /home/safdar/esp/esp-idf/components/bootloader_support /home/safdar/esp/esp-idf/components/bt /home/safdar/esp/esp-idf/components/cbor /home/safdar/esp/esp-idf/components/cmock /home/safdar/esp/esp-idf/components/coap /home/safdar/esp/esp-idf/components/console /home/safdar/esp/esp-idf/components/cxx /home/safdar/esp/esp-idf/components/driver /home/safdar/esp/esp-idf/components/efuse /home/safdar/esp/esp-idf/components/esp-tls /home/safdar/esp/esp-idf/components/esp32 /home/safdar/esp/esp-idf/components/esp_adc_cal /home/safdar/esp/esp-idf/components/esp_common /home/safdar/esp/esp-idf/components/esp_eth /home/safdar/esp/esp-idf/components/esp_event /home/safdar/esp/esp-idf/components/esp_gdbstub /home/safdar/esp/esp-idf/components/esp_hid /home/safdar/esp/esp-idf/components/esp_http_client /home/safdar/esp/esp-idf/components/esp_http_server /home/safdar/esp/esp-idf/components/esp_https_ota /home/safdar/esp/esp-idf/components/esp_https_server /home/safdar/esp/esp-idf/components/esp_hw_support /home/safdar/esp/esp-idf/components/esp_ipc /home/safdar/esp/esp-idf/components/esp_lcd /home/safdar/esp/esp-idf/components/esp_local_ctrl /home/safdar/esp/esp-idf/components/esp_netif /home/safdar/esp/esp-idf/components/esp_phy /home/safdar/esp/esp-idf/components/esp_pm /home/safdar/esp/esp-idf/components/esp_ringbuf /home/safdar/esp/esp-idf/components/esp_rom /home/safdar/esp/esp-idf/components/esp_serial_slave_link /home/safdar/esp/esp-idf/components/esp_system /home/safdar/esp/esp-idf/components/esp_timer /home/safdar/esp/esp-idf/components/esp_websocket_client /home/safdar/esp/esp-idf/components/esp_wifi /home/safdar/esp/esp-idf/components/espcoredump /home/safdar/esp/esp-idf/components/esptool_py /home/safdar/esp/esp-idf/components/expat /home/safdar/esp/esp-idf/components/fatfs /home/safdar/esp/esp-idf/components/freemodbus /home/safdar/esp/esp-idf/components/freertos /home/safdar/esp/esp-idf/components/hal /home/safdar/esp/esp-idf/components/heap /home/safdar/esp/esp-idf/components/idf_test /home/safdar/esp/esp-idf/components/ieee802154 /home/safdar/esp/esp-idf/components/jsmn /home/safdar/esp/esp-idf/components/json /home/safdar/esp/esp-idf/components/libsodium /home/safdar/esp/esp-idf/components/log /home/safdar/esp/esp-idf/components/lwip /home/safdar/esp/addtwoints_server/main /home/safdar/esp/esp-idf/components/mbedtls /home/safdar/esp/esp-idf/components/mdns /home/safdar/esp/esp-idf/components/micro_ros_espidf_component /home/safdar/esp/esp-idf/components/mqtt /home/safdar/esp/esp-idf/components/newlib /home/safdar/esp/esp-idf/components/nghttp /home/safdar/esp/esp-idf/components/nvs_flash /home/safdar/esp/esp-idf/components/openssl /home/safdar/esp/esp-idf/components/openthread /home/safdar/esp/esp-idf/components/partition_table /home/safdar/esp/esp-idf/components/perfmon /home/safdar/esp/esp-idf/components/protobuf-c /home/safdar/esp/esp-idf/components/protocomm /home/safdar/esp/esp-idf/components/pthread /home/safdar/esp/esp-idf/components/sdmmc /home/safdar/esp/esp-idf/components/soc /home/safdar/esp/esp-idf/components/spi_flash /home/safdar/esp/esp-idf/components/spiffs /home/safdar/esp/esp-idf/components/tcp_transport /home/safdar/esp/esp-idf/components/tcpip_adapter /home/safdar/esp/esp-idf/components/tinyusb /home/safdar/esp/esp-idf/components/ulp /home/safdar/esp/esp-idf/components/unity /home/safdar/esp/esp-idf/components/usb /home/safdar/esp/esp-idf/components/vfs /home/safdar/esp/esp-idf/components/wear_levelling /home/safdar/esp/esp-idf/components/wifi_provisioning /home/safdar/esp/esp-idf/components/wpa_supplicant /home/safdar/esp/esp-idf/components/xtensa
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/safdar/esp/addtwoints_server/build
  • Run> idf.py menuconfig (and set the wifi user/pwd)
  • Run> idf.py build

Expected behavior

if.py build should compile succesfully.

Actual behavior

Build output:

    ...
    [1010/1022] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj
    FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj 
    /home/safdar/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -Iconfig -I/home/safdar/esp/esp-idf/components/newlib/platform_include -I/home/safdar/esp/esp-idf/components/freertos/include -I/home/safdar/esp/esp-idf/components/freertos/include/esp_additions/freertos -I/home/safdar/esp/esp-idf/components/freertos/port/xtensa/include -I/home/safdar/esp/esp-idf/components/freertos/include/esp_additions -I/home/safdar/esp/esp-idf/components/esp_hw_support/include -I/home/safdar/esp/esp-idf/components/esp_hw_support/include/soc -I/home/safdar/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/safdar/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/home/safdar/esp/esp-idf/components/heap/include -I/home/safdar/esp/esp-idf/components/log/include -I/home/safdar/esp/esp-idf/components/lwip/include/apps -I/home/safdar/esp/esp-idf/components/lwip/include/apps/sntp -I/home/safdar/esp/esp-idf/components/lwip/lwip/src/include -I/home/safdar/esp/esp-idf/components/lwip/port/esp32/include -I/home/safdar/esp/esp-idf/components/lwip/port/esp32/include/arch -I/home/safdar/esp/esp-idf/components/soc/include -I/home/safdar/esp/esp-idf/components/soc/esp32/. -I/home/safdar/esp/esp-idf/components/soc/esp32/include -I/home/safdar/esp/esp-idf/components/hal/esp32/include -I/home/safdar/esp/esp-idf/components/hal/include -I/home/safdar/esp/esp-idf/components/hal/platform_port/include -I/home/safdar/esp/esp-idf/components/esp_rom/include -I/home/safdar/esp/esp-idf/components/esp_rom/include/esp32 -I/home/safdar/esp/esp-idf/components/esp_rom/esp32 -I/home/safdar/esp/esp-idf/components/esp_common/include -I/home/safdar/esp/esp-idf/components/esp_system/include -I/home/safdar/esp/esp-idf/components/esp_system/port/soc -I/home/safdar/esp/esp-idf/components/esp_system/port/public_compat -I/home/safdar/esp/esp-idf/components/esp32/include -I/home/safdar/esp/esp-idf/components/xtensa/include -I/home/safdar/esp/esp-idf/components/xtensa/esp32/include -I/home/safdar/esp/esp-idf/components/driver/include -I/home/safdar/esp/esp-idf/components/driver/esp32/include -I/home/safdar/esp/esp-idf/components/esp_pm/include -I/home/safdar/esp/esp-idf/components/esp_ringbuf/include -I/home/safdar/esp/esp-idf/components/efuse/include -I/home/safdar/esp/esp-idf/components/efuse/esp32/include -I/home/safdar/esp/esp-idf/components/vfs/include -I/home/safdar/esp/esp-idf/components/esp_wifi/include -I/home/safdar/esp/esp-idf/components/esp_event/include -I/home/safdar/esp/esp-idf/components/esp_netif/include -I/home/safdar/esp/esp-idf/components/esp_eth/include -I/home/safdar/esp/esp-idf/components/tcpip_adapter/include -I/home/safdar/esp/esp-idf/components/esp_phy/include -I/home/safdar/esp/esp-idf/components/esp_phy/esp32/include -I/home/safdar/esp/esp-idf/components/esp_ipc/include -I/home/safdar/esp/esp-idf/components/app_trace/include -I/home/safdar/esp/esp-idf/components/esp_timer/include -I/home/safdar/esp/esp-idf/components/mbedtls/port/include -I/home/safdar/esp/esp-idf/components/mbedtls/mbedtls/include -I/home/safdar/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/home/safdar/esp/esp-idf/components/app_update/include -I/home/safdar/esp/esp-idf/components/spi_flash/include -I/home/safdar/esp/esp-idf/components/bootloader_support/include -I/home/safdar/esp/esp-idf/components/nvs_flash/include -I/home/safdar/esp/esp-idf/components/pthread/include -I/home/safdar/esp/esp-idf/components/esp_gdbstub/include -I/home/safdar/esp/esp-idf/components/esp_gdbstub/xtensa -I/home/safdar/esp/esp-idf/components/esp_gdbstub/esp32 -I/home/safdar/esp/esp-idf/components/espcoredump/include -I/home/safdar/esp/esp-idf/components/espcoredump/include/port/xtensa -I/home/safdar/esp/esp-idf/components/wpa_supplicant/include -I/home/safdar/esp/esp-idf/components/wpa_supplicant/port/include -I/home/safdar/esp/esp-idf/components/wpa_supplicant/esp_supplicant/include -I/home/safdar/esp/esp-idf/components/ieee802154/include -I/home/safdar/esp/esp-idf/components/console -I/home/safdar/esp/esp-idf/components/asio/asio/asio/include -I/home/safdar/esp/esp-idf/components/asio/port/include -I/home/safdar/esp/esp-idf/components/cbor/port/include -I/home/safdar/esp/esp-idf/components/unity/include -I/home/safdar/esp/esp-idf/components/unity/unity/src -I/home/safdar/esp/esp-idf/components/cmock/CMock/src -I/home/safdar/esp/esp-idf/components/coap/port/include -I/home/safdar/esp/esp-idf/components/coap/libcoap/include -I/home/safdar/esp/esp-idf/components/nghttp/port/include -I/home/safdar/esp/esp-idf/components/nghttp/nghttp2/lib/includes -I/home/safdar/esp/esp-idf/components/esp-tls -I/home/safdar/esp/esp-idf/components/esp-tls/esp-tls-crypto -I/home/safdar/esp/esp-idf/components/esp_adc_cal/include -I/home/safdar/esp/esp-idf/components/esp_hid/include -I/home/safdar/esp/esp-idf/components/tcp_transport/include -I/home/safdar/esp/esp-idf/components/esp_http_client/include -I/home/safdar/esp/esp-idf/components/esp_http_server/include -I/home/safdar/esp/esp-idf/components/esp_https_ota/include -I/home/safdar/esp/esp-idf/components/esp_lcd/include -I/home/safdar/esp/esp-idf/components/esp_lcd/interface -I/home/safdar/esp/esp-idf/components/protobuf-c/protobuf-c -I/home/safdar/esp/esp-idf/components/protocomm/include/common -I/home/safdar/esp/esp-idf/components/protocomm/include/security -I/home/safdar/esp/esp-idf/components/protocomm/include/transports -I/home/safdar/esp/esp-idf/components/mdns/include -I/home/safdar/esp/esp-idf/components/esp_local_ctrl/include -I/home/safdar/esp/esp-idf/components/sdmmc/include -I/home/safdar/esp/esp-idf/components/esp_serial_slave_link/include -I/home/safdar/esp/esp-idf/components/esp_websocket_client/include -I/home/safdar/esp/esp-idf/components/expat/expat/expat/lib -I/home/safdar/esp/esp-idf/components/expat/port/include -I/home/safdar/esp/esp-idf/components/wear_levelling/include -I/home/safdar/esp/esp-idf/components/fatfs/diskio -I/home/safdar/esp/esp-idf/components/fatfs/vfs -I/home/safdar/esp/esp-idf/components/fatfs/src -I/home/safdar/esp/esp-idf/components/freemodbus/common/include -I/home/safdar/esp/esp-idf/components/idf_test/include -I/home/safdar/esp/esp-idf/components/idf_test/include/esp32 -I/home/safdar/esp/esp-idf/components/jsmn/include -I/home/safdar/esp/esp-idf/components/json/cJSON -I/home/safdar/esp/esp-idf/components/libsodium/libsodium/src/libsodium/include -I/home/safdar/esp/esp-idf/components/libsodium/port_include -I/home/safdar/esp/esp-idf/components/micro_ros_espidf_component/network_interfaces -I/home/safdar/esp/esp-idf/components/mqtt/esp-mqtt/include -I/home/safdar/esp/esp-idf/components/openssl/include -I/home/safdar/esp/esp-idf/components/perfmon/include -I/home/safdar/esp/esp-idf/components/spiffs/include -I/home/safdar/esp/esp-idf/components/ulp/include -I/home/safdar/esp/esp-idf/components/wifi_provisioning/include -isystem /home/safdar/esp/esp-idf/components/micro_ros_espidf_component/include -mlongcalls -Wno-frame-address   -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fmacro-prefix-map=/home/safdar/esp/addtwoints_server=. -fmacro-prefix-map=/home/safdar/esp/esp-idf=IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.4\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj   -c ../main/main.c
    ../main/main.c: In function 'micro_ros_task':
    ../main/main.c:46:10: error: implicit declaration of function 'rmw_uros_options_set_udp_address'; did you mean 'rcl_init_options_set_domain_id'? [-Werror=implicit-function-declaration]
      RCCHECK(rmw_uros_options_set_udp_address(CONFIG_MICRO_ROS_AGENT_IP, CONFIG_MICRO_ROS_AGENT_PORT, rmw_options));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../main/main.c:18:43: note: in definition of macro 'RCCHECK'
     #define RCCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Aborting.\n",__LINE__,(int)temp_rc);}}
                                               ^~
    ../main/main.c: In function 'app_main':
    ../main/main.c:82:40: warning: extra tokens at end of #ifdef directive
     #ifdef CONFIG_MICRO_ROS_ESP_NETIF_WLAN || CONFIG_MICRO_ROS_ESP_NETIF_ENET
                                            ^~
    cc1: some warnings being treated as errors
    [1014/1022] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c.obj
    ninja: build stopped: subcommand failed.
    ninja failed with exit code 1

Additional information

wrong freertos include path in esp32_toolchain.cmake.in

Edit: This does not apply to IDF 4.2, so this issue can be closed.

Build fails with the latest IDF master

$ idf.py --version
ESP-IDF v4.3-dev-2398-g2bfdd036b

This component can't find freertos/FreeRTOSConfig.h because it's looking in ${idf_path}/components/freertos/xtensa/include but the latest idf puts it under ${idf_path}/components/freertos/port/xtensa/include

The following change gets the compilation further:

$ git diff
diff --git a/esp32_toolchain.cmake.in b/esp32_toolchain.cmake.in
index 9059159..465e026 100644
--- a/esp32_toolchain.cmake.in
+++ b/esp32_toolchain.cmake.in
@@ -38,7 +38,7 @@ include_directories(
         ${idf_path}/components/vfs/include
         ${idf_path}/components/log/include
         ${idf_path}/components/freertos/include
-        ${idf_path}/components/freertos/xtensa/include
+        ${idf_path}/components/freertos/port/xtensa/include
         ${idf_path}/components/soc/soc/${idf_target}/include
         ${idf_path}/components/wifi_provisioning/include
         ${idf_path}/components/pthread/include

After that it demands the empty string as its fastcdr version and fails again, but that's a different issue

Failed on compile 'FAILED: libmicroros-prefix...

Issue template

  • Hardware description: esp32s2
  • RTOS:FreeRTOS
  • Installation type: idf.py build
  • Version or commit hash: foxy

Steps to reproduce the issue

Clone micro_ros_espidf_component into components folder
idf.py menuconfig - set MicroRos menu parameters
idf.py build

Expected behavior

Successful build so I can flash

Actual behavior

FAILED: libmicroros-prefix/src/libmicroros_project-stamp/libmicroros_project-build ../components/micro_ros_espidf_component/libmicroros.a

Additional information

xtensa-esp32-elf esp-2021r2-8.4.0 not working with micro-ROS

Issue template

  • Hardware description: ESP32
  • RTOS: FreeRTOS
  • Installation type: micro-ROS ESP-IDF component, git cloned ESP-IDF
  • Version or commit hash: foxy, ESP-IDF v4.4

Steps to reproduce the issue

Use git clone on ESP-IDF v4.4, download submodules, run install.sh, get dependencies for this component.
On the example int32_publisher_custom_transport, put in this component in the components folder (example not within component).
Build and flash component as usual.

Expected behavior

Successfully build.

Actual behavior

Following errors:

[100%] Linking CXX executable int32_publisher.elf
/home/skola/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: ../components/micro_ros_espidf_component-foxy/libmicroros.a(librmw-validate_node_name.c.obj): in function `rmw_validate_node_name':
validate_node_name.c:(.text.rmw_validate_node_name+0x6a): undefined reference to `__locale_ctype_ptr'
/home/skola/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: ../components/micro_ros_espidf_component-foxy/libmicroros.a(librmw-validate_full_topic_name.c.obj):(.literal.rmw_validate_full_topic_name+0x0): undefined reference to `__locale_ctype_ptr'
/home/skola/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: ../components/micro_ros_espidf_component-foxy/libmicroros.a(librmw-validate_full_topic_name.c.obj): in function `rmw_validate_full_topic_name':
validate_full_topic_name.c:(.text.rmw_validate_full_topic_name+0xd3): undefined reference to `__locale_ctype_ptr'
/home/skola/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: ../components/micro_ros_espidf_component-foxy/libmicroros.a(librcl-validate_topic_name.c.obj): in function `rcl_validate_topic_name':
validate_topic_name.c:(.text.rcl_validate_topic_name+0x26): undefined reference to `__locale_ctype_ptr'
/home/skola/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: validate_topic_name.c:(.text.rcl_validate_topic_name+0x98): undefined reference to `__locale_ctype_ptr'
/home/skola/.espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: ../components/micro_ros_espidf_component-foxy/libmicroros.a(librcl-validate_topic_name.c.obj):validate_topic_name.c:(.text.rcl_validate_topic_name+0x193): more undefined references to `__locale_ctype_ptr' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/int32_publisher.elf.dir/build.make:492: int32_publisher.elf] Error 1
make[1]: *** [CMakeFiles/Makefile2:2487: CMakeFiles/int32_publisher.elf.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
make failed with exit code 2

Additional information

Hi, I know v4.4 is not tested yet, but my group member gave me a ESP-IDF project containing the function i2c_master_write_read_device, for me to integrate into micro-ROS. That function is first introduced in ESP-IDF v4.4, which is why I'm experimenting with it.

I'm able to build the code with micro-ROS ESP-IDF component if the project is just as is, and even if I include something like <rclc/rclc.h> it still compiles, but when I try to mix the project with the int32_publisher_custom_transport example, it fails at the last step, complaining about the new xtensa-esp32-elf esp-2021r2-8.4.0 version (v4.1 is esp-2020r2-8.2.0).

Does anyone know if this can be solved? Or should I try to solve the original problem in another way?

Cmake version error when trying to run idf.py menuconfig

I installed esp-idf following this guide: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/
I successfully built and flashed the helloWorld example from the guide.

Now I want to use this repo micro_ros_espidf_component.

I tried to use examples/int32_publisher. So I created a folder inside examples/int32_publisher called components and i cloned this repo into the compononents folder.

I run . $IDF_PATH/export.sh and idf.py menuconfig. This produces an error:

`steffen@steffen-ubuntu:~/esp/int32_publisher$ idf.py menuconfig
Executing action: menuconfig
Running cmake in directory /home/steffen/esp/int32_publisher/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/steffen/esp/int32_publisher"...
-- Found Git: /usr/bin/git (found version "2.25.1")
-- IDF_TARGET not set, using default target: esp32
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/steffen/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/steffen/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/steffen/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
CMake Error at /home/steffen/esp/esp-idf/tools/cmake/component.cmake:221 (message):
CMake Deprecation Warning at /home/steffen/airwave/CMakeLists.txt:1
(cmake_minimum_required):

Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.



Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

Call Stack (most recent call first):

/home/steffen/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:60 (include)
/home/steffen/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:76 (__component_get_requirements)

CMake Error at /home/steffen/airwave/CMakeLists.txt:4 (project):

project command is not scriptable

Call Stack (most recent call first):

/home/steffen/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:60 (include)
/home/steffen/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:76 (__component_get_requirements)

Call Stack (most recent call first):
/home/steffen/esp/esp-idf/tools/cmake/build.cmake:405 (__component_get_requirements)
/home/steffen/esp/esp-idf/tools/cmake/project.cmake:395 (idf_build_process)
CMakeLists.txt:6 (project)

-- Configuring incomplete, errors occurred!
See also "/home/steffen/esp/int32_publisher/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
`

It seems like my cmake is outdated?
When i run cmake --version i get:

steffen@steffen-ubuntu:~/esp/int32_publisher$ cmake --version cmake version 3.19.3

How can I solve this? Running idf.py menuconfig when I follow the guide from espressif works fine.

issues getting to node init

Issue template

  • Hardware description: esp32
  • RTOS: freertos
  • Installation type: components module, esp-idf
  • Version or commit hash:
  • -- micro_ros_agent, foxy, rmw=fast_rtps
  • -- micro_ros_esp_idf_component: 76b97c
  • -- esp-idf v4.2: c9cf7b, ESP-IDF v4.2-408-gc9cf7bcb0

Steps to reproduce the issue

  • source ros2 and microros_ws
  • idf.py monitor

Expected behavior

Expected to connect to agent and publish message

Actual behavior

Failing on line node init with return value of 1:

  • // Create node.
    rcl_node_t node ;
    RCCHECK(rclc_node_init_default(&node, "esp32_int32_publisher", "", &support));

  • micro_ros_agent shows initial connection in log (-v6),

Additional information

Connected to wifi network, no issues pinging or connecting to each device

NOTE - i tried with the suggested docker containers, and galactic works but the foxy does not.

docker run -it --rm --net=host microros/micro-ros-agent:galactic udp4 --port 8888 -v6
docker run -it --rm --net=host microros/micro-ros-agent:foxy udp4 --port 8888 -v6

Error compiling sample project: rcl/rcl.h: No such file or directory #include <rcl/rcl.h>

Ubuntu 20.04
ROS Distro: Foxy

would you mind providing the answer for this? I followed the example here and am still getting the same error you are getting.
I am in the project folder, and have included the micro_ros_espidf_component folder

Project:
- components
- -micro_ros_espidf_component
- CMakelists.txt
- main.c

Originally posted by @wegunterjrFIrefly in #27 (comment)

Also, tried it by going into the examples/int32_publisher and am getting the same error.

Problems when adding second publisher - Aborts on RCCHECK at publish init

Issue template

  • Hardware description: esp32
  • RTOS: FreeRTOS
  • Installation type: micro ros esp idf component
  • Version or commit hash: galactic

Steps to reproduce the issue

based on int_32 publisher example, but this time adding two publishers

 // create publisher
    RCCHECK(rclc_publisher_init_best_effort(
        &publisher,
        &node,
        ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, Temperature),
        "temperature"));

    // //create humidty publisher
    RCCHECK(rclc_publisher_init_best_effort(
        &humidityPublisher,
        &node,
        ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, RelativeHumidity),
        "humidity"));`

colcon.meta in esp_idf_component is set to

       "rmw_microxrcedds": {
            "cmake-args": [
                "-DRMW_UXRCE_XML_BUFFER_LENGTH=400",
                "-DRMW_UXRCE_TRANSPORT=udp",
                "-DRMW_UXRCE_MAX_NODES=1",
                "-DRMW_UXRCE_MAX_PUBLISHERS=2",
                "-DRMW_UXRCE_MAX_SUBSCRIPTIONS=1",
                "-DRMW_UXRCE_MAX_SERVICES=1",
                "-DRMW_UXRCE_MAX_CLIENTS=1",
                "-DRMW_UXRCE_MAX_HISTORY=1"
            ]
        },

Expected behavior

Expected to publish two topics from same device

Actual behavior

Aborts at the line of the publisher init
Failed status on line 181: 1. Aborting.

Additional information

using ethernet on esp32 instead of wifi having some issues with compiling.

  • Hardware description: esp32 huzzah32 and ethernet featherweight
  • RTOS: freertos
  • Installation type: components
  • Version or commit hash: foxy

Steps to reproduce the issue

In menuconfig, selected micro-ROS over network uses Ethernet netif.
Ethernet configuration, selected W5500 module.

Expected behavior

Expected build to complete successfully and then flash and connect to agent.

Actual behavior

error: unknown type name 'eth_w5500_config_t'; did you mean 'eth_phy_config_t'? eth_w5500_config_t w5500_config = ETH_W5500_DEFAULT_CONFIG(spi_handle);

Additional information

Hardware supported list

Hi there,

Is there a list of supported hardware somewhere ?
I plan to get an ESP32 DevKitC but I want to be sure it could be compatible with your work.

Thank you

Error during building

Building Issue

  • Hardware description: ESP32
  • RTOS: FreeRTOS
  • Installation type: micro_ros as idf project component
  • Version or commit hash: foxy

Steps to reproduce the issue

I create a project and components directory in it and then clone this repo in components directory
After that I follow the instructions in repo for the example int32_publisher
Only difference I change certificate configuration manually as described here
https://github.com/espressif/esp-idf/issues/5322#issuecomment-935331910

When I try to build it, it fails at 2 points. Output is below

FAILED: libmicroros-prefix/src/libmicroros_project-stamp/libmicroros_project-build /home/berk/esp/ros_test/components/micro_ros_espidf_component/libmicroros.a 

and

from catkin_pkg.package import evaluate_condition
ModuleNotFoundError: No module named 'catkin_pkg'

If I try to import this statement in a python script, it works as expected.

Actual behavior

Executing action: all (aliases: build)
Running ninja in directory /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/build
Executing "ninja all"...
[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/sdkconfig
Loading defaults file /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/sdkconfig.defaults...
-- App "int32_publisher" version: 34948a0
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor cmock coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_ipc esp_local_ctrl esp_netif esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test jsmn json libsodium log lwip main mbedtls mdns micro_ros_espidf_component mqtt newlib nghttp nvs_flash openssl partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /home/berk/esp/esp-idf-v4.3.1/components/app_trace /home/berk/esp/esp-idf-v4.3.1/components/app_update /home/berk/esp/esp-idf-v4.3.1/components/asio /home/berk/esp/esp-idf-v4.3.1/components/bootloader /home/berk/esp/esp-idf-v4.3.1/components/bootloader_support /home/berk/esp/esp-idf-v4.3.1/components/bt /home/berk/esp/esp-idf-v4.3.1/components/cbor /home/berk/esp/esp-idf-v4.3.1/components/cmock /home/berk/esp/esp-idf-v4.3.1/components/coap /home/berk/esp/esp-idf-v4.3.1/components/console /home/berk/esp/esp-idf-v4.3.1/components/cxx /home/berk/esp/esp-idf-v4.3.1/components/driver /home/berk/esp/esp-idf-v4.3.1/components/efuse /home/berk/esp/esp-idf-v4.3.1/components/esp-tls /home/berk/esp/esp-idf-v4.3.1/components/esp32 /home/berk/esp/esp-idf-v4.3.1/components/esp_adc_cal /home/berk/esp/esp-idf-v4.3.1/components/esp_common /home/berk/esp/esp-idf-v4.3.1/components/esp_eth /home/berk/esp/esp-idf-v4.3.1/components/esp_event /home/berk/esp/esp-idf-v4.3.1/components/esp_gdbstub /home/berk/esp/esp-idf-v4.3.1/components/esp_hid /home/berk/esp/esp-idf-v4.3.1/components/esp_http_client /home/berk/esp/esp-idf-v4.3.1/components/esp_http_server /home/berk/esp/esp-idf-v4.3.1/components/esp_https_ota /home/berk/esp/esp-idf-v4.3.1/components/esp_https_server /home/berk/esp/esp-idf-v4.3.1/components/esp_hw_support /home/berk/esp/esp-idf-v4.3.1/components/esp_ipc /home/berk/esp/esp-idf-v4.3.1/components/esp_local_ctrl /home/berk/esp/esp-idf-v4.3.1/components/esp_netif /home/berk/esp/esp-idf-v4.3.1/components/esp_pm /home/berk/esp/esp-idf-v4.3.1/components/esp_ringbuf /home/berk/esp/esp-idf-v4.3.1/components/esp_rom /home/berk/esp/esp-idf-v4.3.1/components/esp_serial_slave_link /home/berk/esp/esp-idf-v4.3.1/components/esp_system /home/berk/esp/esp-idf-v4.3.1/components/esp_timer /home/berk/esp/esp-idf-v4.3.1/components/esp_websocket_client /home/berk/esp/esp-idf-v4.3.1/components/esp_wifi /home/berk/esp/esp-idf-v4.3.1/components/espcoredump /home/berk/esp/esp-idf-v4.3.1/components/esptool_py /home/berk/esp/esp-idf-v4.3.1/components/expat /home/berk/esp/esp-idf-v4.3.1/components/fatfs /home/berk/esp/esp-idf-v4.3.1/components/freemodbus /home/berk/esp/esp-idf-v4.3.1/components/freertos /home/berk/esp/esp-idf-v4.3.1/components/hal /home/berk/esp/esp-idf-v4.3.1/components/heap /home/berk/esp/esp-idf-v4.3.1/components/idf_test /home/berk/esp/esp-idf-v4.3.1/components/jsmn /home/berk/esp/esp-idf-v4.3.1/components/json /home/berk/esp/esp-idf-v4.3.1/components/libsodium /home/berk/esp/esp-idf-v4.3.1/components/log /home/berk/esp/esp-idf-v4.3.1/components/lwip /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/main /home/berk/esp/esp-idf-v4.3.1/components/mbedtls /home/berk/esp/esp-idf-v4.3.1/components/mdns /home/berk/esp/ros_test/components/micro_ros_espidf_component /home/berk/esp/esp-idf-v4.3.1/components/mqtt /home/berk/esp/esp-idf-v4.3.1/components/newlib /home/berk/esp/esp-idf-v4.3.1/components/nghttp /home/berk/esp/esp-idf-v4.3.1/components/nvs_flash /home/berk/esp/esp-idf-v4.3.1/components/openssl /home/berk/esp/esp-idf-v4.3.1/components/partition_table /home/berk/esp/esp-idf-v4.3.1/components/perfmon /home/berk/esp/esp-idf-v4.3.1/components/protobuf-c /home/berk/esp/esp-idf-v4.3.1/components/protocomm /home/berk/esp/esp-idf-v4.3.1/components/pthread /home/berk/esp/esp-idf-v4.3.1/components/sdmmc /home/berk/esp/esp-idf-v4.3.1/components/soc /home/berk/esp/esp-idf-v4.3.1/components/spi_flash /home/berk/esp/esp-idf-v4.3.1/components/spiffs /home/berk/esp/esp-idf-v4.3.1/components/tcp_transport /home/berk/esp/esp-idf-v4.3.1/components/tcpip_adapter /home/berk/esp/esp-idf-v4.3.1/components/tinyusb /home/berk/esp/esp-idf-v4.3.1/components/ulp /home/berk/esp/esp-idf-v4.3.1/components/unity /home/berk/esp/esp-idf-v4.3.1/components/vfs /home/berk/esp/esp-idf-v4.3.1/components/wear_levelling /home/berk/esp/esp-idf-v4.3.1/components/wifi_provisioning /home/berk/esp/esp-idf-v4.3.1/components/wpa_supplicant /home/berk/esp/esp-idf-v4.3.1/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/build
[11/977] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
[295/977] Performing configure step for 'bootloader'
-- Found Git: /usr/bin/git (found version "2.25.1") 
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/sdkconfig
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script /home/berk/esp/esp-idf-v4.3.1/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_hw_support esp_rom esp_system esptool_py hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: /home/berk/esp/esp-idf-v4.3.1/components/bootloader /home/berk/esp/esp-idf-v4.3.1/components/bootloader_support /home/berk/esp/esp-idf-v4.3.1/components/efuse /home/berk/esp/esp-idf-v4.3.1/components/esp32 /home/berk/esp/esp-idf-v4.3.1/components/esp_common /home/berk/esp/esp-idf-v4.3.1/components/esp_hw_support /home/berk/esp/esp-idf-v4.3.1/components/esp_rom /home/berk/esp/esp-idf-v4.3.1/components/esp_system /home/berk/esp/esp-idf-v4.3.1/components/esptool_py /home/berk/esp/esp-idf-v4.3.1/components/hal /home/berk/esp/esp-idf-v4.3.1/components/log /home/berk/esp/esp-idf-v4.3.1/components/bootloader/subproject/main /home/berk/esp/esp-idf-v4.3.1/components/bootloader/subproject/components/micro-ecc /home/berk/esp/esp-idf-v4.3.1/components/newlib /home/berk/esp/esp-idf-v4.3.1/components/partition_table /home/berk/esp/esp-idf-v4.3.1/components/soc /home/berk/esp/esp-idf-v4.3.1/components/spi_flash /home/berk/esp/esp-idf-v4.3.1/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/build/bootloader
[387/977] Performing build step for 'bootloader'
[1/86] Generating project_elf_src_esp32.c
[2/86] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mpu_hal.c.obj
[3/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/lldesc.c.obj
[4/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/soc_include_legacy_warn.c.obj
[5/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/dac_periph.c.obj
[6/86] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src_esp32.c.obj
[7/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/gpio_periph.c.obj
[8/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/adc_periph.c.obj
[9/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/ledc_periph.c.obj
[10/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/i2c_periph.c.obj
[11/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/i2s_periph.c.obj
[12/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/interrupts.c.obj
[13/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rmt_periph.c.obj
[14/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdmmc_periph.c.obj
[15/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/pcnt_periph.c.obj
[16/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sigmadelta_periph.c.obj
[17/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/memory_layout_utils.c.obj
[18/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/soc_memory_layout.c.obj
[19/86] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/wdt_hal_iram.c.obj
[20/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_io_periph.c.obj
[21/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/timer_periph.c.obj
[22/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/spi_periph.c.obj
[23/86] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_sys.c.obj
[24/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/touch_sensor_periph.c.obj
[25/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/uart_periph.c.obj
[26/86] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdio_slave_periph.c.obj
[27/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
[28/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash.c.obj
[29/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_mem.c.obj
[30/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_init.c.obj
[31/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
[32/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common_loader.c.obj
[33/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/secure_boot.c.obj
[34/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random_esp32.c.obj
[35/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
[36/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
[37/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_qio_mode.c.obj
[38/86] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/esp32/spi_flash_rom_patch.c.obj
[39/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console_loader.c.obj
[40/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_loader.c.obj
[41/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
[42/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse_esp32.c.obj
[43/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
[44/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_panic.c.obj
[45/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash_config_esp32.c.obj
[46/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console.c.obj
[47/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_sha.c.obj
[48/86] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_table.c.obj
[49/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/flash_encrypt.c.obj
[50/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_esp32.c.obj
[51/86] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_api.c.obj
[52/86] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_fields.c.obj
[53/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/compare_set.c.obj
[54/86] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_utility.c.obj
[55/86] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
[56/86] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
[57/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/cpu_util.c.obj
[58/86] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
[59/86] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_crc.c.obj
[60/86] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
[61/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_clk_init.c.obj
[62/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_sleep.c.obj
[63/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_init.c.obj
[64/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_pm.c.obj
[65/86] Building ASM object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_longjmp.S.obj
[66/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_time.c.obj
[67/86] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_uart.c.obj
[68/86] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/uECC_verify_antifault.c.obj
[69/86] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[70/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_wdt.c.obj
[71/86] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
[72/86] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
[73/86] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_clk.c.obj
[74/86] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
[75/86] Linking C static library esp-idf/log/liblog.a
[76/86] Linking C static library esp-idf/esp_rom/libesp_rom.a
[77/86] Linking C static library esp-idf/esp_hw_support/libesp_hw_support.a
[78/86] Linking C static library esp-idf/efuse/libefuse.a
[79/86] Linking C static library esp-idf/bootloader_support/libbootloader_support.a
[80/86] Linking C static library esp-idf/spi_flash/libspi_flash.a
[81/86] Linking C static library esp-idf/micro-ecc/libmicro-ecc.a
[82/86] Linking C static library esp-idf/soc/libsoc.a
[83/86] Linking C static library esp-idf/hal/libhal.a
[84/86] Linking C static library esp-idf/main/libmain.a
[85/86] Linking C executable bootloader.elf
[86/86] Generating binary image from built executable
esptool.py v3.1-dev
Merged 1 ELF section
Generated /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/build/bootloader/bootloader.bin
[966/977] Performing build step for 'libmicroros_project'
FAILED: libmicroros-prefix/src/libmicroros_project-stamp/libmicroros_project-build /home/berk/esp/ros_test/components/micro_ros_espidf_component/libmicroros.a 
cd /home/berk/esp/ros_test/components/micro_ros_espidf_component && make -j -f libmicroros.mk X_CC=/home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc X_AR=/home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-ar X_STRIP=/home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-strip "X_CFLAGS=-mlongcalls -Wno-frame-address" X_CXX=/home/berk/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ "X_CXXFLAGS=-mlongcalls -Wno-frame-address" BUILD_DIR=/home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/build IDF_PATH=/home/berk/esp/esp-idf-v4.3.1 IDF_TARGET=esp32 APP_COLCON_META= IDF_VERSION_MAJOR=4 IDF_VERSION_MINOR=3 EXTRA_ROS_PACKAGES=/home/berk/esp/ros_test/components/micro_ros_espidf_component/extra_packages && /usr/bin/cmake -E touch /home/berk/esp/ros_test/components/micro_ros_espidf_component/examples/int32_publisher/build/libmicroros-prefix/src/libmicroros_project-stamp/libmicroros_project-build
rm -f /home/berk/esp/ros_test/components/micro_ros_espidf_component/esp32_toolchain.cmake; \
cat /home/berk/esp/ros_test/components/micro_ros_espidf_component/esp32_toolchain.cmake.in | \
	sed "s/@CMAKE_C_COMPILER@/\/home\/berk\/.espressif\/tools\/xtensa-esp32-elf\/esp-2021r1-8.4.0\/xtensa-esp32-elf\/bin\/xtensa-esp32-elf-gcc/g" | \
	sed "s/@CMAKE_CXX_COMPILER@/\/home\/berk\/.espressif\/tools\/xtensa-esp32-elf\/esp-2021r1-8.4.0\/xtensa-esp32-elf\/bin\/xtensa-esp32-elf-g++/g" | \
	sed "s/@CFLAGS@/-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections/g" | \
	sed "s/@CXXFLAGS@/-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections/g" | \
	sed "s/@IDF_TARGET@/esp32/g" | \
	sed "s/@IDF_PATH@/\/home\/berk\/esp\/esp-idf-v4.3.1/g" | \
	sed "s/@BUILD_CONFIG_DIR@/\/home\/berk\/esp\/ros_test\/components\/micro_ros_espidf_component\/examples\/int32_publisher\/build\/config/g" \
	> /home/berk/esp/ros_test/components/micro_ros_espidf_component/esp32_toolchain.cmake
rm -rf micro_ros_dev; \
mkdir micro_ros_dev; cd micro_ros_dev; \
git clone -b galactic https://github.com/ament/ament_cmake src/ament_cmake; \
git clone -b galactic https://github.com/ament/ament_lint src/ament_lint; \
git clone -b galactic https://github.com/ament/ament_package src/ament_package; \
git clone -b galactic https://github.com/ament/googletest src/googletest; \
git clone -b galactic https://github.com/ros2/ament_cmake_ros src/ament_cmake_ros; \
git clone -b galactic https://github.com/ament/ament_index src/ament_index; \
colcon build --cmake-args -DBUILD_TESTING=OFF;
rm -rf micro_ros_src; \
mkdir micro_ros_src; cd micro_ros_src; \
git clone -b foxy https://github.com/eProsima/micro-CDR src/micro-CDR; \
git clone -b foxy https://github.com/eProsima/Micro-XRCE-DDS-Client src/Micro-XRCE-DDS-Client; \
git clone -b galactic https://github.com/micro-ROS/rcl src/rcl; \
git clone -b galactic https://github.com/ros2/rclc src/rclc; \
git clone -b galactic https://github.com/micro-ROS/rcutils src/rcutils; \
git clone -b galactic https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs; \
git clone -b galactic https://github.com/micro-ROS/rmw-microxrcedds src/rmw-microxrcedds; \
git clone -b galactic https://github.com/micro-ROS/rosidl_typesupport src/rosidl_typesupport; \
git clone -b galactic https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds; \
git clone -b galactic https://github.com/ros2/rosidl src/rosidl; \
git clone -b galactic https://github.com/ros2/rmw src/rmw; \
git clone -b galactic https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \
git clone -b galactic https://github.com/ros2/rosidl_defaults src/rosidl_defaults; \
git clone -b galactic https://github.com/ros2/unique_identifier_msgs src/unique_identifier_msgs; \
git clone -b galactic https://github.com/ros2/common_interfaces src/common_interfaces; \
git clone -b galactic https://github.com/ros2/test_interface_files src/test_interface_files; \
git clone -b galactic https://github.com/ros2/rmw_implementation src/rmw_implementation; \
git clone -b galactic https://github.com/ros2/rcl_logging src/rcl_logging; \
git clone -b galactic https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing src/ros2_tracing; \
git clone -b galactic https://github.com/micro-ROS/micro_ros_utilities src/micro_ros_utilities; \
touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \
touch src/rcl_logging/rcl_logging_log4cxx/COLCON_IGNORE; \
touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \
touch src/rclc/rclc_examples/COLCON_IGNORE; \
touch src/rcl/rcl_yaml_param_parser/COLCON_IGNORE; \
cp -rf /home/berk/esp/ros_test/components/micro_ros_espidf_component/extra_packages src/extra_packages || :; \
test -f src/extra_packages/extra_packages.repos && cd src/extra_packages && vcs import --input extra_packages.repos || :;
Cloning into 'src/micro-CDR'...
Cloning into 'src/ament_cmake'...
Cloning into 'src/ament_lint'...
Cloning into 'src/Micro-XRCE-DDS-Client'...
Cloning into 'src/rcl'...
Cloning into 'src/ament_package'...
Cloning into 'src/googletest'...
Cloning into 'src/rclc'...
Cloning into 'src/rcutils'...
Cloning into 'src/micro_ros_msgs'...
Cloning into 'src/rmw-microxrcedds'...
Cloning into 'src/ament_cmake_ros'...
Cloning into 'src/ament_index'...
Cloning into 'src/rosidl_typesupport'...
Cloning into 'src/rosidl_typesupport_microxrcedds'...
Cloning into 'src/rosidl'...
Starting >>> ament_package
Starting >>> ament_lint
Starting >>> gtest_vendor
Starting >>> ament_cppcheck
Starting >>> ament_uncrustify
Starting >>> ament_pycodestyle
Cloning into 'src/rmw'...
--- stderr: gtest_vendor
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING


---
Finished <<< gtest_vendor [1.26s]
Starting >>> gmock_vendor
--- stderr: gmock_vendor
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING


---
Finished <<< gmock_vendor [0.13s]
Finished <<< ament_lint [1.46s]
Starting >>> ament_flake8
Finished <<< ament_uncrustify [1.71s]
Finished <<< ament_pycodestyle [1.70s]
Finished <<< ament_package [1.79s]
Finished <<< ament_cppcheck [1.74s]
Starting >>> ament_cmake_core
Cloning into 'src/rcl_interfaces'...
Starting >>> ament_pyflakes
--- stderr: ament_cmake_core
Traceback (most recent call last):
  File "/home/berk/esp/ros_test/components/micro_ros_espidf_component/micro_ros_dev/src/ament_cmake/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 22, in <module>
    from catkin_pkg.package import evaluate_condition
ModuleNotFoundError: No module named 'catkin_pkg'
CMake Error at cmake/core/ament_package_xml.cmake:94 (message):
  
  execute_process(/home/berk/.espressif/python_env/idf4.3_py3.8_env/bin/python3
  /home/berk/esp/ros_test/components/micro_ros_espidf_component/micro_ros_dev/src/ament_cmake/ament_cmake_core/cmake/core/package_xml_2_cmake.py
  /home/berk/esp/ros_test/components/micro_ros_espidf_component/micro_ros_dev/src/ament_cmake/ament_cmake_core/package.xml
  /home/berk/esp/ros_test/components/micro_ros_espidf_component/micro_ros_dev/build/ament_cmake_core/ament_cmake_core/package.cmake)
  returned error code 1
Call Stack (most recent call first):
  cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
  CMakeLists.txt:15 (ament_package_xml)


---
Failed   <<< ament_cmake_core [0.27s, exited with code 1]
Aborted  <<< ament_flake8 [0.61s]
Cloning into 'src/rosidl_defaults'...
Aborted  <<< ament_pyflakes [0.51s]

Summary: 7 packages finished [2.92s]
  1 package failed: ament_cmake_core
  2 packages aborted: ament_flake8 ament_pyflakes
  3 packages had stderr output: ament_cmake_core gmock_vendor gtest_vendor
  49 packages not processed
make: *** [libmicroros.mk:38: /home/berk/esp/ros_test/components/micro_ros_espidf_component/micro_ros_dev/install] Error 1
make: *** Waiting for unfinished jobs....
Cloning into 'src/unique_identifier_msgs'...
Cloning into 'src/common_interfaces'...
Cloning into 'src/test_interface_files'...
Cloning into 'src/rmw_implementation'...
Cloning into 'src/rcl_logging'...
Cloning into 'src/ros2_tracing'...
warning: redirecting to https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git/
Cloning into 'src/micro_ros_utilities'...
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Porting ros1 spotmicro code to microros esp32 - help installing tf2_ package

Issue template

  • Hardware description: esp32
  • RTOS: freertos
  • Installation type: espidf 4.3
  • Version or commit hash: galatic

I'm trying to port Mike's sportmicro code from ros1 to microros.
Mike's code includes references to tf2 - see below
https://github.com/mike4192/spotMicro

#include "tf2/LinearMath/Quaternion.h"
#include "tf2_eigen/tf2_eigen.h"
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"

....

  TransformStamped tr_stamped;

  // base_link to front_link transform
  tr_stamped = createTransform("base_link", "front_link",
                               0.0, 0.0, 0.0,
                               0.0, 0.0, 0.0);

The include files aren't found.
So I tried cloning ros2/geometry2 to micro_ros_espidf_component/micro_ros_src/src.
The make -f libmicroros.mk compile failed miserably.
I tried putting ros2/geometry2 in the extra package directory - that didn't work either.
I noticed references to microros/geometry2 github repositories on the internet (as if there's a special microros version of geometry2)
Unfortunately, all links I searched were broken.
Looking for any help I can get.
Is this even possible?

Additional information

Unable to compile for ESP32-S2 and ESP IDF v4.2

Hi,
i am trying to build the int32_publisher example for the ESP32-S2.

My steps:

1.)
Install IDF as defined in:
https://docs.espressif.com/projects/esp-idf/en/release-v4.2/esp32/get-started/index.html
git clone -b release/v4.2 --recursive https://github.com/espressif/esp-idf.git

2.)
checkout micro_ros_espidf_component

3.)
idf.py set-target esp32s2
idf.py build

Problem A:
This build is not working because the cmake IDF_TARGET variable is not used.
IDF_TARGET contains "esp32" or "esp32s2".

If I modify the include path in esp32_toolchain.cmake.in, then i am able to compile
the example. I think esp32_toolchain.cmake.in should use the IDF_TARGET variable
for building the include path.

esp32s2.patch.txt

Unfortunately, it is still not linking. I get this error:

[ 99%] Linking CXX executable int32_publisher.elf
.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: esp-idf/xtensa/libxtensa.a(stdatomic.c.obj): in function `__atomic_fetch_add_8':
esp-idf-v4.2/components/xtensa/stdatomic.c:116: multiple definition of `__atomic_fetch_add_8'; micro_ros_espidf_component/libmicroros.a(librcutils-atomic_64bits.c.obj):atomic_64bits.c:(.text.__atomic_fetch_add_8+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/int32_publisher.elf.dir/build.make:396: int32_publisher.elf] Error 1
make[1]: *** [CMakeFiles/Makefile2:2245: CMakeFiles/int32_publisher.elf.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
make failed with exit code 2

Do you have got any hint?

I would be great, if this component could support esp32-s2 too.

Can't publish CompressedImage topic

Issue template

I like to create a ESP32 Cam node sending a CompressedImage topic.

  • Hardware description: ESP32 CAM

Steps to reproduce the issue

Code: https://github.com/MS71/ESP32microROSImagePublisher.git

Expected behavior

rcl_publish should send the topic without error.

Actual behavior

I (1378) spiram: SPI SRAM memory test OK
I (1386) cpu_start: Pro cpu start user code
I (1386) cpu_start: cpu freq: 160000000
I (1386) cpu_start: Application information:
I (1389) cpu_start: Project name:     int32_publisher
I (1395) cpu_start: App version:      ff24a87
I (1400) cpu_start: Compile time:     Dec  9 2021 21:19:55
I (1406) cpu_start: ELF file SHA256:  d8325eb3d28ee7e6...
I (1412) cpu_start: ESP-IDF:          v4.3.1
I (1418) heap_init: Initializing. RAM available for dynamic allocation:
I (1425) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1431) heap_init: At 3FFBD410 len 00022BF0 (138 KiB): DRAM
I (1437) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1444) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1450) heap_init: At 4009A5D4 len 00005A2C (22 KiB): IRAM
I (1457) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (1466) spi_flash: detected chip: generic
I (1469) spi_flash: flash io: dio
I (1475) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1484) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1544) wifi_station_netif: ESP_WIFI_MODE_STA
I (1554) wifi:wifi driver task: 3ffcf314, prio:23, stack:6656, core=0
I (1554) system_api: Base MAC address is not set
I (1554) system_api: read default base MAC address from EFUSE
I (1574) wifi:wifi firmware version: 88c8747
I (1574) wifi:wifi certification version: v7.0
I (1574) wifi:config NVS flash: enabled
I (1574) wifi:config nano formating: disabled
I (1584) wifi:Init data frame dynamic rx buffer num: 32
I (1584) wifi:Init management frame dynamic rx buffer num: 32
I (1594) wifi:Init management short buffer num: 32
I (1594) wifi:Init static tx buffer num: 16
I (1604) wifi:Init tx cache buffer num: 32
I (1604) wifi:Init static rx buffer size: 1600
I (1614) wifi:Init static rx buffer num: 10
I (1614) wifi:Init dynamic rx buffer num: 32
I (1614) wifi_init: rx ba win: 6
I (1624) wifi_init: tcpip mbox: 32
I (1624) wifi_init: udp mbox: 6
I (1634) wifi_init: tcp mbox: 6
I (1634) wifi_init: tcp tx win: 5744
I (1634) wifi_init: tcp rx win: 5744
I (1644) wifi_init: tcp mss: 1440
I (1644) wifi_init: WiFi IRAM OP enabled
I (1654) wifi_init: WiFi RX IRAM OP enabled
I (1654) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
W (1814) phy_init: saving new calibration data because of checksum failure, mode(0)
I (1834) wifi:mode : sta (fc:f5:c4:30:ab:54)
I (1834) wifi:enable tsf
I (1834) wifi_station_netif: wifi_init_sta finished.
I (1844) wifi:new:<1,1>, old:<1,0>, ap:<255,255>, sta:<1,1>, prof:1
I (1844) wifi:state: init -> auth (b0)
I (1864) wifi:state: auth -> assoc (0)
I (1874) wifi:state: assoc -> run (10)
I (1894) wifi:connected with ScholzHomeNet, aid = 3, channel 1, 40U, bssid = 7c:ff:4d:4a:f2:dd
I (1894) wifi:security: WPA2-PSK, phy: bgn, rssi: -80
I (1904) wifi:pm start, type: 1

W (1914) wifi:<ba-add>idx:0 (ifx:0, 7c:ff:4d:4a:f2:dd), tid:0, ssn:0, winSize:64
I (1964) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (2544) esp_netif_handlers: sta ip: 192.168.0.175, mask: 255.255.255.0, gw: 192.168.0.1
I (2544) wifi_station_netif: got ip:192.168.0.175
I (2544) wifi_station_netif: connected to ap SSID:xxxxxxxxx password:xxxxxxxxx
I (2554) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2 
I (2564) cam_hal: cam init ok
I (2574) sccb: pin_sda 26 pin_scl 27
I (2574) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (2614) camera: Detected camera at address=0x30
I (2614) camera: Detected OV2640 camera
I (2614) camera: Camera PID=0x26 VER=0x42 MIDL=0x7f MIDH=0xa2
I (2704) cam_hal: buffer_size: 32768, half_buffer_size: 4096, node_buffer_size: 2048, node_cnt: 16, total_cnt: 3
I (2704) cam_hal: Allocating 15360 Byte frame buffer in PSRAM
I (2704) cam_hal: cam config ok
I (2714) ov2640: Set PLL: clk_2x: 0, clk_div: 0, pclk_auto: 0, pclk_div: 8
I (3814) example:take_picture: Taking picture...
I (3814) example:take_picture: Picture taken! Its size was: 2597 bytes 320 240 2597 3000 0x3fff8388
Failed status on line 153: 1. Continuing.
I (4814) example:take_picture: Taking picture...
I (4814) example:take_picture: Picture taken! Its size was: 2617 bytes 320 240 2617 3000 0x3fff8388
Failed status on line 153: 1. Continuing.
I (5814) example:take_picture: Taking picture...
I (5814) example:take_picture: Picture taken! Its size was: 2617 bytes 320 240 2617 3000 0x3fff8388
Failed status on line 153: 1. Continuing.
I (6814) example:take_picture: Taking picture...
I (6814) example:take_picture: Picture taken! Its size was: 2617 bytes 320 240 2617 3000 0x3fff8388
**Failed status on line 153: 1. Continuing.**
I (7814) example:take_picture: Taking picture...
I (7814) example:take_picture: Picture taken! Its size was: 2617 bytes 320 240 2617 3000 0x3fff8388
**Failed status on line 153: 1. Continuing.**
I (8814) example:take_picture: Taking picture...
I (8814) example:take_picture: Picture taken! Its size was: 2617 bytes 320 240 2617 3000 0x3fff8388
**Failed status on line 153: 1. Continuing.**
I (9814) example:take_picture: Taking picture...
I (9814) example:take_picture: Picture taken! Its size was: 2617 bytes 320 240 2617 3000 0x3fff8388
**Failed status on line 153: 1. Continuing.**

Additional information

My questions:
A.) What could be the reason for "Failed status on line 153: 1. Continuing."?
B.) How can I enable logging in the microROS stack?

Feature request: allow extra packages by VCS import or git submodules

This follows #30

When setting up an application and tracking it with git, I import micro_ros_espidf_component as a git submodule.
I'd like to track additional application-specific ROS2 packages as either more git submodules, or with an extra_packages.repos file.
At the moment, extra packages cannot be tracked with git submodules without a race condition on import (my bad)

It seems like either the extra_packages folder or extra_packages.repos (or both) should sit outside this component, in the application root.
However, looking for a file in $(EXTENSIONS_DIR)/../../extra_packages.repos would prevent the user from being able to install this component IDF-wide.

Is there a makefile variable that can target the application root? or can the application CMakeLists.txt pass it on?

build issue

Hi,
suddenly, i get a build issue with this component.

My build commands:
rm -rf build components/micro-ROS/micro_ros_* components/micro-ROS/esp32_toolchain.cmake components/micro-ROS/include/ components/micro-ROS/*.a
export IDF_PATH=/home/maik/workspace/esp32/stable
source /opt/ros/foxy/setup.sh
. $IDF_PATH/export.sh
echo $IDF_PATH
#idf.py menuconfig
idf.py -v build

...
Summary: 22 packages finished [22.9s]
1 package failed: builtin_interfaces
4 packages aborted: lifecycle_msgs rmw_microxrcedds std_srvs unique_identifier_msgs
23 packages had stderr output: builtin_interfaces lifecycle_msgs microcdr microxrcedds_client rcutils rmw rmw_implementation_cmake rmw_microxrcedds rosidl_adapter rosidl_cmake
...

Any hint howto solve this issue?

build.txt

Service callback never called with a custom interfaces using strings

Service callback never called with a custom interfaces using strings

  • Hardware description: ESP32
  • RTOS: FreeRTOS
  • Installation type: idf component
  • Version or commit hash: humble

I made two custom interfaces, one typical AddThreeInts, and one ping :
image

The callback method in both cases looks like that :

void ping_callback(const void* request, void* response) {
    ESP_LOGI(TAG, "Received ping request");
}

When I create the service using my AddThreeInts or the example AddTwoInts, the callback is called properly.
But when I use my ping interfaces, it never goes into the callback...

Steps to reproduce the issue

How I create the service :

    // Create ping server with default config (Reliable QoS)
    const rosidl_service_type_support_t* type_support =
        ROSIDL_GET_SRV_TYPE_SUPPORT(ble2ros_interfaces, srv, Ping);
    RCCHECK(rclc_service_init_default(&ping_srv, &node, type_support, ping_srv_name));

    // Create executor
    executor = rclc_executor_get_zero_initialized_executor();
    RCCHECK(rclc_executor_init(&executor, &support.context, 4, &allocator));

    // Add ping server to executor
    RCCHECK(rclc_executor_add_service(
            &executor,
            &ping_srv,
            &ping_req,
            &ping_rsp,
            ping_callback
    ));

Add extra packages to IDF component

I ran through most of the tutorials and docs at this point and have a working esp-idf app. I'm wondering how to add custom message types now, the directions in the docs seem more focused on *firmware.sh files.

Might be nice to have an example or some light docs around this

DDS error while node creation

  • Hardware description: ESP32
  • RTOS: freeRTOS
  • Installation type: micro_ros_espidf_component
  • Version or commit hash: foxy
  • ESP-IDF version - V4.2

Steps to reproduce the issue

  • Follow the same steps as provided in the readme file of the micro_ros_espidf_component repo.
  • Configure the system static IP and network credentials in menuconfig
  • Build the int32_publisher example for ESP32
  • After flashing the code and starting the micro ros agent in another terminal, monitor the ESP32

Expected behavior

Ideally, after flashing the code ESP32, it should create a node and start publishing the msg via the micro ros agent.

Actual behavior

In ESP32 monitoring terminal :

It shows Failed status on line 52: 1. Aborting.
Which refer to the line below in main.c file
RCCHECK(rclc_node_init_default(&node, "esp32_int32_publisher", "", &support));

In micro-ros-agent terminal :

The micro ros client got connected to the server using UDP over wifi but there is DDS error which I assume is due to the error while creating the node.
A verbosity level 5 was giving this output :

[1623178488.148211] info     | SessionManager.hpp | establish_session        | session re-established | client_key: 0x1757513824, address: 192.168.1.32:16326
[1623178488.148315] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0x68C18860, len: 19
[1623178488.148334] debug    | ProxyClient.cpp    | create_participant       | DDS error              | client_key: 0x68C18860, participant_id: 0x000(1)
[1623178488.148415] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0x68C18860, len: 14
[1623178488.148442] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0x68C18860, len: 13
[1623178488.152428] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0x68C18860, len: 13
[1623178488.152627] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0x68C18860, len: 13
[1623178488.152893] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0x68C18860, len: 13
[1623178488.153022] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0x68C18860, len: 13
[1623178488.171194] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0x68C18860, len: 13

Additional information

I tried and tested most of the micro ros ESP IDF component examples when first used it, like a month back.
But currently after updating the repo, it is building successfully but while running the code on ESP32 I'm facing these errors.

I did try to debug it myself, looking deeper into function definitions(thanks to vs code), but I hit a roadblock there as I was unable to enable micro ros logging messages.

To enable the log, I redefined #define RCUTILS_LOG_MIN_SEVERITY RCUTILS_LOG_MIN_SEVERITY_WARN and changed the ESP verbosity but that didn't affect the micro ros logging.

Is someone else getting the same issue? any help would be really appreciated.

Thanks

idf.py build error

Issue template

  • Hardware description: ESP32S2
  • RTOS: freertos
  • Installation type:
  • Version or commit hash: ESP-IDF 4.2

Steps to reproduce the issue

An error occurs when I compile the program,I don't know why.

Expected behavior

Actual behavior

Additional information

image

int32_publisher build error

Build Issue

Hardware description: ESP32S2
RTOS: freertos
Installation type:
Version or commit hash: ESP-IDF 4.2

  • Hardware description: esp32
  • RTOS: freertos
  • Installation type:
  • Version or commit hash: micro-ROS used: galactic, ESP-IDF 4.4

Steps to reproduce the issue

  1. install ESP-IDF 4.4
  2. git clone micro_ros_espidf_component, branch: galactic
  3. . $IDF_PATH/export.sh
  4. cd examples/int32_publisher
  5. idf.py set-target esp32
  6. edit sdkconfig.defaults, configuration CONFIG_ESP_WIFI_SSID, CONFIG_ESP_WIFI_PASSWORK.
  7. idf.py build
<command-line>: note: this is the location of the previous definition
<command-line>: note: this is the location of the previous definition
In file included from /opt/esp-idf/v4.4/esp-idf-v4.4/components/lwip/lwip/src/include/lwip/opt.h:51,
                 from /opt/esp-idf/v4.4/esp-idf-v4.4/components/lwip/lwip/src/include/lwip/sys.h:40,
                 from /opt/micro-ROS/micro_ros_espidf_component/micro_ros_src/src/embeddedRTPS/include/rtps/ThreadPool.h:28,
                 from /opt/micro-ROS/micro_ros_espidf_component/micro_ros_src/src/embeddedRTPS/include/rtps/entities/Domain.h:28,
                 from /opt/micro-ROS/micro_ros_espidf_component/micro_ros_src/src/embeddedRTPS/include/rtps/rtps.h:28,
                 from /opt/micro-ROS/micro_ros_espidf_component/micro_ros_src/src/embeddedRTPS/src/rtps.cpp:25:
/opt/esp-idf/v4.4/esp-idf-v4.4/components/lwip/port/esp32/include/lwipopts.h:768: warning: "LWIP_IPV6" redefined
 #define LWIP_IPV6                       CONFIG_LWIP_IPV6
 
<command-line>: note: this is the location of the previous definition
---
Finished <<< embeddedrtps [6.10s]
Starting >>> rcl_logging_noop
--- stderr: rcl_yaml_param_parser
CMake Warning at /opt/micro-ROS/micro_ros_espidf_component/micro_ros_src/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
  Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
  /opt/micro-ROS/micro_ros_espidf_component/micro_ros_src/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
  CMakeLists.txt:6 (find_package)


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

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

    libyaml_vendorConfig.cmake
    libyaml_vendor-config.cmake

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


---
Failed   <<< rcl_yaml_param_parser [0.98s, exited with code 1]
Aborted  <<< rcl_logging_log4cxx [0.86s]
Aborted  <<< rcl_logging_noop [0.68s]
Aborted  <<< rosidl_cmake [1.46s]

Summary: 13 packages finished [11.8s]
  1 package failed: rcl_yaml_param_parser
  3 packages aborted: rcl_logging_log4cxx rcl_logging_noop rosidl_cmake
  10 packages had stderr output: embeddedrtps microxrcedds_client rcl_logging_interface rcl_logging_log4cxx rcl_logging_noop rcl_yaml_param_parser rcutils rmw rosidl_cli rosidl_runtime_c
  51 packages not processed
make: *** [libmicroros.mk:51: /opt/micro-ROS/micro_ros_espidf_component/micro_ros_src/install] Error 1
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

why is the rccheck deleting the task if it doesn't initialize or if it doesn't see the agent?

Issue template

  • Hardware description: esp32
  • RTOS: FreeRTOS
  • Installation type: esp idf component
  • Version or commit hash: galactic espidf component/galactic micro ros agent docker

Steps to reproduce the issue

Following example int32_publisher or other micro_ros programs running on esp32 with freertos, the example shows to use RCCHECK.
Sometimes there might be issues with the network or maybe micro_ros_agent is restarted, etc, but the example shows that if during initialization of the esp32 program, the agent is not available it aborts and deletes the task. Does it have to be so final?
Was this just to make it easy during initial bring up and getting someone an understanding? or was there another reason I am not seeing?

Thanks!!

Expected behavior

Actual behavior

Additional information

Int32_publisher example fails at create init_options

Int32_publisher example fails at create init_options

  • Hardware description: ESP32 devkitCv4, Host Windows 10 AMD Ryzen, Ubuntu 20.04.4 VM.
  • RTOS: Just running default example
  • Installation type: idf.py
  • Version or commit hash: Galactic eb6b9b7 foxy abf1c8b

Steps to reproduce the issue

  1. Follow espressif tutorial on how to install esp-idf on linux (In my case, Ubuntu VM). ESP-IDF install turorial . And run hello world example to verify that your device is configured correctly.
  2. Create components directory and clone this repository either galactic or foxy branches.
  3. Follow this repo example to menuconfig
  4. Change wifi credentials and RosConfig to have your host (Windows 10) IP .
  5. Continue following example
  6. Run docker container on host PC just like in example.

The issue can be replicated both running in foxy and galactic builds.

Expected behavior

  1. Example builds, flashes, and runs until the point where connection to the ros-agent is needed

Actual behavior

  1. ESP32 connects to Wifi
  2. Starts initializing ros
  3. and halts at
    image

RCCHECK(rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator));

both in galactic and foxy.

Additional information

I also tried to flash this on my other ESP32 which is as I can remember devkitv1, but It had a lot of stuff written inside so some configurations may have been lost and now I can't flash to it at all :) . If needed I have multiple ESP32 lying around so i can test on these too.

Build with arduino-esp32 component

It would be great to use micro_ros_espidf_component with arduino-esp32 component in applications.
Sometimes itโ€™s more convinient to use arduino libraries than using low level hardware API from esp-idf sdk.

There is esp-idf sdk version mismatch currently for building these components.
Now it's possible to build both using esp-idf 4.0 but some modifications are needed in example app.
(see needed modifications in branch arduino-component https://github.com/dsryzhov/micro_ros_espidf_component/tree/feature/arduino-component)
see also modification description on thread
https://discourse.ros.org/t/micro-ros-porting-to-esp32/16101/11?u=dmitry_ryzhov

May be two example app should be created (with using arduino-esp32 component and without).

By the way I think about that it would be great to change structure for micro_ros_espidf_component repository.
Standard way to add components to esp32 applications is to clone them from git to components directory.

Currently repo micro_ros_espidf_component contains not component but example app (that integrate microros component).
Component should be on the first level. And example apps in an example subdirectory.

This app could be added to example directory

running int32_subscriber example and get an error 'usleep'/'fseek'

Issue template

  • Hardware description: esp32
  • RTOS: freertos
  • Installation type: micro_ros_setup build_firmware.sh
  • Version or commit hash: foxy

Steps to reproduce the issue

running the tutorial for FreeRTOS on esp32
https://micro.ros.org/docs/tutorials/core/first_application_rtos/freertos/

Expected behavior

Expecting code to compile, and then be able to run the flash step, but it fails.

Actual behavior

Build fails, and I get the following error:
error: implicit declaration of function 'usleep'; did you mean 'fseek'

Additional information

Build process fails for "int32_publisher_custom_transport" example

Issue template

  • Hardware description: ESP32
  • RTOS: freertos
  • Installation type: .
  • Version or commit hash: galactic

Steps to reproduce the issue

Put following two files (Dockerfile and bash_script.sh) into one folder and run docker build -t testcontainer . inside this folder.

Dockerfile:

FROM espressif/idf:release-v4.3

ENV DEBIAN_FRONTEND noninteractive
RUN echo "Set disable_coredump false" >> /etc/sudo.conf
RUN apt update -q && \
    apt install -yq sudo lsb-release gosu nano && \
    rm -rf /var/lib/apt/lists/*

ARG TZ_ARG=UTC
ENV TZ=$TZ_ARG
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

COPY ./bash_script.sh /bash_script.sh

RUN mkdir -p /tmp/bash_script && mv /bash_script.sh /tmp/bash_script/ && \
    /tmp/bash_script/bash_script.sh

bash_script.sh (don't forget to make this file executable with sudo chmod +x bash_script.sh):

#!/bin/bash

set -eu

sudo apt update -q
sudo apt install -yq python3-pip
source $IDF_PATH/export.sh
pip3 install catkin_pkg lark-parser empy colcon-common-extensions importlib-resources
git clone https://github.com/micro-ROS/micro_ros_espidf_component.git
cd micro_ros_espidf_component
sed -i 's/DRMW_UXRCE_TRANSPORT=udp/DRMW_UXRCE_TRANSPORT=custom/' colcon.meta
cd examples/int32_publisher_custom_transport
idf.py set-target esp32
idf.py build

set +u

Expected behavior

Build process finishes without errors.

Actual behavior

Build process fails. See attachment "output-int32_publisher_custom_transport.log".
output-int32_publisher_custom_transport.log

Additional information

As a check the "int32_publisher" example could be built without any error with this bash_script.sh:

#!/bin/bash

set -eu

sudo apt update -q
sudo apt install -yq python3-pip
source $IDF_PATH/export.sh
pip3 install catkin_pkg lark-parser empy colcon-common-extensions importlib-resources
git clone 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 build

set +u

The output of this build process can be found in the attachment "output-int32_publisher.log"
output-int32_publisher.log

ESP32 via UDP: `Failed status on line 48: 1. Aborting.`

Issue template

  • Hardware description: ESP32
  • RTOS: FreeRTOS
  • Installation type: micro-ROS component for ESP-IDF
  • Version: foxy

Steps to reproduce the issue

Install ESP-IDF and create a first project, as written here:

sudo pacman -S --needed gcc git make flex bison gperf python-pip cmake ninja ccache dfu-util libusb
mkdir -p ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
cd ~/esp/esp-idf
./install.sh esp32
. $HOME/esp/esp-idf/export.sh
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
cd ~/esp/hello_world
idf.py set-target esp32
idf.py build
idf.py -p /dev/ttyUSB0 flash

At this point with idf.py -p /dev/ttyUSB0 monitor I can correctly see the "Hello world!" output being generated by the ESP32.

Moving on, install the micro-ROS component for ESP-IDF and run the int32_publisher example, as written here:

. $IDF_PATH/export.sh
pip3 install catkin_pkg lark-parser empy colcon-common-extensions
cd ~/esp/hello_world
mkdir components
cd ~/esp/hello_world/components
git clone -b foxy https://github.com/micro-ROS/micro_ros_espidf_component.git
cd ~/esp/hello_world/components/micro_ros_espidf_component/examples/int32_publisher
idf.py set-target esp32
idf.py menuconfig
# set WiFi credentials, and agent's port (8888) and IP address (same as local machine: 192.168.1.7)
idf.py build 
idf.py -p /dev/ttyUSB0 flash  

Run a micro-ROS Agent on a new terminal:

docker run -it --rm --net=host microros/micro-ros-agent:foxy udp4 --port 8888 -v6

Monitor the ESP32:

 idf.py -p /dev/ttyUSB0 monitor 

Expected behavior

I should be able to see the ESP32 publishing messages on a new topic.

Actual behavior

The ESP32 does not publish any message, and no new topic is created.

From the terminal monitoring the ESP32 I see that it successfully connects to the WiFi network, but then the error Failed status on line 48: 1. Aborting. appears, referring to this line.

The output of the micro-ROS Agent is the following:

โžœ  ~ docker run -it --rm --net=host microros/micro-ros-agent:foxy udp4 --port 8888 -v6
[1632387100.513237] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888
[1632387100.513442] info     | Root.cpp            | set_verbose_level        | logger setup           | verbose_level: 6

ESP32 Power Managment added in example application

Hi, i made some tests with the newly added ESP32-S2 support.
I added a path with the required changes. Maybe, this is
a good starting point for somebody.

Required Change in configuration:
CONFIG_PM_ENABLE=y
CONFIG_PM_DFS_INIT_AUTO=y
CONFIG_ESP_MAIN_TASK_STACK_SIZE=3000
CONFIG_FREERTOS_USE_TICKLESS_IDLE=y

ESP32 (WRover Module, 16MByte Flash, 8MByte PSRAM):
The VCC current is pulsating between min and max value.

wifi listen_interval = 5
ros2 topic send interval = 1000 ms

The mean current (estimated) is: 26 mA

ESP32-S2 (WRover Module, 4MByte Flash, 8MByte PSRAM):
The VCC current is pulsating between min and max value.

wifi listen_interval = 5
ros2 topic send interval = 1000 ms

The mean current (estimated) is: 14 mA
		
By increasing the wifi listen_interval (e.g. 30) and 
the topic send interval (e.g. 60000), the mean 
current might be reduced to 5 mA.

esp32_pm_support.patch.txt

Slow publishing rate since update

Slow publishing since upgrade.

  • Hardware description: ESP32 Wroom
  • RTOS: FreeRTOS
  • Installation type: micro_ros_espidf_component
  • Version or commit hash: foxy (latest)
    esp-idf: release/v4.3

Since upgrading to the latest micro_ros_espidf_component we are seeing a large performance drop on the ros publishing side.
We previously were able to publish sensor data at around 150hz (~32byte message at 1'000'000 baud). However now since upgrading, we are only seeing around 10hz.
We are connecting to the micro_ros_agent via serial.

Does anyone know what the possible cause and potential solution could be?
Thanks!

USB interface

Hi
Thanks for this great library.
Is it possible to use USB to publish ROS messages instead of Wifi or UART pins?
We are using an ESP32 connected to a Linux machine via USB and would like to send messages across that interface.
I was looking at the custom_publisher example but I'm a bit unsure how to proceed in order to use USB as far as I understood it's used for UART communication via arduino pins.
Any info would be greatly appreciated, thanks!
Thanks

any thoughts on static ip?

Issue template

Hardware description: esp32
RTOS: FREE RTOS
Installation type: micro_ros_espidf_component (using default examples/int32_publisher) - checked out latest
Version or commit hash: foxy, espidf v4.2, micro_ros_espidf_component latest

Steps to reproduce the issue

I am adding a wifi_init_sta to set the static ip address.

Expected behavior

Expect the wif station to start and connect using a static ip.

Actual behavior

I am getting a panic boot loop on the line in my main that calls the wifi_init_sta in my code.

Additional information

Problem building with make

Issue template

  • Hardware description: ESP32 WROVER-E
  • RTOS: FREERTOS
  • Installation type: micro_ros_espidf_component
  • Version or commit hash: foxy

Steps to reproduce the issue

Create a makefile under int32_publisher
Build int32_publisher example with make

Expected behavior

Build the project as with idf.py

Actual behavior

Make gives the following error:
/SDK/esp-idf/components/micro_ros/examples/int32_publisher/main/main.c:10:10: fatal error: uros_network_interfaces.h: No such file or directory
#include <uros_network_interfaces.h>

Aditional info

The Makefile that I have created is like the one of the SDK examples:

PROJECT_NAME := int32_publisher

include $(IDF_PATH)/make/project.mk

Also wen I open menuconfig with make menuconfig I see the example-app settings but not the micro_ros configuration

UCLIENT_PROFILE_MULTITHREAD breaks build

Issue template

  • Hardware description: ESP-WROOM-32
  • RTOS: freertos
  • Installation type: idf build
  • Version or commit hash: foxy latest

Steps to reproduce the issue

turn on middleware thread-safety

colcon.meta:
         "microxrcedds_client": {
             "cmake-args": [
+                "-DUCLIENT_PROFILE_MULTITHREAD=ON",

Expected behavior

build without errors

Actual behavior

errors indicating microxrcedds_client cannot properly identify the platform

typedef struct uxrMutex is declared empty, and the string PLATFORM_NAME_FREERTOS is not found anywhere in the build files except microxrcedds_client source.

Cannot build int32_publisher example.

  • Hardware description: Docker with espressif/idf image and ESP32-C3
  • RTOS: freeRTOS
  • Installation type: ESP-IDF
  • Version or commit hash: galactic

Steps to reproduce the issue

  1. Sourced IDF
root@G14:/# cd /opt/esp/idf
root@G14:/opt/esp/idf# . $IDF_PATH/export.sh
Detecting the Python interpreter
Checking "python" ...
Python 3.8.10
"python" has been detected
Adding ESP-IDF tools to PATH...
Using Python interpreter in /opt/esp/python_env/idf5.0_py3.8_env/bin/python
Checking if Python packages are up to date...
Skipping the download of /root/.espressif/espidf.constraints.v5.0.txt because it was downloaded recently. If you believe that this is causing you trouble then remove it manually and re-run your install script.
Constraint file: /root/.espressif/espidf.constraints.v5.0.txt
Requirement files:
 - /opt/esp/idf/requirements.core.txt
Python being checked: /opt/esp/python_env/idf5.0_py3.8_env/bin/python
Python requirements are satisfied.
Added the following directories to PATH:
  /opt/esp/idf/components/esptool_py/esptool
  /opt/esp/idf/components/espcoredump
  /opt/esp/idf/components/partition_table
  /opt/esp/idf/components/app_update
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build
  1. Installed dependencies
Successfully installed argcomplete-2.0.0 attrs-21.4.0 catkin_pkg-0.4.24 colcon-argcomplete-0.3.3 colcon-bash-0.4.2 colcon-cd-0.1.1 colcon-cmake-0.2.26 colcon-common-extensions-0.2.1 colcon-core-0.7.1 colcon-defaults-0.2.6 colcon-devtools-0.2.3 colcon-library-path-0.2.1 colcon-metadata-0.2.5 colcon-notification-0.2.13 colcon-output-0.2.12 colcon-package-information-0.3.3 colcon-package-selection-0.2.10 colcon-parallel-executor-0.2.4 colcon-pkg-config-0.1.0 colcon-powershell-0.3.7 colcon-python-setup-py-0.2.7 colcon-recursive-crawl-0.2.1 colcon-ros-0.3.22 colcon-test-result-0.3.8 colcon-zsh-0.4.0 coverage-6.3.1 distlib-0.3.4 docutils-0.18.1 empy-3.3.4 importlib-resources-5.4.0 iniconfig-1.1.1 lark-parser-0.12.0 notify2-0.3.1 packaging-21.3 pluggy-1.0.0 py-1.11.0 pytest-7.0.0 pytest-cov-3.0.0 pytest-repeat-0.9.1 pytest-rerunfailures-10.2 python-dateutil-2.8.2 tomli-2.0.1 zipp-3.7.0
  1. Cloned repo to /opt/esp/idf/components
git clone https://github.com/micro-ROS/micro_ros_espidf_component
Cloning into 'micro_ros_espidf_component'...
remote: Enumerating objects: 703, done.
remote: Counting objects: 100% (420/420), done.
remote: Compressing objects: 100% (266/266), done.
remote: Total 703 (delta 269), reused 248 (delta 149), pack-reused 283
Receiving objects: 100% (703/703), 187.30 KiB | 792.00 KiB/s, done.
Resolving deltas: 100% (400/400), done.
  1. Set target as esp32c3 and ran menuconfig
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/esp/idf/components/micro_ros_espidf_component/examples/int32_publisher/build
WARNING: Menuconfig may fail because of the TERM environment variable is set to "xterm". Please consult the documentation of your terminal to set it up. Some good, proved to been working setups include xterm-256color, screen-256color, rxvt-unicode-256color.
Loaded configuration '/opt/esp/idf/components/micro_ros_espidf_component/examples/int32_publisher/sdkconfig'
No changes to save (for '/opt/esp/idf/components/micro_ros_espidf_component/examples/int32_publisher/sdkconfig')
Loading defaults file /opt/esp/idf/components/micro_ros_espidf_component/examples/int32_publisher/sdkconfig.defaults...
  1. Ran idf.py build

Expected behavior

idf.py build completes without any errors

Actual behavior

The following error was seen.

In file included from /opt/esp/idf/components/lwip/port/esp32/include/lwipopts.h:17,
                 from /opt/esp/idf/components/lwip/lwip/src/include/lwip/opt.h:51,
                 from /opt/esp/idf/components/lwip/lwip/src/include/lwip/sockets.h:42,
                 from /opt/esp/idf/components/lwip/port/esp32/include/sys/socket.h:33,
                 from /opt/esp/idf/components/micro_ros_espidf_component/micro_ros_src/src/Micro-XRCE-DDS-Client/src/c/profile/transport/ip/udp/udp_transport_posix_nopoll.c:5:
/opt/esp/idf/components/esp_system/include/esp_task.h:32:10: fatal error: freertos/FreeRTOS.h: No such file or directory
 #include "freertos/FreeRTOS.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/microxrcedds_client.dir/build.make:412: CMakeFiles/microxrcedds_client.dir/src/c/profile/transport/ip/udp/udp_transport_posix_nopoll.c.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /opt/esp/idf/components/lwip/port/esp32/include/lwipopts.h:17,
                 from /opt/esp/idf/components/lwip/lwip/src/include/lwip/opt.h:51,
                 from /opt/esp/idf/components/lwip/lwip/src/include/lwip/sockets.h:42,
                 from /opt/esp/idf/components/lwip/port/esp32/include/sys/socket.h:33,
                 from /opt/esp/idf/components/micro_ros_espidf_component/micro_ros_src/src/Micro-XRCE-DDS-Client/src/c/profile/discovery/transport/udp_transport_datagram_posix_nopoll.c:4:
/opt/esp/idf/components/esp_system/include/esp_task.h:32:10: fatal error: freertos/FreeRTOS.h: No such file or directory
 #include "freertos/FreeRTOS.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/microxrcedds_client.dir/build.make:454: CMakeFiles/microxrcedds_client.dir/src/c/profile/discovery/transport/udp_transport_datagram_posix_nopoll.c.obj] Error 1
In file included from /opt/esp/idf/components/lwip/port/esp32/include/lwipopts.h:17,
                 from /opt/esp/idf/components/lwip/lwip/src/include/lwip/opt.h:51,
                 from /opt/esp/idf/components/lwip/lwip/src/include/lwip/inet.h:43,
                 from /opt/esp/idf/components/lwip/port/esp32/include/arpa/inet.h:18,
                 from /opt/esp/idf/components/micro_ros_espidf_component/micro_ros_src/src/Micro-XRCE-DDS-Client/src/c/profile/transport/ip/ip_posix.c:18:
/opt/esp/idf/components/esp_system/include/esp_task.h:32:10: fatal error: freertos/FreeRTOS.h: No such file or directory
 #include "freertos/FreeRTOS.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/microxrcedds_client.dir/build.make:426: CMakeFiles/microxrcedds_client.dir/src/c/profile/transport/ip/ip_posix.c.obj] Error 1
make[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/microxrcedds_client.dir/all] Error 2
make[1]: *** [Makefile:136: all] Error 2
---
Failed   <<< microxrcedds_client [1.72s, exited with code 2]
Aborted  <<< rosidl_adapter [1.74s]
Aborted  <<< rmw [0.09s]
Aborted  <<< rcl_logging_noop [0.03s]

Summary: 13 packages finished [4.68s]
  1 package failed: microxrcedds_client
  3 packages aborted: rcl_logging_noop rmw rosidl_adapter
  9 packages had stderr output: microxrcedds_client rcl_logging_interface rcutils ros2trace rosidl_cli rosidl_runtime_c tracetools_launch tracetools_read tracetools_trace
  45 packages not processed
make: *** [libmicroros.mk:87: /opt/esp/idf/components/micro_ros_espidf_component/micro_ros_src/install] Error 2
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Additional information

idf.py build commands works with without micro_ros_espidf_component added.

Error: rcl not set

Hi I'm facing a problem, I'm running ubuntu18.04 with dashing so to set up everything I decided to use the docker.
Inside the components folder I copied the repository and later run the command

docker run -i --rm --net=host microros/micro-ros-agent:foxy udp4 --port 8889 -v6
to start the agent and later the command to build and flash the programm

docker run -it --rm --user espidf --volume="/etc/timezone:/etc/timezone:ro" -v $(pwd):/micro_ros_espidf_component -v /dev:/dev --privileged --workdir /micro_ros_espidf_component microros/esp-idf-microros:latest /bin/bash -c "cd examples/int32_publisher; idf.py menuconfig build flash monitor"

Now during the monitor I can see that the board is connected to my wifi but I get this error.
ESP_ERROR
The ip of the agent I gave is the same of the machine where is running the docker of the agent
Do you have any idea what can be? Thanks for your time

Problems when adding subscriber

I have added a subscriber to the demo code in this repo but it continuously reboots. I started with a working version of the code in this repo and then merged in changes from the file:
https://github.com/micro-ROS/micro-ROS-demos/blob/foxy/rclc/int32_publisher_subscriber/main.c
My code builds and flashes without any problem.

I start the pre-built docker agent: microros/micro-ros-agent:foxy, and run the installed code on my ESP32. When start the monitor (idf.py monitor) I get see these error messages:

...
I (1536) wifi station: connected to ap SSID:TP-LINK_AP_8670
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d5671  PS      : 0x00060730  A0      : 0x800d7030  A1      : 0x3ffca300  
0x400d5671: rcl_node_init at ??:?

A2      : 0x3ffcb044  A3      : 0x3f402ea0  A4      : 0x3f402774  A5      : 0x3ffcb000  
A6      : 0x3ffcafa0  A7      : 0x3ffcafa4  A8      : 0x800d5652  A9      : 0xa5a5a5a5  
A10     : 0x00000000  A11     : 0x3ffca320  A12     : 0x3ffca320  A13     : 0x400d7228  
0x400d7228: __default_zero_allocate at allocator.c:?

A14     : 0x00000000  A15     : 0x3ffcab74  SAR     : 0x00000008  EXCCAUSE: 0x0000001c  
EXCVADDR: 0xa5a5a5b9  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffe  

ELF file SHA256: daeebb271d1632ea

Backtrace: 0x400d566e:0x3ffca300 0x400d702d:0x3ffcaba0 0x400d516a:0x3ffcafe0 0x40087205:0x3ffcb0f0
0x400d566e: rcl_node_init at ??:?

0x400d702d: rclc_node_init_default at ??:?

0x400d516a: appMain at /home/build/micro_ros_idf/build/../main/rclc_int32_publisher_subscriber.c:52 (discriminator 3)

0x40087205: vPortTaskWrapper at /opt/esp/idf/components/freertos/port.c:143


Rebooting...

My code is here: https://github.com/AndyBlightLeeds/micro_ros_espidf_component/tree/publisher-1.

Any idea what I'm doing wrong?

Build fails if ROS 2 setup script has been sourced

  • Hardware description: ESP32
  • RTOS: FreeRTOS / ESP-IDF v4.2.1
  • Installation type: micro_ros_espidf_component
  • Version or commit hash: foxy

Steps to reproduce the issue

Building the micro-ROS component after sourcing the ROS 2 setup scripts into the environment causes the build to fail while compiling builtin_interfaces.
Running idf.py build for a second time then fails with fatal error: rcl/rcl.h: No such file or directory.

E.g. the following fails during build, but will work fine if the first line is excluded:

. /opt/ros/foxy/setup.zsh
export IDF_PATH=/home/russell/esp/esp-idf-v4.2.1
. $IDF_PATH/export.sh
git clone 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 build

Additional information

This has briefly been covered previously in #1, and I suspect it could have also been the cause of the unexplained problems described in #53 (although that build might have just failed for some other reason).

While somehow changing the build scripts to work while the ROS 2 environment is present would obviously be best, for now just mentioning explicitly in the README that the environment should be clean and the ROS setup script should not be sourced before running the build would be good.

I'm sure I'm not the only person who sources the ROS scripts in their .zshrc file (or equivalent), or might assume that they should be present when working with anything ROS related, which sometimes makes it more of an explicit task to not source the scripts, rather than the other way around.

Example docker image unable to start building due to locale

Issue template

  • Hardware description: Ubuntu 20.04.4 VM.
  • RTOS: None
  • Installation type: Docker example
  • Version or commit hash: galactic

Steps to reproduce the issue

  1. Set up Ubuntu with locale lt_LT.UTF8 . ( Mine was set up while installing and selecting Vilnius as location)
  2. Run docker run -it --rm --user espidf --volume="/etc/timezone:/etc/timezone:ro" -v $(pwd):/micro_ros_espidf_component -v /dev:/dev --privileged --workdir /micro_ros_espidf_component microros/esp-idf-microros:latest /bin/bash -c "cd examples/int32_publisher; idf.py menuconfig build flash monitor" from example. Example readme

Expected behavior

  • Docker image successfully pulled
  • example project starts building

Actual behavior

  • Docker image successfully pulled
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build

/bin/bash: line 0: cd: examples/int32_publisher: No such file or directory
Your environment is not configured to handle unicode filenames outside of ASCII range. Environment variable LC_ALL is temporary set to C.UTF-8 for unicode support.
Executing action: menuconfig
CMakeLists.txt not found in project directory /micro_ros_espidf_component

Additional information

Service callback

Issue template

  • Hardware description: ESP32-C3 DevKitM-1
  • RTOS: FreeRTOS
  • Version or commit hash: Galactic

Hi, I am trying to create a service server on an ESP32-C3. The ESP is connected to the agent via serial. I combined the int32_publisher_custom_transport and addtwoints_server to create the program.

#include <string.h>
#include <stdio.h>
#include <unistd.h>

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "esp_system.h"
#include "driver/uart.h"
#include "driver/gpio.h"
#include "sdkconfig.h"

#include <rcl/rcl.h>
#include <rcl/error_handling.h>
#include <std_srvs/srv/trigger.h>
#include <rclc/rclc.h>
#include <rclc/executor.h>

#include <rmw_microxrcedds_c/config.h>
#include <rmw_microros/rmw_microros.h>
#include "esp32_serial_transport.h"

#define DOMAIN_ID 3
static char res_message = '\0';

#define RCCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Aborting.\n",__LINE__,(int)temp_rc);vTaskDelete(NULL);}}
#define RCSOFTCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Continuing.\n",__LINE__,(int)temp_rc);}}

void service_callback(const void * req, void * res)
{
  std_srvs__srv__Trigger_Request * req_in = (std_srvs__srv__Trigger_Request *) req;
  std_srvs__srv__Trigger_Response * res_in = (std_srvs__srv__Trigger_Response *) res;
  res_in->success = true;
}

void micro_ros_task(void * arg)
{
	rcl_allocator_t allocator = rcl_get_default_allocator();
	rclc_support_t support;

	// Create init_options.
	rcl_init_options_t init_options = rcl_get_zero_initialized_init_options();
	RCCHECK(rcl_init_options_init(&init_options, allocator));
	RCCHECK(rcl_init_options_set_domain_id(&init_options, DOMAIN_ID));
	RCCHECK(rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator));

	// create node
	rcl_node_t node;
	RCCHECK(rclc_node_init_default(&node, "test_node", "", &support));

	rcl_service_t service;
	RCCHECK(rclc_service_init_default(&service, &node, ROSIDL_GET_SRV_TYPE_SUPPORT(std_srvs, srv, Trigger), "/test_service"));

	// create executor
	rclc_executor_t executor;
	RCCHECK(rclc_executor_init(&executor, &support.context, 2, &allocator));

	std_srvs__srv__Trigger_Response res;
	res.message.data = &res_message;
	std_srvs__srv__Trigger_Request req;
	RCCHECK(rclc_executor_add_service(&executor, &service, &req, &res, &service_callback));

	while(1){
		rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100));
		usleep(100000);
	}

	RCCHECK(rcl_service_fini(&service, &node));
	RCCHECK(rcl_node_fini(&node));
}

static size_t uart_port = UART_NUM_0;

void app_main(void)
{
	#if defined(RMW_UXRCE_TRANSPORT_CUSTOM)
		rmw_uros_set_custom_transport(
			true,
			(void *) &uart_port,
			esp32_serial_open,
			esp32_serial_close,
			esp32_serial_write,
			esp32_serial_read
		);
	#else
	#error micro-ROS transports misconfigured
	#endif  // RMW_UXRCE_TRANSPORT_CUSTOM

	xTaskCreate(micro_ros_task,
			"uros_task",
			CONFIG_MICRO_ROS_APP_STACK,
			NULL,
			CONFIG_MICRO_ROS_APP_TASK_PRIO,
			NULL);
}

The program builds fine and the service is visible on the command-line.
When I sent a request via the command-line using

ros2 service call /test_service std_srvs/srv/Trigger {}

The callback function is not being called and thus no response is given. The request is being received as I can see it within the micro_ros_agents output.

Expected behavior

Callback function is called and response is given.

Actual behavior

No response given.

Any help is appreciated!

int32_publisher example, failed status on line

Issue template

  • Hardware description: esp32
  • RTOS: FREE RTOS
  • Installation type: micro_ros_espidf_component (using default examples/int32_publisher) - checked out latest
  • Version or commit hash: foxy, espidf v4.2, micro_ros_espidf_component 6e172d5

Steps to reproduce the issue

running the example int32_publisher

  • flash successful
  • idf.py monitor

Expected behavior

  • successful connection to the agent
  • send message every second

Actual behavior

  • shows successful connection to micro_ros_agent running on linux
  • immediately gives me:
  [INFO] [0000000010.052555000] []: Created a timer with period 1000 ms.
  
  Failed status on line 29: 1. Continuing.

Additional information

How can I add a existing ROS2 package to my esp project and use it?

  • Hardware description: esp32
  • RTOS: FreeRTOS
  • Installation type: micro_ros_setup, robot_state_publisher
  • Version or commit hash: foxy

Steps to reproduce the issue

Expected behavior

ESP32 runs a launch.py file of "robot_state_publisher" package in the app_main function.

Actual behavior

I dont know how to apply a package for my project.
clone the package into component folder, and then what to do?

Additional information

please let me know if there is any useful tutorial. Thank you very much!

Using Ethernet with the OLIMEX ESP32-PoE-ISO Rev.D

Issue template

I am trying to get the OLIMEX ESP32-PoE-ISO Rev.D to work via Ethernet.
The board has a LAN8710A-EZC(QFN32) PHY. I assumed selecting the LAN8720 in the menuconfig wouldn't be problematic.
However this PHY doesn't have the reset (NRST) mapped on any gpio:
image

I saw that some people use directly the power pin mapped on gpio 12 to reboot the PHY.

That's what I tried with no success, here's the log of idf.py monitor:
image

Do you have any suggestion on how to get it working?
Is Ethernet transport not supported with this board?

Directory structure for micro_ros_espidf_component

It's my proposal for changinf directory structure for this repository
to make it compatible with esp-idf component.
It will make it possible to use Micro-ROS esp idf component in stadard way by simple
cloning it to components directory of any project.

In the current version this repository contains example application that use micro-ros-espidf-component.
It can't be used in other applications by simply cloning it.
Currently this repository could be named as micro_ros_espidf_component_example.

I've made an example with new directory structure
https://github.com/dsryzhov/micro_ros_espidf_component/blob/feature/clear-idf-component/README.md

In new structure component files are on the root directory of repository.
Example application files are in the example\int32_publisher directory.

I already use my repository with a new directory structure to add Micro-ROS component to different projects.

"modules" folder

Hello @pablogs9, thank you for sharing the develop for ESP32 modules.

I have followed the micro-ROS tutorials and now I am trying to implement this component, but I have a key question, please, could you tell me where or what is the "modules" folder that you call in the Usage section.

Thanks in advance.

Kinds regards,
Jorge

How to do microROS secondary development with vscode+ESPIDF?

I clone the micro_ros_espidF_component-humble on Linux and run a compile-burn test and it works. It's a good start, but I need to add microROS to my project, So I created a new project and set it in cmake (EXTRA_COMPONENT_DIRS "micro_ros_espidF_Component-humble ") but the compilation didn't pass How can I get all the source code for microROS and use microROS as a component?

Can't build addtwoints_server

Can't build addtwoints_server

The component can't find the "example_interfaces/srv/add_two_ints.h" file, I also tried changing the "" with <> and nothing changes.

  • Hardware description: ESP32 on an ESP32_DevKitC_V4 board
  • RTOS: FreeRTOS
  • Installation type: fully working esp-idf environement with int32_pub_sub and int32_publisher working, full ROS2 Desktop Humble env
  • Version or commit hash: microROS with ROS2 Humble

Steps to reproduce the issue

Steps from the Example on the REAMDE.MD, except with addtwoints_server

Expected behavior

idf.py should build properly

Actual behavior

Error : /home/samy/work/micro_ros_espidf_component/examples/addtwoints_server/main/main.c:17:10: fatal error: example_interfaces/srv/add_two_ints.h: No such file or directory
#include "example_interfaces/srv/add_two_ints.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Additional information

Full console output :
samy@ros-workstation:~/work/micro_ros_espidf_component/examples/addtwoints_server$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /home/samy/work/micro_ros_espidf_component/examples/addtwoints_server/build
Executing "ninja all"...
[0/2] Re-checking globbed directories...
[1/10] Performing build step for 'bootloader'
[1/1] cd /home/samy/work/micro_ros_espidf_component/examples/addtwoints_server/build/bootloader/esp-idf/esptool_py && /home/samy/.espressif/python_env/idf4.4_py3.10_env/bin/python /home/samy/esp/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /home/samy/work/micro_ros_espidf_component/examples/addtwoints_server/build/bootloader/bootloader.bin
Bootloader binary size 0x62c0 bytes. 0xd40 bytes (12%) free.
[2/8] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj
/home/samy/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -I/home/samy/work/micro_ros_espidf_component/examples/addtwoints_server/build/config -I/home/samy/esp/esp-idf/components/newlib/platform_include -I/home/samy/esp/esp-idf/components/freertos/include -I/home/samy/esp/esp-idf/components/freertos/include/esp_additions/freertos -I/home/samy/esp/esp-idf/components/freertos/port/xtensa/include -I/home/samy/esp/esp-idf/components/freertos/include/esp_additions -I/home/samy/esp/esp-idf/components/esp_hw_support/include -I/home/samy/esp/esp-idf/components/esp_hw_support/include/soc -I/home/samy/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/samy/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/home/samy/esp/esp-idf/components/esp_hw_support/port/esp32/private_include -I/home/samy/esp/esp-idf/components/heap/include -I/home/samy/esp/esp-idf/components/log/include -I/home/samy/esp/esp-idf/components/lwip/include/apps -I/home/samy/esp/esp-idf/components/lwip/include/apps/sntp -I/home/samy/esp/esp-idf/components/lwip/lwip/src/include -I/home/samy/esp/esp-idf/components/lwip/port/esp32/include -I/home/samy/esp/esp-idf/components/lwip/port/esp32/include/arch -I/home/samy/esp/esp-idf/components/soc/include -I/home/samy/esp/esp-idf/components/soc/esp32/. -I/home/samy/esp/esp-idf/components/soc/esp32/include -I/home/samy/esp/esp-idf/components/hal/esp32/include -I/home/samy/esp/esp-idf/components/hal/include -I/home/samy/esp/esp-idf/components/hal/platform_port/include -I/home/samy/esp/esp-idf/components/esp_rom/include -I/home/samy/esp/esp-idf/components/esp_rom/include/esp32 -I/home/samy/esp/esp-idf/components/esp_rom/esp32 -I/home/samy/esp/esp-idf/components/esp_common/include -I/home/samy/esp/esp-idf/components/esp_system/include -I/home/samy/esp/esp-idf/components/esp_system/port/soc -I/home/samy/esp/esp-idf/components/esp_system/port/public_compat -I/home/samy/esp/esp-idf/components/esp32/include -I/home/samy/esp/esp-idf/components/xtensa/include -I/home/samy/esp/esp-idf/components/xtensa/esp32/include -I/home/samy/esp/esp-idf/components/driver/include -I/home/samy/esp/esp-idf/components/driver/esp32/include -I/home/samy/esp/esp-idf/components/esp_pm/include -I/home/samy/esp/esp-idf/components/esp_ringbuf/include -I/home/samy/esp/esp-idf/components/efuse/include -I/home/samy/esp/esp-idf/components/efuse/esp32/include -I/home/samy/esp/esp-idf/components/vfs/include -I/home/samy/esp/esp-idf/components/esp_wifi/include -I/home/samy/esp/esp-idf/components/esp_event/include -I/home/samy/esp/esp-idf/components/esp_netif/include -I/home/samy/esp/esp-idf/components/esp_eth/include -I/home/samy/esp/esp-idf/components/tcpip_adapter/include -I/home/samy/esp/esp-idf/components/esp_phy/include -I/home/samy/esp/esp-idf/components/esp_phy/esp32/include -I/home/samy/esp/esp-idf/components/esp_ipc/include -I/home/samy/esp/esp-idf/components/app_trace/include -I/home/samy/esp/esp-idf/components/esp_timer/include -I/home/samy/esp/esp-idf/components/mbedtls/port/include -I/home/samy/esp/esp-idf/components/mbedtls/mbedtls/include -I/home/samy/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/home/samy/esp/esp-idf/components/app_update/include -I/home/samy/esp/esp-idf/components/spi_flash/include -I/home/samy/esp/esp-idf/components/bootloader_support/include -I/home/samy/esp/esp-idf/components/nvs_flash/include -I/home/samy/esp/esp-idf/components/pthread/include -I/home/samy/esp/esp-idf/components/esp_gdbstub/include -I/home/samy/esp/esp-idf/components/esp_gdbstub/xtensa -I/home/samy/esp/esp-idf/components/esp_gdbstub/esp32 -I/home/samy/esp/esp-idf/components/espcoredump/include -I/home/samy/esp/esp-idf/components/espcoredump/include/port/xtensa -I/home/samy/esp/esp-idf/components/wpa_supplicant/include -I/home/samy/esp/esp-idf/components/wpa_supplicant/port/include -I/home/samy/esp/esp-idf/components/wpa_supplicant/esp_supplicant/include -I/home/samy/esp/esp-idf/components/ieee802154/include -I/home/samy/esp/esp-idf/components/console -I/home/samy/esp/esp-idf/components/asio/asio/asio/include -I/home/samy/esp/esp-idf/components/asio/port/include -I/home/samy/esp/esp-idf/components/cbor/port/include -I/home/samy/esp/esp-idf/components/unity/include -I/home/samy/esp/esp-idf/components/unity/unity/src -I/home/samy/esp/esp-idf/components/cmock/CMock/src -I/home/samy/esp/esp-idf/components/coap/port/include -I/home/samy/esp/esp-idf/components/coap/libcoap/include -I/home/samy/esp/esp-idf/components/nghttp/port/include -I/home/samy/esp/esp-idf/components/nghttp/nghttp2/lib/includes -I/home/samy/esp/esp-idf/components/esp-tls -I/home/samy/esp/esp-idf/components/esp-tls/esp-tls-crypto -I/home/samy/esp/esp-idf/components/esp_adc_cal/include -I/home/samy/esp/esp-idf/components/esp_hid/include -I/home/samy/esp/esp-idf/components/tcp_transport/include -I/home/samy/esp/esp-idf/components/esp_http_client/include -I/home/samy/esp/esp-idf/components/esp_http_server/include -I/home/samy/esp/esp-idf/components/esp_https_ota/include -I/home/samy/esp/esp-idf/components/esp_lcd/include -I/home/samy/esp/esp-idf/components/esp_lcd/interface -I/home/samy/esp/esp-idf/components/protobuf-c/protobuf-c -I/home/samy/esp/esp-idf/components/protocomm/include/common -I/home/samy/esp/esp-idf/components/protocomm/include/security -I/home/samy/esp/esp-idf/components/protocomm/include/transports -I/home/samy/esp/esp-idf/components/mdns/include -I/home/samy/esp/esp-idf/components/esp_local_ctrl/include -I/home/samy/esp/esp-idf/components/sdmmc/include -I/home/samy/esp/esp-idf/components/esp_serial_slave_link/include -I/home/samy/esp/esp-idf/components/esp_websocket_client/include -I/home/samy/esp/esp-idf/components/expat/expat/expat/lib -I/home/samy/esp/esp-idf/components/expat/port/include -I/home/samy/esp/esp-idf/components/wear_levelling/include -I/home/samy/esp/esp-idf/components/fatfs/diskio -I/home/samy/esp/esp-idf/components/fatfs/vfs -I/home/samy/esp/esp-idf/components/fatfs/src -I/home/samy/esp/esp-idf/components/freemodbus/common/include -I/home/samy/esp/esp-idf/components/idf_test/include -I/home/samy/esp/esp-idf/components/idf_test/include/esp32 -I/home/samy/esp/esp-idf/components/jsmn/include -I/home/samy/esp/esp-idf/components/json/cJSON -I/home/samy/esp/esp-idf/components/libsodium/libsodium/src/libsodium/include -I/home/samy/esp/esp-idf/components/libsodium/port_include -I/home/samy/esp/esp-idf/components/mqtt/esp-mqtt/include -I/home/samy/esp/esp-idf/components/openssl/include -I/home/samy/esp/esp-idf/components/perfmon/include -I/home/samy/esp/esp-idf/components/spiffs/include -I/home/samy/esp/esp-idf/components/ulp/include -I/home/samy/esp/esp-idf/components/wifi_provisioning/include -I/home/samy/work/micro_ros_espidf_component/network_interfaces -isystem /home/samy/work/micro_ros_espidf_component/include -isystem /home/samy/work/micro_ros_espidf_component/include/action_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/actionlib_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/builtin_interfaces -isystem /home/samy/work/micro_ros_espidf_component/include/composition_interfaces -isystem /home/samy/work/micro_ros_espidf_component/include/diagnostic_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/geometry_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/include -isystem /home/samy/work/micro_ros_espidf_component/include/lifecycle_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/micro_ros_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/micro_ros_utilities -isystem /home/samy/work/micro_ros_espidf_component/include/nav_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/rcl -isystem /home/samy/work/micro_ros_espidf_component/include/rcl_action -isystem /home/samy/work/micro_ros_espidf_component/include/rcl_interfaces -isystem /home/samy/work/micro_ros_espidf_component/include/rcl_lifecycle -isystem /home/samy/work/micro_ros_espidf_component/include/rcl_logging_interface -isystem /home/samy/work/micro_ros_espidf_component/include/rclc -isystem /home/samy/work/micro_ros_espidf_component/include/rclc_lifecycle -isystem /home/samy/work/micro_ros_espidf_component/include/rclc_parameter -isystem /home/samy/work/micro_ros_espidf_component/include/rcutils -isystem /home/samy/work/micro_ros_espidf_component/include/rmw -isystem /home/samy/work/micro_ros_espidf_component/include/rmw_microros -isystem /home/samy/work/micro_ros_espidf_component/include/rmw_microxrcedds_c -isystem /home/samy/work/micro_ros_espidf_component/include/rosgraph_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/rosidl_runtime_c -isystem /home/samy/work/micro_ros_espidf_component/include/rosidl_typesupport_c -isystem /home/samy/work/micro_ros_espidf_component/include/rosidl_typesupport_interface -isystem /home/samy/work/micro_ros_espidf_component/include/rosidl_typesupport_introspection_c -isystem /home/samy/work/micro_ros_espidf_component/include/rosidl_typesupport_microxrcedds_c -isystem /home/samy/work/micro_ros_espidf_component/include/sensor_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/shape_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/statistics_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/std_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/std_srvs -isystem /home/samy/work/micro_ros_espidf_component/include/stereo_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/test_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/tracetools -isystem /home/samy/work/micro_ros_espidf_component/include/trajectory_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/ucdr -isystem /home/samy/work/micro_ros_espidf_component/include/unique_identifier_msgs -isystem /home/samy/work/micro_ros_espidf_component/include/uxr -isystem /home/samy/work/micro_ros_espidf_component/include/visualization_msgs -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fmacro-prefix-map=/home/samy/work/micro_ros_espidf_component/examples/addtwoints_server=. -fmacro-prefix-map=/home/samy/esp/esp-idf=IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER="v4.4.1" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -c /home/samy/work/micro_ros_espidf_component/examples/addtwoints_server/main/main.c
/home/samy/work/micro_ros_espidf_component/examples/addtwoints_server/main/main.c:17:10: fatal error: example_interfaces/srv/add_two_ints.h: No such file or directory
#include "example_interfaces/srv/add_two_ints.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

I have the library compiled in the components folder --- Now What?????

Can you provide some instructions on how to use this library.

  1. I created a copy of the IDF hello_world project
  2. I created a folder "components" in this project
  3. I cloned your repo into the components folder
  4. I ran idf.py menuconfig (and configured my wifi settings)
  5. I ran idf.py build
  6. I ran idf.py flash monitor (I see the IDF code printing Hello World to the terminal)
  7. I ran the docker agent ***** I don't see any communication *****

I don't understand how your repo is supposed to be used.

Can you provide a fuller example of creating a new esp-idf project, adding this repository, setting up a subscriber and blinking an LED when a ping is received. This would tie everything together.

./main/main.c:11:10: fatal error: rcl/rcl.h: No such file or directory

I have followed your instructions, but I am obviously doing something wrong. Can you help?

  1. I cloned this repo into /esp/esp-idf/components
  2. I copied /esp/esp-idf/components/micro_ros_espidf_component/examples/int32_publisher to /esp/int32_publisher
  3. cd /esp
  4. . $IDF_PATH/export.sh
  5. cd /esp/int32_publisher
  6. idf.py menuconfig (setup wifi network)
  7. idf.py build

I get the following error

../main/main.c:11:10: fatal error: rcl/rcl.h: No such file or directory
 #include <rcl/rcl.h>
          ^~~~~~~~~~~

Log to micro-ros-agent.

Hi, thanks for this great library!

I had a quick question regarding logging. Is it possible to log info messages directly to the micro-ros-agent console? I would like to use that to check correct program flow. I've been browsing through the examples and found the
#define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format, ##__VA_ARGS__)
macro. However this does not let me log on the micro-ros-agent. Is there any example that can show how to log?

To be clear, I would like to log custom output here:
Screenshot from 2021-05-18 15-18-51

Thanks a lot!

Micro XRCE-DDS session error using esp32 wifi transport.

Hi, just started working with micro ros today. This issue could likely be me missing something silly, but I have run out of things to check.

  • Hardware description: MakerHawk ESP32 dev board
  • RTOS: FreeRTOS
  • Installation type: micro_ros_setup, ubuntu 20.04.2, vmware virtual machine
  • Version: foxy

Steps to reproduce the issue

Following code from https://micro.ros.org//blog/2020/08/27/esp32/ and the setup tutorials: https://micro.ros.org//docs/tutorials/core/first_application_linux/.

Expected behavior

Following steps in example commands: Client should connect with agent and messages should be published to the ROS2 topic.

Actual behavior

  • Flash esp32
  • Start agent
$ ros2 run micro_ros_agent micro_ros_agent udp4 -p 8888
[1616886503.942609] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888
[1616886503.942856] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
[1616886542.788064] info     | Root.cpp           | create_client            | create                 | client_key: 0x43F8851C, session_id: 0x81
  • Reboot esp32
  • Agent receives connection and session is established

esp32 serial (through putty)

micro-ROS transport: connected using UDP mode, ip: '192.168.1.71', port: '8888'

Agent terminal:

[1616886542.788128] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x1140360476, address: 192.168.1.73:51198
  • Error thrown on esp32 and it shuts down.
[ERROR] [0000000011.566660000] [rclc]: [rclc_publisher_init_default] Error in rcl_publisher_init: Issues running micro XRCE-DDS session, at /home/[username]/microros_ws/firmware/mcu_ws/uros/rmw_microxrcedds/rmw_microxrcedds_c/src/utils.c:42, at /home/[username]/microros_ws/firmware/mcu_ws/uros/rcl/rcl/src/rcl/publisher.c:188

Failed status on line 48: 1. Aborting.

For reference, line 43-48 on app.c are:

// create publisher
	RCCHECK(rclc_publisher_init_default(
		&publisher,
		&node,
		ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Int32),
		"freertos_int32_publisher"));

The error on the esp32 appears to be coming from the RCCHECK, and implies that the message type is not supported, or the publisher is not able to be created for some other reason.

Lines 36 - 44 of utils.c

// This only handles one request at time
        uint8_t status;
        if (!uxr_run_session_until_all_status(&context->session,
                RMW_UXRCE_ENTITY_CREATION_DESTROY_TIMEOUT,
                &requests, &status, 1))
        {
            RMW_SET_ERROR_MSG("Issues running micro XRCE-DDS session");
            return false;
        }

Lines 187 - 188 of publisher.c

RCL_CHECK_FOR_NULL_WITH_MSG(
    publisher->impl->rmw_handle, rmw_get_error_string().str, goto fail);

Additional information

I have tested serial transport which works fine; the topic is published as expected.
I have also tested as the ping_pong demo app, which works as expected using the serial transport, but not over wifi.

This leads me to believe the error is with micro XRCE-DDS over wifi, however investigating the stack traces didn't give me any more clues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.