micro-ROS / micro-ROS/micro_ros_setup

can't use the precompiled libraries with teensy 4.1

未关闭
#707 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Shell
星标
509
派生
183
平均合并
22 小时 26 分钟
30 天内合并 PR
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 选择的预编译库。将该配置与链接器输出进行比较,并确定是什么阻止了被引用符号的链接。完成标准是示例能够编译并上传到 Teensy 4.1,且没有 undefined-reference 错误。

由索引模型根据 Issue 内容生成。

评估

技术栈
arduino, linux
领域
embedded-iot
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。