ROBOTIS-GIT / turtlebot3_simulations

Simulations for TurtleBot3
http://turtlebot3.robotis.com/
Apache License 2.0
309 stars 428 forks source link

Simulation Package colcon build failed(turtlebot3_gazebo) #175

Closed alan0428a closed 2 years ago

alan0428a commented 2 years ago

Hi,

I was trying to launch the simulation of turtlebot3. But when I try to build the packages, the "turtlebot3_gazebo" package always builds failed.

I have followed the PC Install process to install ros2 and all turtlebot3 dependencies. And then I followed the Install Simulation Packages try to build simulation packages.

Below is the error message output when I called cd ~/turtlebot3_ws && colcon build --symlink-install.

CMake Error in CMakeLists.txt:
  Imported target "dart" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Generate step failed.  Build files cannot be regenerated correctly.
---
Failed   <<< turtlebot3_gazebo [1.19s, exited with code 1]

Summary: 1 package finished [1.43s]
  1 package failed: turtlebot3_gazebo
  1 package had stderr output: turtlebot3_gazebo
  1 package not processed

Environment: OS: Windows10 using Hyper-V to build Ubuntu 20.04 VM ROS: ROS2 Foxy

Please let me know if I missed something. Any help will be appreciated.

Thanks, Alan

ROBOTIS-Will commented 2 years ago

Hi Alan,

Could you copy and paste the whole terminal output? I can't confirm the exact error that causes build failure in your pasted context. Thank you.

alan0428a commented 2 years ago

Hello Will,

Below is the complete output.

alan@alan-Virtual-Machine:~/turtlebot3_ws/src$ cd ~/turtlebot3_ws && colcon build --symlink-install
Starting >>> turtlebot3_fake_node
Finished <<< turtlebot3_fake_node [8.24s]                     
Starting >>> turtlebot3_gazebo
--- stderr: turtlebot3_gazebo                          
CMake Error in CMakeLists.txt:
  Imported target "dart" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in CMakeLists.txt:
  Imported target "dart" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in CMakeLists.txt:
  Imported target "dart" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in CMakeLists.txt:
  Imported target "dart" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in CMakeLists.txt:
  Imported target "dart" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in CMakeLists.txt:
  Imported target "dart" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Generate step failed.  Build files cannot be regenerated correctly.
---
Failed   <<< turtlebot3_gazebo [2.21s, exited with code 1]

Summary: 1 package finished [10.6s]
  1 package failed: turtlebot3_gazebo
  1 package had stderr output: turtlebot3_gazebo
  1 package not processed

I think the error is related to gazebo packages, I found that this line in turtlebot3_ws/src/turtlebot3_simulations/turtlebot3_gazebo/CMakeList.txt will cause build failures.

add_library(obstacle1 SHARED models/turtlebot3_dqn_world/obstacle_plugin/obstacle1.cc)
target_link_libraries(obstacle1 ${GAZEBO_LIBRARIES})

Below are the gazebo packages that I have installed. image

I have tried to build the turtlebot3_simulations package on another computer with older version gazebo packages and it built the package successfully.

Packages installed on another computer: image

alan0428a commented 2 years ago

After some investigation, I can now build the turtlebot simulation packages without issues. Now I use the VMWare to build Ubuntu 20.04 VM and follow the same steps as I did on Ubuntu 20.04 VM built by Windows HyperV. And it magically worked! Not sure why the VM built using HyperV could not work properly.