[ROS2] UnicodeEncodeError building test_msgs as an overlay on Windows

asked 2020-04-30 05:24:34 -0500

Hey Forum,

I'm working on the ros2_dotnet project (language bindings for C#). Currently the build instructions require a full rebuild of the core ROS2 repositories, and I'm working on converting that to be an overlay on top of an existing ROS2 installation (requires the core ros2_dotnet repositories and any packages containing interface definitions).

I'm finding that when I build certain messages (for example the test_msgs package) I get a UnicodeEncodeError.

Here's a minimal repos file (referred to as 'minimal.repos' below)

repositories:
  ros2/rcl_interfaces:
    type: git
    url: https://github.com/ros2/rcl_interfaces.git
    version: eloquent
  ros2/rosidl_defaults:
    type: git
    url: https://github.com/ros2/rosidl_defaults.git
    version: eloquent
  ros2/test_interface_files:
    type: git
    url: https://github.com/ros2/test_interface_files.git
    version: eloquent

I have installed the binary package for ROS2 Eloquent to c:\dev\ros2e. My commands, run from an Administrative VS2019 developer prompt:

call \dev\ros2e\setup.bat
md c:\dev\test_ws\src
cd c:\dev\test_ws
vcs import src < minimal.repos
colcon build --merge-install --packages-up-to test_msgs

Building test_msgs fails with the following output:

-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19613.
-- The C compiler identification is MSVC 19.24.28314.0
-- The CXX compiler identification is MSVC 19.24.28314.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ament_cmake: 0.7.4 (C:/dev/ros2e/share/ament_cmake/cmake)
-- Found PythonInterp: C:/Python37/python.exe (found suitable version "3.7.5", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: C:/Python37/python.exe
-- Found builtin_interfaces: 0.8.0 (C:/dev/test_msgs_ws/install/share/builtin_interfaces/cmake)
-- Found rosidl_adapter: 0.7.9 (C:/dev/ros2e/share/rosidl_adapter/cmake)
-- Found rosidl_default_generators: 0.8.0 (C:/dev/test_msgs_ws/install/share/rosidl_default_generators/cmake)
-- Could not find RTI Connext - skipping rosidl_typesupport_connext_c
-- Could not find RTI Connext - skipping rosidl_typesupport_connext_cpp
-- Found OpenSSL: optimized;C:/OpenSSL-Win64/lib/VC/libeay32MD.lib;debug;C:/OpenSSL-Win64/lib/VC/libeay32MDd.lib (found version "1.0.2r")  
-- Found FastRTPS: C:/dev/ros2e/include  
-- Could not find PrismTech OpenSplice - skipping rosidl_typesupport_opensplice_c
-- Could not find PrismTech OpenSplice - skipping rosidl_typesupport_opensplice_cpp
-- Found test_interface_files: 0.8.0 (C:/dev/test_msgs_ws/install/share/test_interface_files/cmake)
-- Found PythonInterp: C:/Python37/python.exe (found version "3.7 ...
(more)
edit retag flag offensive close merge delete

Comments

It seems like rebuilding the rosidl package as well avoids this, but I don't think that should be necessary to generate new interface bindings.

theseankelly gravatar image theseankelly  ( 2020-04-30 16:13:35 -0500 )edit