ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

micro-ROS: How to enable multithreading with a custom build static library?

asked 2022-07-03 06:42:57 -0600

markushehn gravatar image

updated 2022-07-04 13:46:18 -0600

Hello everyone,

I want to enable the multithreading capability of micro-ROS with FreeRTOS when I use a custom build static library. How can I do that exactly? I extended the colcon.meta file from https://micro.ros.org/docs/tutorials/... as follow:

{
"names": {
    "tracetools": {
        "cmake-args": [
            "-DTRACETOOLS_DISABLED=ON",
            "-DTRACETOOLS_STATUS_CHECKING_TOOL=OFF"
        ]
    },
    "rosidl_typesupport": {
        "cmake-args": [
            "-DROSIDL_TYPESUPPORT_SINGLE_TYPESUPPORT=ON"
        ]
    },
    "rcl": {
        "cmake-args": [
            "-DBUILD_TESTING=OFF",
            "-DRCL_COMMAND_LINE_ENABLED=OFF",
            "-DRCL_LOGGING_ENABLED=OFF"
        ]
    }, 
    "rcutils": {
        "cmake-args": [
            "-DENABLE_TESTING=OFF",
            "-DRCUTILS_NO_FILESYSTEM=ON",
            "-DRCUTILS_NO_THREAD_SUPPORT=ON",
            "-DRCUTILS_NO_64_ATOMIC=ON",
            "-DRCUTILS_AVOID_DYNAMIC_ALLOCATION=ON"
        ]
    },
    "microxrcedds_client": {
        "cmake-args": [
            "-DUCLIENT_PIC=OFF",
            "-DUCLIENT_PROFILE_UDP=OFF",
            "-DUCLIENT_PROFILE_TCP=OFF",
            "-DUCLIENT_PROFILE_DISCOVERY=OFF",
            "-DUCLIENT_PROFILE_SERIAL=OFF",
            "-DUCLIENT_PROFILE_STREAM_FRAMING=ON",
            "-DUCLIENT_PROFILE_CUSTOM_TRANSPORT=ON",
            "-DUCLIENT_PROFILE_MULTITHREAD=ON",
            "-DUCLIENT_PROFILE_SHARED_MEMORY=ON",
            "-DUCLIENT_PLATFORM_FREERTOS_PLUS_TCP=ON"
        ]
    },
    "rmw_microxrcedds": {
        "cmake-args": [
            "-DRMW_UXRCE_MAX_NODES=1",
            "-DRMW_UXRCE_MAX_PUBLISHERS=5",
            "-DRMW_UXRCE_MAX_SUBSCRIPTIONS=5",
            "-DRMW_UXRCE_MAX_SERVICES=1",
            "-DRMW_UXRCE_MAX_CLIENTS=1",
            "-DRMW_UXRCE_MAX_HISTORY=4",
            "-DRMW_UXRCE_TRANSPORT=custom"
        ]
    }
}

Without "-DUCLIENT_PLATFORM_FREERTOS_PLUS_TCP=ON" I get the error: #error XRCE multithreading not supported for this platform. If include the option I get the error: fatal error: FreeRTOS.h: No such file or directoryDo you have any suggestions how the example files "my_custom_toolchain.cmake" and "my_custom_colcon.meta" from https://micro.ros.org/docs/tutorials/... should be extended? Thank you very much for your help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-07-05 01:32:55 -0600

Pablogs gravatar image

Can you open an issue in the Github micro_ros_setup repo?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-07-03 06:42:57 -0600

Seen: 239 times

Last updated: Jul 05 '22