ros-gbp / gazebo_ros_pkgs-release

1 stars 6 forks source link

jade/gazebo_plugins wont build be #5

Closed senden9 closed 8 years ago

senden9 commented 8 years ago

Hi, i want to build the branch release/jade/gazebo_plugins/2.5.1-0 but i get an error. Here is the output of cmake:

$ cmake /tmp/gazebo_ros_pkgs-release -DCMAKE_BUILD_TYPE=Release -DCATKIN_BUILD_BINARY_PACKAGE=ON -DCMAKE_INSTALL_PREFIX=/opt/ros/jade -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so -DPYTHON_BASENAME=-python2.7 -DCMAKE_CXX_FLAGS="--std=c++11" 
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.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: /tmp/gazebo_ros_pkgs-release/build/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/jade;/opt/ros/indigo
-- This workspace overlays: /opt/ros/jade
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.11") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using default Python package layout
-- Found PY_em: /usr/lib/python2.7/site-packages/em.pyc  
-- Using empy: /usr/lib/python2.7/site-packages/em.pyc
-- Using CATKIN_ENABLE_TESTING: ON
-- Skip enable_testing() when building binary package
-- Using CATKIN_TEST_RESULTS_DIR: /tmp/gazebo_ros_pkgs-release/build/test_results
-- Found gtest: gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.16
-- Using these message generators: gencpp;geneus;genlisp;genpy
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Checking for module 'libxml-2.0'
--   Found libxml-2.0, version 2.9.3
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Checking for module 'OGRE-Terrain'
--   Found OGRE-Terrain, version 1.9.0
-- Checking for module 'OGRE-Paging'
--   Found OGRE-Paging, version 1.9.0
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   thread
--   signals
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
-- 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  
-- Found PROTOBUF: /usr/lib64/libprotobuf.so  
-- Boost version: 1.60.0
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   thread
CMake Warning at /opt/ros/jade/share/catkin/cmake/catkin_package.cmake:409 (message):
  catkin_package() include dir
  '/tmp/gazebo_ros_pkgs-release/build/devel/include' should be placed in the
  devel space instead of the build space
Call Stack (most recent call first):
  /opt/ros/jade/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
  CMakeLists.txt:78 (catkin_package)

CMake Warning at /opt/ros/jade/share/catkin/cmake/catkin_package.cmake:409 (message):
  catkin_package() include dir
  '/tmp/gazebo_ros_pkgs-release/build/devel/include' should be placed in the
  devel space instead of the build space
Call Stack (most recent call first):
  /opt/ros/jade/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
  CMakeLists.txt:81 (catkin_package)

-- Configuring done
CMake Warning (dev) at CMakeLists.txt:234 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "gazebo_msgs_gencpp" of target
  "gazebo_ros_joint_state_publisher" does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:213 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "gazebo_msgs_gencpp" of target "gazebo_ros_bumper"
  does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:227 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "gazebo_msgs_gencpp" of target
  "gazebo_ros_joint_trajectory" does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:238 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "gazebo_msgs_gencpp" of target
  "gazebo_ros_joint_pose_trajectory" does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    PYTHON_BASENAME
    PYTHON_INCLUDE_DIR
    PYTHON_LIBRARY

-- Build files have been written to: /tmp/gazebo_ros_pkgs-release/build

This is the output of make:

.-(/tmp/gazebo_ros_pkgs-release/build)-------------------------------------------------------------------------------------------(stefano@STEFANO-PC)-
`--> LANG=C make -j1
[  1%] Building CXX object CMakeFiles/MultiCameraPlugin.dir/src/MultiCameraPlugin.cpp.o
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp: In member function 'virtual void gazebo::MultiCameraPlugin::Load(gazebo::sensors::SensorPtr, sdf::ElementPtr)':
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:44:68: error: no matching function for call to 'dynamic_pointer_cast(gazebo::sensors::SensorPtr&)'
     boost::dynamic_pointer_cast<sensors::MultiCameraSensor>(_sensor);
                                                                    ^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
                 from /usr/include/gazebo-7/gazebo/msgs/time.pb.h:28,
                 from /usr/include/gazebo-7/gazebo/msgs/altimeter.pb.h:27,
                 from /usr/include/gazebo-7/gazebo/msgs/MessageTypes.hh:7,
                 from /usr/include/gazebo-7/gazebo/sensors/DepthCameraSensor.hh:23,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:17:
/usr/include/boost/smart_ptr/shared_ptr.hpp:848:42: note: candidate: template<class T, class U> boost::shared_ptr<X> boost::dynamic_pointer_cast(const boost::shared_ptr<U>&)
 template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
                                          ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:848:42: note:   template argument deduction/substitution failed:
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:44:68: note:   'gazebo::sensors::SensorPtr {aka std::shared_ptr<gazebo::sensors::Sensor>}' is not derived from 'const boost::shared_ptr<U>'
     boost::dynamic_pointer_cast<sensors::MultiCameraSensor>(_sensor);
                                                                    ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:49:72: error: no matching function for call to 'dynamic_pointer_cast(gazebo::sensors::SensorPtr&)'
     if (boost::dynamic_pointer_cast<sensors::DepthCameraSensor>(_sensor))
                                                                        ^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
                 from /usr/include/gazebo-7/gazebo/msgs/time.pb.h:28,
                 from /usr/include/gazebo-7/gazebo/msgs/altimeter.pb.h:27,
                 from /usr/include/gazebo-7/gazebo/msgs/MessageTypes.hh:7,
                 from /usr/include/gazebo-7/gazebo/sensors/DepthCameraSensor.hh:23,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:17:
/usr/include/boost/smart_ptr/shared_ptr.hpp:848:42: note: candidate: template<class T, class U> boost::shared_ptr<X> boost::dynamic_pointer_cast(const boost::shared_ptr<U>&)
 template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
                                          ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:848:42: note:   template argument deduction/substitution failed:
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:49:72: note:   'gazebo::sensors::SensorPtr {aka std::shared_ptr<gazebo::sensors::Sensor>}' is not derived from 'const boost::shared_ptr<U>'
     if (boost::dynamic_pointer_cast<sensors::DepthCameraSensor>(_sensor))
                                                                        ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:51:67: error: no matching function for call to 'dynamic_pointer_cast(gazebo::sensors::SensorPtr&)'
     if (boost::dynamic_pointer_cast<sensors::CameraSensor>(_sensor))
                                                                   ^
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
                 from /usr/include/gazebo-7/gazebo/msgs/time.pb.h:28,
                 from /usr/include/gazebo-7/gazebo/msgs/altimeter.pb.h:27,
                 from /usr/include/gazebo-7/gazebo/msgs/MessageTypes.hh:7,
                 from /usr/include/gazebo-7/gazebo/sensors/DepthCameraSensor.hh:23,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:17:
/usr/include/boost/smart_ptr/shared_ptr.hpp:848:42: note: candidate: template<class T, class U> boost::shared_ptr<X> boost::dynamic_pointer_cast(const boost::shared_ptr<U>&)
 template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
                                          ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:848:42: note:   template argument deduction/substitution failed:
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:51:67: note:   'gazebo::sensors::SensorPtr {aka std::shared_ptr<gazebo::sensors::Sensor>}' is not derived from 'const boost::shared_ptr<U>'
     if (boost::dynamic_pointer_cast<sensors::CameraSensor>(_sensor))
                                                                   ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:61:67: warning: 'unsigned int gazebo::sensors::MultiCameraSensor::GetCameraCount() const' is deprecated [-Wdeprecated-declarations]
   for (unsigned int i = 0; i < this->parentSensor->GetCameraCount(); ++i)
                                                                   ^
In file included from /tmp/gazebo_ros_pkgs-release/include/gazebo_plugins/MultiCameraPlugin.h:24:0,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:19:
/usr/include/gazebo-7/gazebo/sensors/MultiCameraSensor.hh:64:28: note: declared here
       public: unsigned int GetCameraCount() const GAZEBO_DEPRECATED(7.0);
                            ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:63:59: warning: 'gazebo::rendering::CameraPtr gazebo::sensors::MultiCameraSensor::GetCamera(unsigned int) const' is deprecated [-Wdeprecated-declarations]
     this->camera.push_back(this->parentSensor->GetCamera(i));
                                                           ^
In file included from /tmp/gazebo_ros_pkgs-release/include/gazebo_plugins/MultiCameraPlugin.h:24:0,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:19:
/usr/include/gazebo-7/gazebo/sensors/MultiCameraSensor.hh:75:36: note: declared here
       public: rendering::CameraPtr GetCamera(unsigned int _index) const
                                    ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:66:58: warning: 'virtual unsigned int gazebo::rendering::Camera::GetImageWidth() const' is deprecated [-Wdeprecated-declarations]
     this->width.push_back(this->camera[i]->GetImageWidth());
                                                          ^
In file included from /tmp/gazebo_ros_pkgs-release/include/gazebo_plugins/MultiCameraPlugin.h:25:0,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:19:
/usr/include/gazebo-7/gazebo/rendering/Camera.hh:345:36: note: declared here
       public: virtual unsigned int GetImageWidth() const GAZEBO_DEPRECATED(7.0);
                                    ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:67:60: warning: 'virtual unsigned int gazebo::rendering::Camera::GetImageHeight() const' is deprecated [-Wdeprecated-declarations]
     this->height.push_back(this->camera[i]->GetImageHeight());
                                                            ^
In file included from /tmp/gazebo_ros_pkgs-release/include/gazebo_plugins/MultiCameraPlugin.h:25:0,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:19:
/usr/include/gazebo-7/gazebo/rendering/Camera.hh:363:36: note: declared here
       public: virtual unsigned int GetImageHeight() const
                                    ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:68:58: warning: 'unsigned int gazebo::rendering::Camera::GetImageDepth() const' is deprecated [-Wdeprecated-declarations]
     this->depth.push_back(this->camera[i]->GetImageDepth());
                                                          ^
In file included from /tmp/gazebo_ros_pkgs-release/include/gazebo_plugins/MultiCameraPlugin.h:25:0,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:19:
/usr/include/gazebo-7/gazebo/rendering/Camera.hh:373:28: note: declared here
       public: unsigned int GetImageDepth() const GAZEBO_DEPRECATED(7.0);
                            ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:69:60: warning: 'std::__cxx11::string gazebo::rendering::Camera::GetImageFormat() const' is deprecated [-Wdeprecated-declarations]
     this->format.push_back(this->camera[i]->GetImageFormat());
                                                            ^
In file included from /tmp/gazebo_ros_pkgs-release/include/gazebo_plugins/MultiCameraPlugin.h:25:0,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:19:
/usr/include/gazebo-7/gazebo/rendering/Camera.hh:382:27: note: declared here
       public: std::string GetImageFormat() const GAZEBO_DEPRECATED(7.0);
                           ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:71:61: warning: 'gazebo::rendering::CameraPtr gazebo::sensors::MultiCameraSensor::GetCamera(unsigned int) const' is deprecated [-Wdeprecated-declarations]
     std::string cameraName = this->parentSensor->GetCamera(i)->GetName();
                                                             ^
In file included from /tmp/gazebo_ros_pkgs-release/include/gazebo_plugins/MultiCameraPlugin.h:24:0,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:19:
/usr/include/gazebo-7/gazebo/sensors/MultiCameraSensor.hh:75:36: note: declared here
       public: rendering::CameraPtr GetCamera(unsigned int _index) const
                                    ^
/tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:71:72: warning: 'std::__cxx11::string gazebo::rendering::Camera::GetName() const' is deprecated [-Wdeprecated-declarations]
     std::string cameraName = this->parentSensor->GetCamera(i)->GetName();
                                                                        ^
In file included from /tmp/gazebo_ros_pkgs-release/include/gazebo_plugins/MultiCameraPlugin.h:25:0,
                 from /tmp/gazebo_ros_pkgs-release/src/MultiCameraPlugin.cpp:19:
/usr/include/gazebo-7/gazebo/rendering/Camera.hh:602:27: note: declared here
       public: std::string GetName() const GAZEBO_DEPRECATED(7.0);
                           ^
CMakeFiles/MultiCameraPlugin.dir/build.make:62: recipe for target 'CMakeFiles/MultiCameraPlugin.dir/src/MultiCameraPlugin.cpp.o' failed
make[2]: *** [CMakeFiles/MultiCameraPlugin.dir/src/MultiCameraPlugin.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/MultiCameraPlugin.dir/all' failed
make[1]: *** [CMakeFiles/MultiCameraPlugin.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
[1]    12355 exit 2     LANG=C make -j1
LANG=C make -j1  20.42s user 0.24s system 99% cpu 20.686 total

Are there some obvious errors?

scpeters commented 8 years ago

It looks like you're using gazebo7. These compilation errors have been fixed in jade-devel but they haven't been released yet. Can you try the jade-devel branch?

senden9 commented 8 years ago

Hi, Thanks. I build the package from ros-simulation/gazebo_ros_pkgs@jade-devel. It works.