Skip to content

ROS2 SH can only use ROS1 mix files and types. #180

Description

@russkel

The tests are not testing ROS2 SH correctly.

I have been debugging the following errors for a while trying to figure out why these would pass on CI but not on my computer:

[Integration Service][INFO] [is::sh::ROS2] Created node '/is_ros2_node_1804289383' with Domain ID: 0
[Integration Service][ERROR] [is::sh::ROS2] Could not find .mix file for message type: 'std_msgs/String'.
 -- Make sure that you have generated the 'is-ros2' extension for that message type by calling 'is_ros2_rosidl_mix(PACKAGES <package> MIDDLEWARES ros2)' in your build system!
[Integration Service][ERROR] [is::core::InstanceHandle] Failed to load middlewares!

When generating the mix lib for std_msgs as ROS2 the cmake files will put the mix file in:

./install/is-ros2-mix-generator/lib/is/ros2/msg/std_msgs/msg/Int16.mix
./install/is-ros2-mix-generator/lib/is/ros2/msg/std_msgs/msg/Int64.mix
./install/is-ros2-mix-generator/lib/is/ros2/msg/std_msgs/msg/Int32.mix
./install/is-ros2-mix-generator/lib/is/ros2/msg/std_msgs/msg/Byte.mix

However, in utils/ros2-mix-generator/resources/convert__msg.hpp.em the msg_type_string is set to std_msgs/Int16, so it will never be discovered if using ROS2 only:

[Integration Service][INFO] [is::sh::ROS2] Created node '/is_ros2_node_1804289383' with Domain ID: 0
[Integration Service][ERROR] [is::sh::ROS2::Factory] 'create_type' could not find a factory type named 'std_msgs/msg/String' to create!
[Integration Service][ERROR] [is::sh::ROS2] Failed to register the required DynamicType 'std_msgs/msg/String'
[Integration Service][ERROR] [is::core::InstanceHandle] Failed to load middlewares!

The only reason this is passing in tests is the ROS1 interfaces are installed and it's using those DynamicTypes!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions