micro-ROS / micro-ROS/micro_ros_setup

can't use the precompiled libraries with teensy 4.1

Offen
#707 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Shell
Sterne
509
Forks
183
Ø Merge
22 Std. 26 Min.
Gemergte PRs (30 T.)
7

Beschreibung

## 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem teensy_with_arduino-Tutorial und dem micro-ros_publisher.ino-Beispiel. Untersuche anschließend micro_ros_arduino.h und die für Teensy 4.1 ausgewählte vorkompilierte Bibliothek. Vergleiche diese Konfiguration mit der Linker-Ausgabe und ermittle, was verhindert, dass die referenzierten Symbole gelinkt werden. Als erledigt gilt die Aufgabe, wenn das Beispiel kompiliert und auf einen Teensy 4.1 hochgeladen werden kann, ohne undefined-reference-Fehler.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
arduino, linux
Bereich
embedded-iot
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.