micro-ROS / micro-ROS/micro_ros_setup

Not able to build the firmware for transport type UDP (although it is working for serial).

Ouverte
#809 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Shell
Étoiles
509
Forks
183
Merge moyen
22 h 26 min
PR mergées (30 j)
7

Description

- 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!!

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Reproduisez le build du firmware UDP dans firmware/freertos_apps/microros_esp32_extensions à l’aide de la configuration ESP-IDF située dans firmware/toolchain/esp-idf. Commencez par les chemins d’inclusion de lwip et le contexte de CMakeLists.txt signalés par le build, puis inspectez les sources UDP de Micro-XRCE-DDS-Client qui incluent lwip/opt.h. La tâche est terminée lorsque le build du firmware UDP se termine sans l’erreur indiquant l’absence de lwipopts.h.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
cmake, docker, shell
Domaine
build-system, embedded-iot
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
À clarifier
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.