From 730d0ade150aedde1164388bdaf3d628527ad316 Mon Sep 17 00:00:00 2001 From: Johannes Mey <johannes.mey@tu-dresden.de> Date: Tue, 12 Jan 2021 18:59:37 +0100 Subject: [PATCH] fix for gazebo11 --- gazebo_grasp_plugin/CMakeLists.txt | 1 + gazebo_state_plugins/CMakeLists.txt | 1 + gazebo_state_plugins/src/GazeboObjectInfo.cpp | 2 +- gazebo_version_helpers/CMakeLists.txt | 1 + .../include/gazebo_version_helpers/GazeboVersionHelpers.h | 4 ++-- gazebo_version_helpers/src/GazeboVersionHelpers.cpp | 2 +- gazebo_world_plugin_loader/CMakeLists.txt | 1 + 7 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gazebo_grasp_plugin/CMakeLists.txt b/gazebo_grasp_plugin/CMakeLists.txt index c298aba..587e582 100644 --- a/gazebo_grasp_plugin/CMakeLists.txt +++ b/gazebo_grasp_plugin/CMakeLists.txt @@ -55,6 +55,7 @@ endif() # include_directories(include) include_directories( include + /usr/include/ffmpeg ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS} ) diff --git a/gazebo_state_plugins/CMakeLists.txt b/gazebo_state_plugins/CMakeLists.txt index f20fc49..bb381a4 100644 --- a/gazebo_state_plugins/CMakeLists.txt +++ b/gazebo_state_plugins/CMakeLists.txt @@ -64,6 +64,7 @@ endif() # include_directories(include) include_directories( include + /usr/include/ffmpeg ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS} ) diff --git a/gazebo_state_plugins/src/GazeboObjectInfo.cpp b/gazebo_state_plugins/src/GazeboObjectInfo.cpp index 30f38db..4699cfc 100644 --- a/gazebo_state_plugins/src/GazeboObjectInfo.cpp +++ b/gazebo_state_plugins/src/GazeboObjectInfo.cpp @@ -157,7 +157,7 @@ shape_msgs::SolidPrimitive * GazeboObjectInfo::getSolidPrimitive(physics::Collis else { ROS_WARN("shape type %i of collision %s not supported. Using bounding box instead. ", c->GetShapeType(),c->GetName().c_str()); - gz_math::Box box = GetBoundingBox(*c); + gz_math::AxisAlignedBox box = GetBoundingBox(*c); GzVector3 bb = GetBoundingBoxDimensions(box); if ((GetX(bb) < 1e-05) || (GetY(bb) < 1e-05) || (GetZ(bb) < 1e-05)){ ROS_WARN_ONCE("Skipping coll %s because its bounding box is flat",c->GetName().c_str()); diff --git a/gazebo_version_helpers/CMakeLists.txt b/gazebo_version_helpers/CMakeLists.txt index 7e25ed5..bebef87 100644 --- a/gazebo_version_helpers/CMakeLists.txt +++ b/gazebo_version_helpers/CMakeLists.txt @@ -50,6 +50,7 @@ endif() ## Your package locations should be listed before other locations include_directories( include + /usr/include/ffmpeg ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS} ) diff --git a/gazebo_version_helpers/include/gazebo_version_helpers/GazeboVersionHelpers.h b/gazebo_version_helpers/include/gazebo_version_helpers/GazeboVersionHelpers.h index 5a8f359..629a116 100644 --- a/gazebo_version_helpers/include/gazebo_version_helpers/GazeboVersionHelpers.h +++ b/gazebo_version_helpers/include/gazebo_version_helpers/GazeboVersionHelpers.h @@ -116,7 +116,7 @@ std::string GetName(const T& t) /////////////////////////////////////////////////////////////////////////////// template<typename T> -gz_math::Box GetBoundingBox(const T &t) +gz_math::AxisAlignedBox GetBoundingBox(const T &t) { #if GAZEBO_MAJOR_VERSION >= 8 return t.BoundingBox(); @@ -126,7 +126,7 @@ gz_math::Box GetBoundingBox(const T &t) } /////////////////////////////////////////////////////////////////////////////// -GzVector3 GetBoundingBoxDimensions(const gz_math::Box &box); +GzVector3 GetBoundingBoxDimensions(const gz_math::AxisAlignedBox &box); /////////////////////////////////////////////////////////////////////////////// template<typename T> diff --git a/gazebo_version_helpers/src/GazeboVersionHelpers.cpp b/gazebo_version_helpers/src/GazeboVersionHelpers.cpp index e0ef898..ac2c561 100644 --- a/gazebo_version_helpers/src/GazeboVersionHelpers.cpp +++ b/gazebo_version_helpers/src/GazeboVersionHelpers.cpp @@ -314,7 +314,7 @@ gazebo::physics::Model_V gazebo::GetModels( } /////////////////////////////////////////////////////////////////////////////// -gazebo::GzVector3 gazebo::GetBoundingBoxDimensions(const gz_math::Box &box) +gazebo::GzVector3 gazebo::GetBoundingBoxDimensions(const gz_math::AxisAlignedBox &box) { #if GAZEBO_MAJOR_VERSION >= 8 GzVector3 bb(box.XLength(), box.YLength(), box.ZLength()); diff --git a/gazebo_world_plugin_loader/CMakeLists.txt b/gazebo_world_plugin_loader/CMakeLists.txt index 962a331..0d2ea3a 100644 --- a/gazebo_world_plugin_loader/CMakeLists.txt +++ b/gazebo_world_plugin_loader/CMakeLists.txt @@ -55,6 +55,7 @@ endif() # include_directories(include) include_directories( include + /usr/include/ffmpeg ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS} ) -- GitLab