Error when trying to build turtlebot3 packages using ROS for Windows

asked 2020-07-13 08:10:12 -0500

tommyp_123 gravatar image

Hello,

I have successfully (I think!) installed ROS Melodic on Windows (Windows 10 version 1909 with Microsoft Visual Studio 2019 Community Edition), following the instructions provided here. I have used catkin_make to create a catkin workspace as per the ROS Tutorial, so I believe the installation has been successful.

I am now trying to build the turtlebot3 packages so that I can start working with them in RViz and Gazebo to begin with. I've followed the Robotis "TurtleBot3 Setup Guide" but run into an error when running catkin_make (see below). I'm not sure how to diagnose this really, so am looking for any advice on where to start... can anyone suggest any likely causes, or point me in the right direction of what the problem might be?

Many thanks,

Tom

Base path: c:\ws\turtlebot3
Source space: c:\ws\turtlebot3\src
Build space: c:\ws\turtlebot3\build
Devel space: c:\ws\turtlebot3\devel
Install space: c:\ws\turtlebot3\install
####
#### Running command: "cmake c:\ws\turtlebot3\src -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_DEVEL_PREFIX=c:\ws\turtlebot3\devel -DCMAKE_INSTALL_PREFIX=c:\ws\turtlebot3\install -G NMake Makefiles" in "c:\ws\turtlebot3\build"
####
<... snipped, all seems fine until the error: >
CMake Error at C:/opt/rosdeps/x64/share/protobuf/protobuf-targets.cmake:37 (message):
  Some (but not all) targets in this export set were already defined.

  Targets Defined: protobuf::libprotobuf;protobuf::libprotoc

  Targets not yet defined: protobuf::protoc

Call Stack (most recent call first):
  C:/opt/rosdeps/x64/share/protobuf/protobuf-config.cmake:8 (include)
  C:/opt/rosdeps/x64/lib/cmake/ignition-cmake0/cmake0/FindIgnProtobuf.cmake:26 (find_package)
  C:/opt/python27amd64/Lib/site-packages/cmake/data/share/cmake-3.17/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  C:/opt/rosdeps/x64/lib/cmake/ignition-transport4/ignition-transport4-config.cmake:96 (find_dependency)
  C:/opt/rosdeps/x64/lib/cmake/gazebo/gazebo-config.cmake:197 (find_package)
  turtlebot3_simulations/turtlebot3_gazebo/CMakeLists.txt:23 (find_package)


-- Configuring incomplete, errors occurred!
See also "C:/ws/turtlebot3/build/CMakeFiles/CMakeOutput.log".
See also "C:/ws/turtlebot3/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

The CMakeError.log contains the following (note, I have masked parts of certain file paths with XXX myself):

Determining if the include file pthread.h exists failed with the following output:
Change Dir: C:/ws/turtlebot3/build/CMakeFiles/CMakeTmp

Run Build Command(s):nmake /nologo cmTC_b6987\fast &&   "Y:\XXX\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"  -f CMakeFiles\cmTC_b6987.dir\build.make /nologo -L                  CMakeFiles\cmTC_b6987.dir\build

Building C object CMakeFiles/cmTC_b6987.dir/CheckIncludeFile.c.obj

    "Y:\XXX\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\Hostx64\x64\cl.exe" @XXX\nm1DF3.tmp

CheckIncludeFile.c

C:\ws\turtlebot3\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

NMAKE : fatal error U1077: '"Y:\XXX\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\Hostx64\x64\cl.exe"' : return code '0x2'

Stop.

NMAKE : fatal error U1077: '"Y:\XXX\Microsoft Visual Studio\2019\Community ...
(more)
edit retag flag offensive close merge delete

Comments

i have the exact same issue any help would be greatly appreciated

ChePapii gravatar image ChePapii  ( 2020-08-07 04:28:02 -0500 )edit

Same issue

jmjcoke gravatar image jmjcoke  ( 2020-08-25 16:39:24 -0500 )edit

Can you try to add -DCMAKE_PROGRAM_PATH=c:\opt\rosdeps\x64\tools\protobuf to your catkin_make or catkin_make_isolated?

Sean Yen gravatar image Sean Yen  ( 2020-08-27 13:14:43 -0500 )edit

Same issue after adding -DCMAKE_PROGRAM_PATH=c:\opt\rosdeps\x64\tools\protobuf

jmjcoke gravatar image jmjcoke  ( 2020-08-31 08:26:53 -0500 )edit

That argument solves mine. I'm using noetic on Win10.

iamnotedible gravatar image iamnotedible  ( 2020-08-31 21:18:07 -0500 )edit

@Sean Yen catkin_make -DCMAKE_PROGRAM_PATH=c:\opt\rosdeps\x64\tools\protobuf worked for me. On to the next ROS Windows problem.

mojolicous gravatar image mojolicous  ( 2020-09-01 07:27:56 -0500 )edit