micro-ROS / micro-ROS/micro_ros_setup
Not able to build the firmware for transport type UDP (although it is working for serial).
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 509
- フォーク
- 183
- 平均マージ
- 22時間 26分
- マージ済み PR(30日)
- 7
説明
- Hardware description: esp32s3
- RTOS: freertos
- Installation type: micro_ros_setup
- Version or commit hash: jazzy
### Steps to reproduce the issue
#### Create a fresh workspace and build micro-ROS setup for Jazzy
`mkdir uros_ws && cd uros_ws`
`git clone -b jazzy https://github.com/micro-ROS/micro_ros_setup.git src/micro_ros_setup`
> after cloning I changed the version to v5.2 from v4.1
`apt update`
`rosdep update && rosdep install --from-paths src --ignore-src -y`
`apt install python3-pip`
`colcon build`
`source install/local_setup.bash`
#### Create firmware for ESP32
ros2 run micro_ros_setup create_firmware_ws.sh freertos esp32
`./firmware/toolchain/esp-idf/install.sh esp32s3`
`. ./firmware/toolchain/esp-idf/export.sh`
#### Configure firmware for ESP32 using UDP transport
`ros2 run micro_ros_setup configure_firmware.sh int32_publisher --transport udp`
#### Attempt to build the firmware
`ros2 run micro_ros_setup build_firmware.sh menuconfig`
> I set the ssid and password and save the sdkconfig
`idf.py build`
> I ran the above command from inside the `/uros_ws/firmware/freertos_apps/microros_esp32_extentions/` folder
#### Expected behavior
It should successfully build the firmware.
#### Actual behavior
It is throwing error with this error,
```bash
...
[100%] Generating binary image from built executable
esptool.py v4.11.0
Creating esp32s3 image...
Merged 2 ELF sections
Successfully created esp32s3 image.
Generated /uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader/bootloader.bin
make[5]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
[100%] Built target gen_project_binary
make[5]: Entering directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
make[5]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
make[5]: Entering directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
Bootloader binary size 0x5240 bytes. 0x2dc0 bytes (36%) free.
make[5]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
[100%] Built target bootloader_check_size
make[5]: Entering directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
make[5]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
[100%] Built target app
make[4]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
make[3]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader'
[ 3%] No install step for 'bootloader'
cd /uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader && /usr/bin/cmake -E echo_append
[ 3%] Completed 'bootloader'
/usr/bin/cmake -E make_directory /uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/CMakeFiles
/usr/bin/cmake -E touch /uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/CMakeFiles/bootloader-complete
/usr/bin/cmake -E touch /uros_ws/firmware/freertos_apps/microros_esp32_extensions/build/bootloader-prefix/src/bootloader-stamp/bootloader-done
make[2]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build'
[ 3%] Built target bootloader
make[1]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build'
make: *** [Makefile:139: all] Error 2
Missing "lwipopts.h" file name found in the following component(s): lwip(/uros_ws/firmware/toolchain/esp-idf/components/lwip/port/include/lwipopts.h), lwip(/uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/test/unit/lwipopts.h), lwip(/uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/test/fuzz/lwipopts.h), lwip(/uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/test/apps/lwipopts.h). Maybe one of the components needs to add the missing header directory to INCLUDE_DIRS of idf_component_register call in CMakeLists.txt.
make failed with exit code 2
```
#### Additional information
> I am using docker ros:jazzy image.
Running the command, `ros2 run micro_ros_setup build_firmware.sh` is also giving the same error in different format,
```bash
--- stderr: microxrcedds_client
In file included from /uros_ws/firmware/mcu_ws/eProsima/Micro-XRCE-DDS-Client/src/c/util/time.c:3:
/uros_ws/firmware/toolchain/esp-idf/components/newlib/platform_include/time.h:11:2: warning: #include_next is a GCC extension
11 | #include_next
| ^~~~~~~~~~~~
In file included from /uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/src/include/lwip/sockets.h:42,
from /uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/src/include/compat/posix/sys/socket.h:33,
from /uros_ws/firmware/mcu_ws/eProsima/Micro-XRCE-DDS-Client/src/c/profile/transport/ip/udp/udp_transport_posix_nopoll.c:5:
/uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/src/include/lwip/opt.h:51:10: fatal error: lwipopts.h: No such file or directory
51 | #include "lwipopts.h"
| ^~~~~~~~~~~~
compilation terminated.
gmake[6]: *** [CMakeFiles/microxrcedds_client.dir/build.make:415: CMakeFiles/microxrcedds_client.dir/src/c/profile/transport/ip/udp/udp_transport_posix_nopoll.c.obj] Error 1
gmake[6]: *** Waiting for unfinished jobs....
In file included from /uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/src/include/lwip/sockets.h:42,
from /uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/src/include/compat/posix/arpa/inet.h:33,
from /uros_ws/firmware/mcu_ws/eProsima/Micro-XRCE-DDS-Client/src/c/profile/transport/ip/ip_posix.c:18:
/uros_ws/firmware/toolchain/esp-idf/components/lwip/lwip/src/include/lwip/opt.h:51:10: fatal error: lwipopts.h: No such file or directory
51 | #include "lwipopts.h"
| ^~~~~~~~~~~~
compilation terminated.
gmake[6]: *** [CMakeFiles/microxrcedds_client.dir/build.make:429: CMakeFiles/microxrcedds_client.dir/src/c/profile/transport/ip/ip_posix.c.obj] Error 1
gmake[5]: *** [CMakeFiles/Makefile2:86: CMakeFiles/microxrcedds_client.dir/all] Error 2
gmake[4]: *** [Makefile:139: all] Error 2
---
Failed <<< microxrcedds_client [4.55s, exited with code 2]
Aborted <<< rcutils [8.32s]
Aborted <<< rmw_implementation_cmake [2.62s]
Aborted <<< rosidl_adapter [1.83s]
Summary: 4 packages finished [9.75s]
1 package failed: microxrcedds_client
3 packages aborted: rcutils rmw_implementation_cmake rosidl_adapter
2 packages had stderr output: microxrcedds_client rcutils
68 packages not processed
make[3]: *** [libmicroros.mk:33: colcon_compile] Error 2
make[3]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions'
make[2]: *** [esp-idf/main/CMakeFiles/libmicroros.dir/build.make:89: libmicroros-prefix/src/libmicroros-stamp/libmicroros-build] Error 2
make[2]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build'
make[1]: *** [CMakeFiles/Makefile2:4756: esp-idf/main/CMakeFiles/libmicroros.dir/all] Error 2
make[1]: Leaving directory '/uros_ws/firmware/freertos_apps/microros_esp32_extensions/build'
make: *** [Makefile:139: all] Error 2
[ros2run]: Process exited with failure 2
```
Please help, thanks in advance!!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
firmware/toolchain/esp-idf の ESP-IDF セットアップを使用して、firmware/freertos_apps/microros_esp32_extensions の UDP ファームウェアビルドを再現します。まず、ビルドで報告された lwip のインクルードパスと CMakeLists.txt のコンテキストを確認し、その後 lwip/opt.h をインクルードしている Micro-XRCE-DDS-Client の UDP ソースを調査します。UDP ファームウェアビルドが lwipopts.h が見つからないエラーなしで完了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cmake, docker, shell
- 領域
- build-system, embedded-iot
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 42/100