micro-ROS / micro-ROS-Agent

ROS 2 package using Micro XRCE-DDS Agent.
Apache License 2.0
101 stars 58 forks source link

Provide branch for ROS 2 Jazzy and update GIT_TAG for xrceagent #223

Open srmainwaring opened 4 months ago

srmainwaring commented 4 months ago

Issue template

This is a feature request. ROS 2 Rolling and Jazzy depend on Fast-CDR 2.2.x. Version 2.4.3 of Micro-XRCE-DDS-Agent supports this but the GIT_TAG in the SuperBuild.cmake in the rolling branch refers to ros2

Steps to reproduce the issue

Expected behavior

Actual behavior

Additional information

Looks like this will require code changes as well, as micro-ROS-agent will not build against the updated Fast-CDR version. For example:

/Users/rhys/Code/ros2/rolling/ros2-ardupilot/src/micro_ros_agent/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp:57:33: error: no member named 'DDS_CDR' in 'eprosima::fastcdr::Cdr'
        eprosima::fastcdr::Cdr::DDS_CDR);
        ~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/rhys/Code/ros2/rolling/ros2-ardupilot/src/micro_ros_agent/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp:64:54: error: no member named 'getSerializedDataLength' in 'eprosima::fastcdr::Cdr'; did you mean 'get_serialized_data_length'?
        payload->length = static_cast<uint32_t>(scdr.getSerializedDataLength());
                                                     ^~~~~~~~~~~~~~~~~~~~~~~
                                                     get_serialized_data_length
/Users/rhys/Code/ros2/rolling/ros2-rolling/install/fastcdr/include/fastcdr/Cdr.h:266:23: note: 'get_serialized_data_length' declared here
    Cdr_DllAPI size_t get_serialized_data_length() const;
                      ^
/Users/rhys/Code/ros2/rolling/ros2-ardupilot/src/micro_ros_agent/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp:80:33: error: no member named 'DDS_CDR' in 'eprosima::fastcdr::Cdr'
        eprosima::fastcdr::Cdr::DDS_CDR);
        ~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/rhys/Code/ros2/rolling/ros2-ardupilot/src/micro_ros_agent/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp:149:33: error: no member named 'DDS_CDR' in 'eprosima::fastcdr::Cdr'
        eprosima::fastcdr::Cdr::DDS_CDR);
        ~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/rhys/Code/ros2/rolling/ros2-ardupilot/src/micro_ros_agent/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp:156:54: error: no member named 'getSerializedDataLength' in 'eprosima::fastcdr::Cdr'; did you mean 'get_serialized_data_length'?
        payload->length = static_cast<uint32_t>(scdr.getSerializedDataLength());
                                                     ^~~~~~~~~~~~~~~~~~~~~~~
                                                     get_serialized_data_length
/Users/rhys/Code/ros2/rolling/ros2-rolling/install/fastcdr/include/fastcdr/Cdr.h:266:23: note: 'get_serialized_data_length' declared here
    Cdr_DllAPI size_t get_serialized_data_length() const;
                      ^
/Users/rhys/Code/ros2/rolling/ros2-ardupilot/src/micro_ros_agent/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp:172:33: error: no member named 'DDS_CDR' in 'eprosima::fastcdr::Cdr'
        eprosima::fastcdr::Cdr::DDS_CDR);
        ~~~~~~~~~~~~~~~~~~~~~~~~^
6 errors generated.
make[2]: *** [CMakeFiles/micro_ros_agent.dir/src/agent/graph_manager/graph_typesupport.cpp.o] Error 1
make[1]: *** [CMakeFiles/micro_ros_agent.dir/all] Error 2

This branch contains patches to fix the above issue: https://github.com/srmainwaring/micro-ROS-Agent/tree/prs/pr-rolling-fastcdr-2.2.x