Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
russkel opened this issue Aug 5, 2022 · 0 comments · May be fixed by eProsima/ROS2-SH#36
Open

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

russkel opened this issue Aug 5, 2022 · 0 comments · May be fixed by eProsima/ROS2-SH#36

Comments

@russkel
Copy link
Contributor

russkel commented Aug 5, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant