sea-bass / turtlebot3_behavior_demos

Example repository for autonomous behaviors using TurtleBot3, as well as Docker workflows in ROS based projects.
MIT License
270 stars 53 forks source link

groot build fails #3

Closed cocodmdr closed 2 years ago

cocodmdr commented 2 years ago

Hi, Thank you very much for your tutorial, however when I run make build groot fails to build. I get the following error. I am using your docker environment in Ubuntu 20.04. What should I do ? Thank you !

Starting >>> groot                                                             
Failed <<< groot                                 [ 0.4 seconds ]               
Abandoned <<< turtlebot3_slam                       [ Unrelated job failed ]   
Abandoned <<< turtlebot3                            [ Unrelated job failed ]   
Finished <<< turtlebot3_simulations                [ 1.0 seconds ]             
Finished <<< turtlebot3_navigation                 [ 1.1 seconds ]             
_______________________________________________________________________________
Errors << groot:cmake /turtlebot3_ws/logs/groot/build.cmake.000.log            
CMake Error at /turtlebot3_ws/src/groot/CMakeLists.txt:23 (find_package):
  By not providing "Findament_index_cpp.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ament_index_cpp", but CMake did not find one.

  Could not find a package configuration file provided by "ament_index_cpp"
  with any of the following names:

    ament_index_cppConfig.cmake
    ament_index_cpp-config.cmake

  Add the installation prefix of "ament_index_cpp" to CMAKE_PREFIX_PATH or
  set "ament_index_cpp_DIR" to a directory containing one of the above files.
  If "ament_index_cpp" provides a separate development package or SDK, be
  sure it has been installed.

cd /turtlebot3_ws/build/groot; catkin build --get-env groot | catkin env -si  /usr/bin/cmake /turtlebot3_ws/src/groot --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/turtlebot3_ws/devel/.private/groot -DCMAKE_INSTALL_PREFIX=/turtlebot3_ws/install; cd -

...............................................................................
Failed << groot:cmake                            [ Exited with code 1 ]        
Finished <<< turtlebot3_example                    [ 2.7 seconds ]             
[build] Summary: 12 of 15 packages succeeded.                                  
[build] Ignored: None.                                                         
[build] Warnings: None.                                                        
[build] Abandoned: 2 packages were abandoned.                                  
[build] Failed: 1 packages failed.                                             
[build] Runtime: 21.1 seconds total.                                           
[build] Note: Workspace packages have changed, please re-source setup files to use them.
The command '/bin/bash -c cd /turtlebot3_ws  && source /opt/ros/noetic/setup.bash  && rosdep install -y --from-paths src --ignore-src  && catkin build -j4' returned a non-zero code: 1
make: *** [Makefile:48: build-base] Error 1
sea-bass commented 2 years ago

I was able to reproduce this on my end.

Doing some digging, this issue is a known bad merge to Groot which just happened recently and you caught at bad timing -- see https://github.com/BehaviorTree/Groot/pull/157 -- which is being reverted in https://github.com/BehaviorTree/Groot/pull/158.

For now you can change the line in dockerfile_tb3_base as follows, but I think this will be fixed soon!

git clone -b revert-157-Fix_Build https://github.com/BehaviorTree/Groot.git groot

I've pushed this temporary fix to the main branch here for the time being so you should be able to pull and build without error. When that Groot repo is fixed, I'll revert the branch in the Dockerfile to master and close this issue.

Thanks for bringing this up!

MortezaAliyari commented 2 years ago

Hi, Thank you very much for your tutorial, however when I run make build groot fails to build. I get the following error. I am using your docker environment in Ubuntu 20.04. What should I do ? Thank you !

Starting >>> groot                                                             
Failed <<< groot                                 [ 0.4 seconds ]               
Abandoned <<< turtlebot3_slam                       [ Unrelated job failed ]   
Abandoned <<< turtlebot3                            [ Unrelated job failed ]   
Finished <<< turtlebot3_simulations                [ 1.0 seconds ]             
Finished <<< turtlebot3_navigation                 [ 1.1 seconds ]             
_______________________________________________________________________________
Errors << groot:cmake /turtlebot3_ws/logs/groot/build.cmake.000.log            
CMake Error at /turtlebot3_ws/src/groot/CMakeLists.txt:23 (find_package):
  By not providing "Findament_index_cpp.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ament_index_cpp", but CMake did not find one.

  Could not find a package configuration file provided by "ament_index_cpp"
  with any of the following names:

    ament_index_cppConfig.cmake
    ament_index_cpp-config.cmake

  Add the installation prefix of "ament_index_cpp" to CMAKE_PREFIX_PATH or
  set "ament_index_cpp_DIR" to a directory containing one of the above files.
  If "ament_index_cpp" provides a separate development package or SDK, be
  sure it has been installed.

cd /turtlebot3_ws/build/groot; catkin build --get-env groot | catkin env -si  /usr/bin/cmake /turtlebot3_ws/src/groot --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/turtlebot3_ws/devel/.private/groot -DCMAKE_INSTALL_PREFIX=/turtlebot3_ws/install; cd -

...............................................................................
Failed << groot:cmake                            [ Exited with code 1 ]        
Finished <<< turtlebot3_example                    [ 2.7 seconds ]             
[build] Summary: 12 of 15 packages succeeded.                                  
[build] Ignored: None.                                                         
[build] Warnings: None.                                                        
[build] Abandoned: 2 packages were abandoned.                                  
[build] Failed: 1 packages failed.                                             
[build] Runtime: 21.1 seconds total.                                           
[build] Note: Workspace packages have changed, please re-source setup files to use them.
The command '/bin/bash -c cd /turtlebot3_ws  && source /opt/ros/noetic/setup.bash  && rosdep install -y --from-paths src --ignore-src  && catkin build -j4' returned a non-zero code: 1
make: *** [Makefile:48: build-base] Error 1

I had the same issue. open CmakeLists.txt remove the line find_package(ament_index_cpp REQUIRED) and continue. it should work!

sea-bass commented 2 years ago

Alright, the Groot repo build has been fixed so this is back to using the master branch! Closing.