Closed altineller closed 2 years ago
Hello, writing transport for micro-ROS approach have changed slightly, now you need to write the same functions but they will be set as callbacks at run time: check this.
Regarding the flags of the CMake toolchain, the only ones related to micro-ROS are: -D'RCUTILS_LOG_MIN_SEVERITY=RCUTILS_LOG_MIN_SEVERITY_NONE
, -DCLOCK_MONOTONIC=0
and -D'__attribute__(x)='
(if your compiler has issues with GCC attributes).
The others are completely dependant on how are you going to link the micro-ROS library against your app. Finally, I guess that ASM flags are not required here.
Hello,
Setting callbacks at run time like in micro_ros_arduino/src/micro_ros_arduino.h
and micro_ros_arduino/src/default_transports.cpp
?
Could I clone the micro_ros_arduino, and use it as a starting point? Do you think this is a good approach?
Best Regards, C.
Yes, I think that using the Arduino library as a way of generating your static libs and transports is a good entry point.
You have the micro-ROS API for setting the transports here: https://github.com/micro-ROS/micro_ros_arduino/blob/fa5f82db4022483924644977c540418284fa6c66/src/micro_ros_arduino.h#L25
I started by writing the serial_transport_external.c:
As for the cmake file, I think a good starting point is: https://github.com/vmatos/tiva-c-projects/blob/master/examples_tm4c123/blinky_cmake_cpp/tm4c123g.cmake
AND:
https://github.com/micro-ROS/micro_ros_arduino/blob/foxy/extras/library_generation/teensy32_toolchain.cmake
I have some questions: In the cmake file, what are the necessary flags to facilitate microros?
Which parts from the first cmake file I should migrate to the second file.
The first link that contains the cmake file has some extra flags for c, cxx, and asm. I believe asm is not required for this case.
I have deleted flags one by one, that was in the microros teensy32_toolchain.cmake file, and the difference is:
Do we need those flags? -Wall, -pedantic, -MD, -OS and -std=gnu99
Also, I need to include a $TIVA_WARE_PATH and also link to a lib.
Any ideas/recommendations/help greatly appreciated.