micro-ROS / micro_ros_tivac_launchpad_app

micro-ROS app for TI Tiva C Series TM4C123GXL LaunchPad
Apache License 2.0
4 stars 4 forks source link

Typesupport not found #16

Closed altineller closed 1 year ago

altineller commented 1 year ago

Hello,

I have modified the microros_app to publish messages of imu. But however I am getting error at compile time about type support

Do we have to tell the make file which types of messages we will pass at some point?

Best Regards, Can

The exact output is:

arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/microros.o src/microros.c In file included from microros/install/include/rclc/action_client.h:26, from microros/install/include/rclc/rclc.h:35, from src/microros.c:7: microros/install/include/rclc/action_goal_handle.h:35:4: warning: ISO C99 doesn't support unnamed structs/unions [-Wpedantic] 35 }; ^ microros/install/include/rclc/action_goal_handle.h:53:4: warning: ISO C99 doesn't support unnamed structs/unions [-Wpedantic] 53 }; ^ microros/install/include/rclc/action_goal_handle.h:58:4: warning: ISO C99 doesn't support unnamed structs/unions [-Wpedantic] 58 }; ^ microros/install/include/rclc/action_goal_handle.h:63:4: warning: ISO C99 doesn't support unnamed structs/unions [-Wpedantic] 63 }; ^ In file included from microros/install/include/rclc/executor.h:30, from src/microros.c:8: microros/install/include/rclc/executor_handle.h:120:4: warning: ISO C99 doesn't support unnamed structs/unions [-Wpedantic] 120 }; ^ microros/install/include/rclc/executor_handle.h:154:4: warning: ISO C99 doesn't support unnamed structs/unions [-Wpedantic] 154 }; ^ src/microros.c: In function 'init_microros_entites': microros/install/include/rosidl_runtime_c/message_type_support_struct.h:78:5: warning: implicit declaration of function 'rosidl_typesupport_cget_message_type_support_handlesensor_msgsmsgimu'; did you mean 'rosidl_typesupport_cget_message_type_support_handlesensor_msgsmsgImu'? [-Wimplicit-function-declaration] 78 rosidl_typesupport_c, PkgName, MsgSubfolder, MsgName)() ^~~~~~~~ src/microros.c:13:45: note: in definition of macro 'CHECK_AND_CONTINUE' 13 #define CHECK_AND_CONTINUE(X) if (!ret !(X)){ret = false;} ^ microros/install/include/rosidl_typesupport_interface/macros.h:32:3: note: in expansion of macro 'ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME' 32 ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ ^~~~~~~~~ microros/install/include/rosidl_runtime_c/message_type_support_struct.h:77:3: note: in expansion of macro 'ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME' 77 ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( \ ^~~~~~~~~~~~~ src/microros.c:57:76: note: in expansion of macro 'ROSIDL_GET_MSG_TYPE_SUPPORT' 57 CHECK_AND_CONTINUE(RCL_RET_OK == rclc_publisher_init_default(&pub, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, imu), "imu/data")); ^~~~~~~ microros/install/include/rosidl_runtime_c/message_type_support_struct.h:78:5: warning: passing argument 3 of 'rclc_publisher_init_default' makes pointer from integer without a cast [-Wint-conversion] 78 rosidl_typesupport_c, PkgName, MsgSubfolder, MsgName)() ^
int

src/microros.c:13:45: note: in definition of macro 'CHECK_AND_CONTINUE' 13 | #define CHECK_AND_CONTINUE(X) if (!ret || !(X)){ret = false;} | ^ microros/install/include/rosidl_typesupport_interface/macros.h:32:3: note: in expansion of macro 'ROSIDL_TYPESUPPORT_INTERFACESYMBOL_NAME' 32 | ROSIDL_TYPESUPPORT_INTERFACESYMBOL_NAME( \ | ^~~~~~~~~ microros/install/include/rosidl_runtime_c/message_type_support_struct.h:77:3: note: in expansion of macro 'ROSIDL_TYPESUPPORT_INTERFACEMESSAGE_SYMBOL_NAME' 77 | ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( \ | ^~~~~~~~~~~~~ src/microros.c:57:76: note: in expansion of macro 'ROSIDL_GET_MSG_TYPE_SUPPORT' 57 | CHECK_AND_CONTINUE(RCL_RET_OK == rclc_publisher_init_default(&pub, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, imu), "imu/data")); | ^~~~~~~ In file included from microros/install/include/rclc/rclc.h:30, from src/microros.c:7: microros/install/include/rclc/publisher.h:54:41: note: expected 'const rosidl_message_type_support_t ' but argument is of type 'int' 54 | const rosidl_message_type_support_t type_support, | ~~~~~~~~^~~~~~ arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/syscalls.o src/syscalls.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/microros_usbcdc_transport.o src/microros_usbcdc_transport.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/microros_time.o src/microros_time.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/microros_allocators.o src/microros_allocators.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/startup_gcc.o src/startup_gcc.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/uartstdio.o tivaware_c_series/utils/uartstdio.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/main.o src/main.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/usb_serial_structs.o src/usb_serial_structs.c arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C123GH6PM -c -g -D DEBUG -O0 -DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED -Itivaware_c_series/examples/boards/ek-tm4c123gxl/ -Itivaware_c_series -Imicroros/install/include -Isrc -Dgcc -o gcc/ustdlib.o tivaware_c_series/utils/ustdlib.c arm-none-eabi-gcc -o gcc/microros_tivac.elf -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -Wl,--gc-sections -Wl,--print-memory-usage -T "microros_tivac.ld" --specs=nano.specs gcc/microros.o gcc/syscalls.o gcc/microros_usbcdc_transport.o gcc/microros_time.o gcc/microros_allocators.o gcc/startup_gcc.o gcc/uartstdio.o gcc/main.o gcc/usb_serial_structs.o gcc/ustdlib.o tivaware_c_series/usblib/gcc/libusb.a tivaware_c_series/driverlib/gcc/libdriver.a microros/install/libmicroros.a /usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: gcc/microros.o: in function init_microros_entites': /home/can/workspaces/micro_ros_tivac_launchpad_app/src/microros.c:57: undefined reference torosidl_typesupport_cget_message_type_support_handle__sensor_msgsmsgimu' Memory region Used Size Region Size %age Used FLASH: 76176 B 256 KB 29.06% SRAM: 11180 B 32 KB 34.12% collect2: error: ld returned 1 exit status make: *** [Makefile:56: gcc/microros_tivac.elf] Error 1

altineller commented 1 year ago

Was my error, defining CHECK_AND_CONTINUE(RCL_RET_OK == rclc_publisher_init_default(&pub, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, Imu), "imu/data")); with a lowercase imu.

Device now transmits imu messages.