Closed altineller closed 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.
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:
~~~~~~~ src/microros.c:13:45: note: in definition of macro 'CHECK_AND_CONTINUE' 13~~~~~~~~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~~~~~~~~~~~~ src/microros.c:57:76: note: in expansion of macro 'ROSIDL_GET_MSG_TYPE_SUPPORT' 57~~~~~~ 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] 78src/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 functioninit_microros_entites': /home/can/workspaces/micro_ros_tivac_launchpad_app/src/microros.c:57: undefined reference to
rosidl_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