Robotics StackExchange | Archived questions

How to apply Custom msg in micro_ros_arduino

We are using ROS2-Foxy. We plan to communicate via serial with Custom msg in ROS2. We are developing with ESP32 using Arduino-IDE, so we are using the library 'microrosarduino'. We have applied the ROS2 library to the current src path of microrosarduino. However, it does not work, and the following error continues to occur in Arduino-IDE.

"c:/users/..../appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc840-esp-2021r2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: sketch\micro-rospublisher.ino.cpp.o:(.literal.Z5setupv+0x28): undefined reference to rosidl_typesupport_c__get_message_type_support_handle__tutorial_interfaces__msg__Num' c:/users/..../appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: sketch\micro-ros_publisher.ino.cpp.o: in functionsetup()': C:\Users....\Documents\micro\micro-rospublisher/micro-rospublisher.ino:65: undefined reference to `rosidltypesupportcgetmessagetypesupporthandletutorialinterfacesmsg_Num' collect2.exe: error: ld returned 1 exit status exit status 1"

Do you know how to solve this problem? Or do we need to go through any specific steps in ROS2-Foxy before applying the 'microrosarduino' library?

Asked by devkky on 2023-02-27 00:29:52 UTC

Comments

Answers

I solved this by referring to the 'micro_ros_arduino' materials on the official github. Please use Docker.

Asked by devkky on 2023-02-27 20:31:12 UTC

Comments