micro-ROS / micro-ROS/micro_ros_setup

can't use the precompiled libraries with teensy 4.1

オープン
#707 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Shell
スター
509
フォーク
183
平均マージ
22時間 26分
マージ済み PR(30日)
7

説明

## Issue template

- Hardware and Software description: Ubuntu 20.04
Ros2 Foxy (and on another setup with Humble as well)
`rduino IDE 1.8.15
Teensyduino 1.54

- Installation type: after installing Arduino IDE, and Teensyduino, I downloaded the teensy rules, and I patched the Platform.txt and edited those two lines as instructed:
`version=1.8.15`
`ARDUINO_PATH=[~/Downloads/arduino-1.8.15]`

#### Steps to reproduce the issue

I was following the instructions in this link:
https://micro.ros.org/docs/tutorials/core/teensy_with_arduino/
but with one difference, Teensy 4.1 insead of Teensy 3.2

#### Expected behavior
code uploaded to teensy
#### Actual behavior
I receive the following error while compiling the code:

`WARNING: library micro_ros_arduino claims to run on stm32, OpenCR, Teensyduino, samd, sam, mbed, esp32, mbed_portenta architecture(s) and may be incompatible with your current board which runs on avr architecture(s).
Library micro_ros_arduino has been declared precompiled:
Using precompiled library in /home/ali/Arduino/libraries/micro_ros_arduino/src/imxrt1062/fpv5-d16-hard
The platform does not support 'compiler.libraries.ldflags' for precompiled libraries.
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /tmp/arduino_build_172864/sketch/micro-ros_publisher.ino.cpp.o: in function timer_callback(rcl_timer_s*, long long)':
/home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:36: undefined reference to `rcl_publish'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /tmp/arduino_build_172864/sketch/micro-ros_publisher.ino.cpp.o: in function `setup':
/home/ali/Arduino/libraries/micro_ros_arduino/src/micro_ros_arduino.h:33: undefined reference to `rmw_uros_set_custom_transport'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /tmp/arduino_build_172864/sketch/micro-ros_publisher.ino.cpp.o: in function `setup':
/home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:49: undefined reference to `rcutils_get_default_allocator'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:52: undefined reference to `rclc_support_init'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:55: undefined reference to `rclc_node_init_default'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:58: undefined reference to `rosidl_typesupport_c__get_message_type_support_handle__std_msgs__msg__Int32'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:58: undefined reference to `rclc_publisher_init_default'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:66: undefined reference to `rclc_timer_init_default'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:73: undefined reference to `rclc_executor_init'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:74: undefined reference to `rclc_executor_add_timer'
/home/ali/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /tmp/arduino_build_172864/sketch/micro-ros_publisher.ino.cpp.o: in function `loop':
/home/ali/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher/micro-ros_publisher.ino:81: undefined reference to `rclc_executor_spin_some'
collect2: error: ld returned 1 exit status
Error compiling for board Teensy 4.1.`

sorry that the code looks like this, but it has a lot of apostrophes.

#### Additional information
my main goal is as follows:
The teensy reads several sensors and send the data to a Jetson orin that will publich them to ros2.
if there's a way to send the info as serial and create a node that will read it and then publish to ros2, or to publish ros2 directly from the teensy, please advise me on how to solve this.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

teensy_with_arduino チュートリアルと micro-ros_publisher.ino の例から始め、次に micro_ros_arduino.h と Teensy 4.1 用に選択されたプリコンパイル済みライブラリを調べます。その構成をリンカーの出力と比較し、参照されているシンボルのリンクを妨げているものを特定します。例が undefined-reference エラーなしでコンパイルされ、Teensy 4.1 にアップロードできれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
arduino, linux
領域
embedded-iot
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。