Closed RobertBlakeAnderson closed 2 years ago
Thank you for this PR! Greatly appreciated.
The package built successfully for us at the time of its last commit. What version of ROS/Gazebo/OS are you using? Regardless, thanks for fixing the compilation errors!
We tried building on both Melodic / Ubuntu 18.04 and Noetic / Ubuntu 20.04.
Looking through the commit history of protobuf, it appears that RepeatedPtrField::operator[](int index)
was removed at some point, leaving RepeatedPtrField::Get(int index)
as the lone accessor method.
Not sure what the deal was with Line 165. For us, the compiler throws that the std::atomic copy constructor is a deleted function. The C++ docs say this has always been the case going back to C++11 when std::atomic was introduced, so I'm curious how that could have ever built for you.
I can confirm that I get that I get this issue as well on 18.04/Melodic
. I just cloned the repo, did
rosdep update && rosdep install
catkin_make
Please find the logs below:
~/osrf_autodock_ws$ catkin_make
Base path: /home/swaroophs/osrf_autodock_ws
Source space: /home/swaroophs/osrf_autodock_ws/src
Build space: /home/swaroophs/osrf_autodock_ws/build
Devel space: /home/swaroophs/osrf_autodock_ws/devel
Install space: /home/swaroophs/osrf_autodock_ws/install
Creating symlink "/home/swaroophs/osrf_autodock_ws/src/CMakeLists.txt" pointing to "/opt/ros/melodic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/swaroophs/osrf_autodock_ws/src -DCATKIN_DEVEL_PREFIX=/home/swaroophs/osrf_autodock_ws/devel -DCMAKE_INSTALL_PREFIX=/home/swaroophs/osrf_autodock_ws/install -G Unix Makefiles" in "/home/swaroophs/osrf_autodock_ws/build"
####
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/swaroophs/osrf_autodock_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/swaroophs/catkin_ws/devel;/opt/ros/melodic
-- This workspace overlays: /home/swaroophs/catkin_ws/devel;/opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2")
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/swaroophs/osrf_autodock_ws/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
WARNING: package "moveit_tutorials" should not depend on metapackage "moveit_resources" but on its packages instead
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 3 packages in topological order:
-- ~~ - autodock_core
-- ~~ - autodock_examples
-- ~~ - autodock_sim
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'autodock_core'
-- ==> add_subdirectory(autodock/autodock_core)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Generating .msg files for action autodock_core/AutoDocking /home/swaroophs/osrf_autodock_ws/src/autodock/autodock_core/action/AutoDocking.action
Generating for action AutoDocking
-- autodock_core: 7 messages, 0 services
-- +++ processing catkin package: 'autodock_examples'
-- ==> add_subdirectory(autodock/autodock_examples)
-- +++ processing catkin package: 'autodock_sim'
-- ==> add_subdirectory(autodock/autodock_sim)
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 2.87
-- Found Simbody: /usr/include/simbody
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- thread
-- system
-- filesystem
-- program_options
-- regex
-- iostreams
-- date_time
-- chrono
-- atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0")
-- Boost version: 1.65.1
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
-- Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindBoost.cmake:911 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "chrono" will no longer be dereferenced when the
policy is set to NEW. Since the policy is not set the OLD behavior will be
used.
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
/usr/share/OGRE/cmake/modules/FindOGRE.cmake:318 (find_package)
/usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:175 (find_package)
/opt/ros/melodic/share/gazebo_dev/cmake/gazebo_dev-extras.cmake:2 (find_package)
/opt/ros/melodic/share/gazebo_dev/cmake/gazebo_devConfig.cmake:222 (include)
/opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
autodock/autodock_sim/CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found suitable version "3.0.0", minimum required is "2.3.0")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.2.5
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Checking for module 'uuid'
-- Found uuid, version 2.31.1
-- Found UUID: TRUE
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 6.0.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
-- Found gts, version 0.7.6
-- Found GTS: TRUE
-- Checking for module 'libswscale'
-- Found libswscale, version 4.8.100
-- Found SWSCALE: TRUE
-- Checking for module 'libavdevice >= 56.4.100'
-- Found libavdevice , version 57.10.100
-- Found AVDEVICE: TRUE (Required is at least version "56.4.100")
-- Checking for module 'libavformat'
-- Found libavformat, version 57.83.100
-- Found AVFORMAT: TRUE
-- Checking for module 'libavcodec'
-- Found libavcodec, version 57.107.100
-- Found AVCODEC: TRUE
-- Checking for module 'libavutil'
-- Found libavutil, version 55.78.100
-- Found AVUTIL: TRUE
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.58.0")
-- Checking for module 'jsoncpp'
-- Found jsoncpp, version 1.7.4
-- Found JSONCPP: TRUE
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.1.7
-- Found YAML: TRUE
-- Checking for module 'libzip'
-- Found libzip, version 1.1.2
-- Found ZIP: TRUE
-- Gazebo version: 9.19
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Configuring done
-- Generating done
-- Build files have been written to: /home/swaroophs/osrf_autodock_ws/build
####
#### Running command: "make -j8 -l8" in "/home/swaroophs/osrf_autodock_ws/build"
####
Scanning dependencies of target actionlib_msgs_generate_messages_lisp
Scanning dependencies of target _autodock_core_generate_messages_check_deps_AutoDockingActionGoal
Scanning dependencies of target std_msgs_generate_messages_py
Scanning dependencies of target _autodock_core_generate_messages_check_deps_AutoDockingAction
Scanning dependencies of target actionlib_msgs_generate_messages_py
Scanning dependencies of target _autodock_core_generate_messages_check_deps_AutoDockingActionFeedback
Scanning dependencies of target _autodock_core_generate_messages_check_deps_AutoDockingResult
Scanning dependencies of target _autodock_core_generate_messages_check_deps_AutoDockingGoal
[ 0%] Built target actionlib_msgs_generate_messages_lisp
[ 0%] Built target actionlib_msgs_generate_messages_py
[ 0%] Built target std_msgs_generate_messages_py
Scanning dependencies of target _autodock_core_generate_messages_check_deps_AutoDockingFeedback
Scanning dependencies of target _autodock_core_generate_messages_check_deps_AutoDockingActionResult
Scanning dependencies of target std_msgs_generate_messages_eus
[ 0%] Built target _autodock_core_generate_messages_check_deps_AutoDockingAction
[ 0%] Built target _autodock_core_generate_messages_check_deps_AutoDockingActionGoal
[ 0%] Built target _autodock_core_generate_messages_check_deps_AutoDockingActionFeedback
[ 0%] Built target std_msgs_generate_messages_eus
[ 0%] Built target _autodock_core_generate_messages_check_deps_AutoDockingResult
[ 0%] Built target _autodock_core_generate_messages_check_deps_AutoDockingGoal
Scanning dependencies of target _catkin_empty_exported_target
Scanning dependencies of target actionlib_msgs_generate_messages_eus
Scanning dependencies of target std_msgs_generate_messages_lisp
Scanning dependencies of target rosgraph_msgs_generate_messages_cpp
Scanning dependencies of target actionlib_msgs_generate_messages_nodejs
Scanning dependencies of target rosgraph_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target actionlib_msgs_generate_messages_eus
[ 0%] Built target _autodock_core_generate_messages_check_deps_AutoDockingFeedback
[ 0%] Built target _catkin_empty_exported_target
[ 0%] Built target _autodock_core_generate_messages_check_deps_AutoDockingActionResult
[ 0%] Built target actionlib_msgs_generate_messages_nodejs
[ 0%] Built target rosgraph_msgs_generate_messages_cpp
[ 0%] Built target rosgraph_msgs_generate_messages_nodejs
Scanning dependencies of target actionlib_generate_messages_eus
Scanning dependencies of target std_msgs_generate_messages_cpp
Scanning dependencies of target rosgraph_msgs_generate_messages_eus
Scanning dependencies of target actionlib_msgs_generate_messages_cpp
Scanning dependencies of target rosgraph_msgs_generate_messages_lisp
Scanning dependencies of target rosgraph_msgs_generate_messages_py
Scanning dependencies of target actionlib_generate_messages_lisp
Scanning dependencies of target std_msgs_generate_messages_nodejs
[ 0%] Built target actionlib_generate_messages_eus
[ 0%] Built target actionlib_msgs_generate_messages_cpp
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target rosgraph_msgs_generate_messages_eus
[ 0%] Built target rosgraph_msgs_generate_messages_lisp
[ 0%] Built target rosgraph_msgs_generate_messages_py
[ 0%] Built target actionlib_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_nodejs
Scanning dependencies of target actionlib_generate_messages_py
Scanning dependencies of target actionlib_generate_messages_cpp
Scanning dependencies of target roscpp_generate_messages_cpp
Scanning dependencies of target roscpp_generate_messages_nodejs
Scanning dependencies of target roscpp_generate_messages_lisp
Scanning dependencies of target roscpp_generate_messages_eus
Scanning dependencies of target roscpp_generate_messages_py
Scanning dependencies of target autodock_core_generate_messages_cpp
[ 0%] Built target actionlib_generate_messages_py
[ 0%] Built target actionlib_generate_messages_cpp
[ 0%] Built target roscpp_generate_messages_nodejs
[ 0%] Built target roscpp_generate_messages_cpp
[ 0%] Built target roscpp_generate_messages_eus
[ 0%] Built target roscpp_generate_messages_lisp
[ 0%] Built target roscpp_generate_messages_py
Scanning dependencies of target actionlib_generate_messages_nodejs
[ 2%] Generating C++ code from autodock_core/AutoDockingAction.msg
Scanning dependencies of target ChargingStationPlugin
[ 4%] Generating C++ code from autodock_core/AutoDockingResult.msg
Scanning dependencies of target autodock_core_generate_messages_py
[ 7%] Generating C++ code from autodock_core/AutoDockingGoal.msg
[ 9%] Generating C++ code from autodock_core/AutoDockingActionFeedback.msg
Scanning dependencies of target autodock_core_generate_messages_eus
[ 9%] Built target actionlib_generate_messages_nodejs
[ 12%] Generating Python from MSG autodock_core/AutoDockingAction
[ 14%] Generating EusLisp code from autodock_core/AutoDockingAction.msg
[ 17%] Generating Python from MSG autodock_core/AutoDockingResult
[ 19%] Generating EusLisp code from autodock_core/AutoDockingResult.msg
[ 21%] Generating Python from MSG autodock_core/AutoDockingGoal
[ 24%] Generating EusLisp code from autodock_core/AutoDockingGoal.msg
[ 26%] Building CXX object autodock/autodock_sim/CMakeFiles/ChargingStationPlugin.dir/src/ChargingStationPlugin.cpp.o
[ 29%] Generating EusLisp code from autodock_core/AutoDockingActionFeedback.msg
Scanning dependencies of target autodock_core_generate_messages_lisp
[ 31%] Generating C++ code from autodock_core/AutoDockingFeedback.msg
[ 34%] Generating Lisp code from autodock_core/AutoDockingAction.msg
[ 36%] Generating Lisp code from autodock_core/AutoDockingResult.msg
[ 39%] Generating C++ code from autodock_core/AutoDockingActionResult.msg
[ 41%] Generating Lisp code from autodock_core/AutoDockingGoal.msg
[ 43%] Generating Python from MSG autodock_core/AutoDockingActionFeedback
[ 46%] Generating EusLisp code from autodock_core/AutoDockingFeedback.msg
[ 48%] Generating EusLisp code from autodock_core/AutoDockingActionResult.msg
[ 51%] Generating EusLisp code from autodock_core/AutoDockingActionGoal.msg
[ 53%] Generating Lisp code from autodock_core/AutoDockingActionFeedback.msg
Scanning dependencies of target autodock_core_generate_messages_nodejs
[ 56%] Generating Javascript code from autodock_core/AutoDockingResult.msg
[ 58%] Generating Javascript code from autodock_core/AutoDockingAction.msg
[ 60%] Generating C++ code from autodock_core/AutoDockingActionGoal.msg
[ 63%] Generating Python from MSG autodock_core/AutoDockingFeedback
[ 65%] Generating Python from MSG autodock_core/AutoDockingActionResult
[ 68%] Generating Lisp code from autodock_core/AutoDockingFeedback.msg
[ 70%] Generating EusLisp manifest code for autodock_core
[ 73%] Generating Javascript code from autodock_core/AutoDockingActionFeedback.msg
[ 75%] Generating Javascript code from autodock_core/AutoDockingGoal.msg
[ 78%] Generating Lisp code from autodock_core/AutoDockingActionResult.msg
[ 80%] Generating Javascript code from autodock_core/AutoDockingFeedback.msg
[ 82%] Generating Javascript code from autodock_core/AutoDockingActionResult.msg
[ 85%] Generating Lisp code from autodock_core/AutoDockingActionGoal.msg
[ 87%] Generating Javascript code from autodock_core/AutoDockingActionGoal.msg
[ 90%] Generating Python from MSG autodock_core/AutoDockingActionGoal
[ 90%] Built target autodock_core_generate_messages_cpp
[ 90%] Built target autodock_core_generate_messages_lisp
[ 90%] Built target autodock_core_generate_messages_nodejs
[ 92%] Generating Python msg __init__.py for autodock_core
[ 92%] Built target autodock_core_generate_messages_py
[ 92%] Built target autodock_core_generate_messages_eus
Scanning dependencies of target obstacle_observer
Scanning dependencies of target autodock_core_generate_messages
[ 92%] Built target autodock_core_generate_messages
[ 95%] Building CXX object autodock/autodock_core/CMakeFiles/obstacle_observer.dir/src/ObstacleObserver.cpp.o
[ 97%] Linking CXX executable /home/swaroophs/osrf_autodock_ws/devel/lib/autodock_core/obstacle_observer
[ 97%] Built target obstacle_observer
/home/swaroophs/osrf_autodock_ws/src/autodock/autodock_sim/src/ChargingStationPlugin.cpp:161:41: error: use of deleted function ‘std::atomic<bool>::atomic(const std::atomic<bool>&)’
std::atomic<bool> charging_led_on = false;
^~~~~
In file included from /usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp:19:0,
from /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp:48,
from /usr/include/boost/smart_ptr/detail/shared_count.hpp:29,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:28,
from /usr/include/boost/shared_ptr.hpp:17,
from /opt/ros/melodic/include/ros/forwards.h:37,
from /opt/ros/melodic/include/ros/common.h:37,
from /opt/ros/melodic/include/ros/ros.h:43,
from /home/swaroophs/osrf_autodock_ws/src/autodock/autodock_sim/src/ChargingStationPlugin.cpp:20:
/usr/include/c++/7/atomic:71:5: note: declared here
atomic(const atomic&) = delete;
^~~~~~
/usr/include/c++/7/atomic:75:15: note: after user-defined conversion: constexpr std::atomic<bool>::atomic(bool)
constexpr atomic(bool __i) noexcept : _M_base(__i) { }
^~~~~~
/home/swaroophs/osrf_autodock_ws/src/autodock/autodock_sim/src/ChargingStationPlugin.cpp: In member function ‘void gazebo::ChargingStationPlugin::contact_state_cb(ConstContactsPtr&)’:
/home/swaroophs/osrf_autodock_ws/src/autodock/autodock_sim/src/ChargingStationPlugin.cpp:133:54: error: no match for ‘operator[]’ (operand types are ‘const google::protobuf::RepeatedPtrField<gazebo::msgs::Contact>’ and ‘int’)
(param_.target_collision == _msg->contact()[0].collision2()))
^
/home/swaroophs/osrf_autodock_ws/src/autodock/autodock_sim/src/ChargingStationPlugin.cpp:138:54: error: no match for ‘operator[]’ (operand types are ‘const google::protobuf::RepeatedPtrField<gazebo::msgs::Contact>’ and ‘int’)
last_collision_verbose_msg_ = _msg->contact()[0].DebugString();
^
/home/swaroophs/osrf_autodock_ws/src/autodock/autodock_sim/src/ChargingStationPlugin.cpp:141:49: error: no match for ‘operator[]’ (operand types are ‘const google::protobuf::RepeatedPtrField<gazebo::msgs::Contact>’ and ‘int’)
for (const auto wrench : _msg->contact()[0].wrench())
^
autodock/autodock_sim/CMakeFiles/ChargingStationPlugin.dir/build.make:62: recipe for target 'autodock/autodock_sim/CMakeFiles/ChargingStationPlugin.dir/src/ChargingStationPlugin.cpp.o' failed
make[2]: *** [autodock/autodock_sim/CMakeFiles/ChargingStationPlugin.dir/src/ChargingStationPlugin.cpp.o] Error 1
CMakeFiles/Makefile2:2076: recipe for target 'autodock/autodock_sim/CMakeFiles/ChargingStationPlugin.dir/all' failed
make[1]: *** [autodock/autodock_sim/CMakeFiles/ChargingStationPlugin.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
…Plugin library.
I fixed some errors that appeared when we tried to build autodoc_sim. I'm wondering if this package is a work in progress?