Page 1 of 1

Ros2 windows interface

Posted: 23 Apr 2021, 20:05
by Valenorf
Hi. I'm trying to compile the plugin for ros2 interface in Windows 10. Everything seems ok, but after "colcon build --symlink-install --event-handlers console_direct+ --parallel-workers 1" I obtain the following:

Code: Select all

Starting >>> sim_ros2_interface
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
-- Found ament_cmake: 0.9.8 (C:/opt/ros/foxy/x64/share/ament_cmake/cmake)
-- Using PYTHON_EXECUTABLE: C:/opt/ros/foxy/x64/python.exe
-- Override CMake install command with custom implementation using symlinks instead of copying resources
-- Found ament_cmake_ros: 0.9.0 (C:/opt/ros/foxy/x64/share/ament_cmake_ros/cmake)
-- Found diagnostic_msgs: 2.0.3 (C:/opt/ros/foxy/x64/share/diagnostic_msgs/cmake)
-- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c
-- Found rosidl_adapter: 1.2.0 (C:/opt/ros/foxy/x64/share/rosidl_adapter/cmake)
-- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp
-- Found geometry_msgs: 2.0.3 (C:/opt/ros/foxy/x64/share/geometry_msgs/cmake)
-- Found lifecycle_msgs: 1.0.0 (C:/opt/ros/foxy/x64/share/lifecycle_msgs/cmake)
-- Found map_msgs: 2.0.2 (C:/opt/ros/foxy/x64/share/map_msgs/cmake)
-- Found pendulum_msgs: 0.9.3 (C:/opt/ros/foxy/x64/share/pendulum_msgs/cmake)
-- Found rosgraph_msgs: 1.0.0 (C:/opt/ros/foxy/x64/share/rosgraph_msgs/cmake)
-- Found shape_msgs: 2.0.3 (C:/opt/ros/foxy/x64/share/shape_msgs/cmake)
-- Found stereo_msgs: 2.0.3 (C:/opt/ros/foxy/x64/share/stereo_msgs/cmake)
-- Found tf2_geometry_msgs: 0.13.9 (C:/opt/ros/foxy/x64/share/tf2_geometry_msgs/cmake)
-- Found eigen3_cmake_module: 0.1.1 (C:/opt/ros/foxy/x64/share/eigen3_cmake_module/cmake)
-- Found rmw_implementation_cmake: 1.0.2 (C:/opt/ros/foxy/x64/share/rmw_implementation_cmake/cmake)
-- Using RMW implementation 'rmw_fastrtps_cpp' as default
-- Found trajectory_msgs: 2.0.3 (C:/opt/ros/foxy/x64/share/trajectory_msgs/cmake)
-- Found visualization_msgs: 2.0.3 (C:/opt/ros/foxy/x64/share/visualization_msgs/cmake)
-- Found std_srvs: 2.0.3 (C:/opt/ros/foxy/x64/share/std_srvs/cmake)
-- Found example_interfaces: 0.9.0 (C:/opt/ros/foxy/x64/share/example_interfaces/cmake)
-- Found image_transport: 2.3.0 (C:/opt/ros/foxy/x64/share/image_transport/cmake)
-- CoppeliaSim: LIBPLUGIN_DIR: C:/Program Files/CoppeliaRobotics/CoppeliaSimEdu/programming/libPlugin.
-- CoppeliaSim: COPPELIASIM_ROOT_DIR: C:/Program Files/CoppeliaRobotics/CoppeliaSimEdu.
-- Found CoppeliaSim installation at C:/Program Files/CoppeliaRobotics/CoppeliaSimEdu.
-- Checking CoppeliaSim header version...
-- CoppeliaSim headers version 4.2.0 rev2
-- Found Boost: C:/opt/ros/foxy/x64/include (found version "1.73.0") found components: regex
-- Found Boost: C:/opt/ros/foxy/x64/include (found version "1.73.0")
-- Adding simStubsGen command...
-- Reading plugin metadata...
-- Plugin: ROS2
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Program Files/CoppeliaRobotics/CoppeliaSimEdu/programming/ros2_packages/sim_ros2_interface/build/sim_ros2_interface
Microsoft (R) Build Engine version 16.9.0+5e4b48a27 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Generating generated/stubs.cpp, generated/stubs.h, generated/plugin.h, generated/stubsPlusPlus.cpp, generated/index.json, generated/reference.html, generated/lua_calltips.cpp, generated/simROS2-typecheck.lua
CUSTOMBUILD : I/O error : No such file or directory [C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu\programming\ros2_packages\sim_ros2_interface\build\sim_ros2_interface\simExtROS2.vcxproj]

..(here there are other CUSTOMBUILD warning all related to the same file)

Failed   <<< sim_ros2_interface [11.0s, exited with code 1]

Am I doing something wrong? The file simExtROS2.vcxproj seems present to me in the folder. I'm using CoppeliaSim 4.2.0.

Thank you

Re: Ros2 windows interface

Posted: 28 Apr 2021, 12:34
by coppelia

sorry for the delay... what happens if you use something like?

Code: Select all

cd c:\dev\ros2_ws
call install\local_setup.bat
call install\setup.bat
colcon build --merge-install --cmake-args "-DCMAKE_TOOLCHAIN_FILE=%CMAKE_TOOLCHAIN_FILE%"
Where CMAKE_TOOLCHAIN_FILE is the location of your vcpkg/scripts/buildsystems/vcpkg.cmake


Re: Ros2 windows interface

Posted: 28 Apr 2021, 16:08
by Valenorf
I cannot find the path vcpkg/scripts/buildsystems/vcpkg.cmake. It is related to the Visual Studio installation, right?

Moreover, colcon gives me the output "colcon ERROR colcon build: The install directory 'install' was created with the layout 'isolated'. Please remove the install directory, pick a different one or remove the '--merge-install' option."
(I ran it without specifying the vcpkg)