micro-ROS / micro-ROS/micro_ros_setup

Error building micro-ROS component on Raspberry Pi 4 with ESP32

Đang mở
#622 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Shell
Star
509
Fork
183
Merge trung bình
22 giờ 26 phút
Pull request đã merge (30 ngày)
7

Mô tả

## Issue template

- Hardware description:
- Raspberry Pi 4
- esp32 WROOM

- RTOS: freertos on esp32
- Installation type: tried `micro_ros_setup` but got error (mentioned below). Tried installing ESP-IDF directly and then using [micro-ROS component for ESP-IDF](https://github.com/micro-ROS/micro_ros_espidf_component). (More errors mentioned below)
- Version or commit hash:
- installed ROS 2 `humble` on Rapsberry Pi
- ESP-IDF (v5.0)

## Description

I first tried installing `micro_ros_setup`. The [build process](https://github.com/micro-ROS/micro_ros_setup/blob/humble/README.md#building
) was okay but when [creating micro-ROS firmware](https://github.com/micro-ROS/micro_ros_setup/blob/humble/README.md#creating-micro-ros-firmware) by running the following command,
```
ros2 run micro_ros_setup create_firmware_ws.sh freertos esp32
```
I get the following error
```
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
ERROR: tool xtensa-esp32-elf does not have versions compatible with platform linux-arm64
[ros2run]: Process exited with failure 1
```
It seems like `micro_ros_setup` is not compatible with raspberry pi 4.

So instead, I installed the ESP-IDF following this [link](https://docs.espressif.com/projects/esp-idf/en/release-v5.0/esp32/get-started/linux-macos-setup.html). I was able to flash the `hello_world` example. The version I installed was v5.0 since it states that `micro-ROS component has been tested in ESP-IDF v4.3, v4.4, and v5.0 with ESP32` shown [here](https://github.com/micro-ROS/micro_ros_espidf_component).
```
ubuntu@ubuntu:~$ idf.py --version
ESP-IDF v5.0.1-397-g3050ea656f
```
I wanted to ask
1. Can `micro_ros_setup` work for raspberry pi 4? Or is it not compatible for linux-arm64?
2. I think the `Example` section can be elaborated. In the example shown [here](https://github.com/micro-ROS/micro_ros_espidf_component/#example), why isn't `components` directory created under the `int32_publisher` directory? Under the `Usage` [section](https://github.com/micro-ROS/micro_ros_espidf_component/#usage), it states to clone the repo directly in the components folder. Please correct me if I'm wrong.

I copied the `int32_publisher` example from the `micro_ros_espidf_component`([link](https://github.com/micro-ROS/micro_ros_espidf_component)) into the home directory, created a components directory instead `int32_publisher` directory and then git cloned `micro_ros_espidf_component` inside it.
```
ubuntu@ubuntu:~/int32_publisher/components$ ls
micro_ros_espidf_component
```
Running `idf.py build` command inside the `int32_publisher` directory, generates the error below
```
MakeFiles/__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:10:10: fatal error: uros_network_interfaces.h: No such file or directory
10 | #include
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[844/851] Building C object esp-idf/wifi_provisioning/CMakeFiles/__idf_wifi_provisioning.dir/src/scheme_softap.c.objninja: build stopped: subcommand failed.
HINT: Please make sure that the header name is correct. Also please check if you've specified all component dependencies with 'idf_component_register(REQUIRES ...)'. If the component is not present then it should be added by the IDF Component Manager. For more information run 'idf.py docs -sp api-guides/build-system.html'.
Also, please check if the header file has been removed, renamed or relocated - refer to the migration guide for more information.
ninja failed with exit code 1, output of the command is in the /home/ubuntu/int32_publisher/build/log/idf_py_stderr_output_651110 and /home/ubuntu/int32_publisher/build/log/idf_py_stdout_output_651110
```
I googled this error but didn't get anything helpful.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với các bước tạo firmware trong README của micro_ros_setup và lệnh create_firmware_ws.sh trên linux-arm64. Sau đó, kiểm tra ví dụ micro_ros_espidf_component, bố cục các component của nó, main/main.c và các build log được báo cáo về việc thiếu uros_network_interfaces.h. Hoàn tất khi khả năng tương thích với Raspberry Pi và bố cục của ví dụ đã được xác minh, đồng thời vấn đề về tài liệu hoặc build đã được xử lý.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
linux, raspberry-pi, shell
Lĩnh vực
build-system, embedded-iot
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.