Files
gentoo/dev-ros/gazebo_plugins/files/gazebo7-3.patch
Alexis Ballier c1d3b78f6f dev-ros/gazebo_plugins: backport upstream fixes to build with gazebo7
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
2016-01-28 21:25:43 +01:00

31 lines
1.1 KiB
Diff

commit ce0ab101b272c4933f31945e2edaf215c4342772
Author: Steven Peters <scpeters@osrfoundation.org>
Date: Wed Jan 13 11:30:57 2016 -0800
Fix compiler error with SetHFOV
In gazebo7, the rendering::Camera::SetHFOV function
is overloaded with a potential for ambiguity,
as reported in the following issue:
https://bitbucket.org/osrf/gazebo/issues/1830
This fixes the build by explicitly defining the
Angle type.
diff --git a/gazebo_plugins/src/gazebo_ros_camera_utils.cpp b/gazebo_plugins/src/gazebo_ros_camera_utils.cpp
index 2129b65..4574e8d 100644
--- a/gazebo_plugins/src/gazebo_ros_camera_utils.cpp
+++ b/gazebo_plugins/src/gazebo_ros_camera_utils.cpp
@@ -360,7 +360,11 @@ void GazeboRosCameraUtils::LoadThread()
// Set Horizontal Field of View
void GazeboRosCameraUtils::SetHFOV(const std_msgs::Float64::ConstPtr& hfov)
{
- this->camera_->SetHFOV(hfov->data);
+#if GAZEBO_MAJOR_VERSION >= 7
+ this->camera_->SetHFOV(ignition::math::Angle(hfov->data));
+#else
+ this->camera_->SetHFOV(gazebo::math::Angle(hfov->data));
+#endif
}
////////////////////////////////////////////////////////////////////////////////