ROSOnWindows icon indicating copy to clipboard operation
ROSOnWindows copied to clipboard

pthead related header not found when compile franka_control

Open fcc315 opened this issue 3 years ago • 0 comments

Describe the bug When I tried to compile frank_ros (on windows with ROS noetic), a pthread-releated header cannot be found. I tried to use vcpkg to install pthread which is successful, but I don't know how to edit cmakeLists.txt file to add pthread component. I tried to manually set the toolchain to vcpkg after catkin_make command, but it didn't work.

To Reproduce

c:\opt\ros\noetic\x64\setup.bat
cd c:\moveit\src
git clone https://github.com/JStech/franka_ros.git -b handeye
cd ..
catkin_make

Then the error:

franka_ros\franka_control\src\franka_combined_control_node.cpp(9): fatal error C1083: Cannot open include file: 'sched.h'

Install pthread using vcpkg:

vcpkg install pthread:x64-windows

Then

cd c:\moveit_ws
catkin_make -DCMAKE_TOOLCHAIN_FILE=C:/opt/ros/noetic/x64/vcpkg/scripts/buildsystems/vcpkg.cmake

:: error
find_package(catkin) failed.  catkin was neither found in the workspace nor
  in the CMAKE_PREFIX_PATH.  One reason may be that no ROS setup.sh was
  sourced before.

Expected behavior When compile packages on ROS Windows, there are some dependencies need to install. I wonder whether to use vcpkg is a good way, or is there other way to install and link to make catkin_make work efficiently?

Environment information:

  • OS version: winver
  • Chocolatey Versions: 1.1.0
  • Visual studio 2017

fcc315 avatar Sep 14 '22 06:09 fcc315