Control: tags 792992 + pending

Dear maintainer,

I've prepared an NMU for gazebo (versioned as 5.0.1+dfsg-2.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Cheers
-- 
Sebastian Ramacher
diff -Nru gazebo-5.0.1+dfsg/debian/changelog gazebo-5.0.1+dfsg/debian/changelog
--- gazebo-5.0.1+dfsg/debian/changelog	2015-05-31 07:59:19.000000000 +0200
+++ gazebo-5.0.1+dfsg/debian/changelog	2015-07-27 18:36:20.000000000 +0200
@@ -1,3 +1,11 @@
+gazebo (5.0.1+dfsg-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/patches/0010-bullet-2.83.patch: Apply upstream patch to fix build
+    against bullet 2.83. (Closes: #792992)
+
+ -- Sebastian Ramacher <sramac...@debian.org>  Mon, 27 Jul 2015 18:35:36 +0200
+
 gazebo (5.0.1+dfsg-2) unstable; urgency=medium
 
   * [208ddf2] Disable robot-player-dev support (see #787007)
diff -Nru gazebo-5.0.1+dfsg/debian/patches/0010-bullet-2.83.patch gazebo-5.0.1+dfsg/debian/patches/0010-bullet-2.83.patch
--- gazebo-5.0.1+dfsg/debian/patches/0010-bullet-2.83.patch	1970-01-01 01:00:00.000000000 +0100
+++ gazebo-5.0.1+dfsg/debian/patches/0010-bullet-2.83.patch	2015-07-27 18:29:51.000000000 +0200
@@ -0,0 +1,146 @@
+Description: Fix build against bullet 2.83
+Origin: upstream,
+ https://bitbucket.org/osrf/gazebo/commits/53bd6fdb10e57d8a70353dd02a48e2ff8a8c7f4b,
+ https://bitbucket.org/osrf/gazebo/commits/893065d361d16cd39dfe25716408e36543272e24
+Bug-Debian: https://bugs.debian.org/792992
+Last-Update: 2015-07-27
+
+--- gazebo-5.0.1+dfsg.orig/cmake/SearchForStuff.cmake
++++ gazebo-5.0.1+dfsg/cmake/SearchForStuff.cmake
+@@ -362,6 +362,10 @@ if (PKG_CONFIG_FOUND)
+     add_definitions( -DLIBBULLET_VERSION=0.0 )
+     BUILD_WARNING ("Bullet > 2.82 not found, for bullet physics engine option, please install libbullet2.82-dev.")
+   endif()
++  
++  if (BULLET_VERSION VERSION_GREATER 2.82)
++    add_definitions( -DLIBBULLET_VERSION_GT_282 )
++  endif()
+ 
+ else (PKG_CONFIG_FOUND)
+   set (BUILD_GAZEBO OFF CACHE INTERNAL "Build Gazebo" FORCE)
+--- gazebo-5.0.1+dfsg.orig/gazebo/physics/bullet/BulletHinge2Joint.cc
++++ gazebo-5.0.1+dfsg/gazebo/physics/bullet/BulletHinge2Joint.cc
+@@ -211,8 +211,12 @@ math::Angle BulletHinge2Joint::GetHighSt
+     return math::Angle();
+   }
+ 
+-  btRotationalLimitMotor *motor =
+-    this->bulletHinge2->getRotationalLimitMotor(_index);
++#ifndef LIBBULLET_VERSION_GT_282
++  btRotationalLimitMotor
++#else
++  btRotationalLimitMotor2
++#endif
++    *motor = this->bulletHinge2->getRotationalLimitMotor(_index);
+   if (motor)
+     return motor->m_hiLimit;
+ 
+@@ -229,8 +233,12 @@ math::Angle BulletHinge2Joint::GetLowSto
+     return math::Angle(0.0);
+   }
+ 
+-  btRotationalLimitMotor *motor =
+-    this->bulletHinge2->getRotationalLimitMotor(_index);
++#ifndef LIBBULLET_VERSION_GT_282
++  btRotationalLimitMotor
++#else
++  btRotationalLimitMotor2
++#endif
++  *motor = this->bulletHinge2->getRotationalLimitMotor(_index);
+   if (motor)
+     return motor->m_loLimit;
+ 
+--- gazebo-5.0.1+dfsg.orig/gazebo/physics/bullet/BulletHingeJoint.cc
++++ gazebo-5.0.1+dfsg/gazebo/physics/bullet/BulletHingeJoint.cc
+@@ -105,7 +105,11 @@ void BulletHingeJoint::Init()
+   // If both links exist, then create a joint between the two links.
+   if (bulletChildLink && bulletParentLink)
+   {
++#ifdef LIBBULLET_VERSION_GT_282
++    this->bulletHinge = new btHingeAccumulatedAngleConstraint(
++#else
+     this->bulletHinge = new btHingeConstraint(
++#endif
+         *(bulletChildLink->GetBulletLink()),
+         *(bulletParentLink->GetBulletLink()),
+         BulletTypes::ConvertVector3(pivotChild),
+@@ -117,7 +121,11 @@ void BulletHingeJoint::Init()
+   // and the world.
+   else if (bulletChildLink)
+   {
++#ifdef LIBBULLET_VERSION_GT_282
++    this->bulletHinge = new btHingeAccumulatedAngleConstraint(
++#else
+     this->bulletHinge = new btHingeConstraint(
++#endif
+         *(bulletChildLink->GetBulletLink()),
+         BulletTypes::ConvertVector3(pivotChild),
+         BulletTypes::ConvertVector3(axisChild));
+@@ -126,7 +134,11 @@ void BulletHingeJoint::Init()
+   // and the world.
+   else if (bulletParentLink)
+   {
++#ifdef LIBBULLET_VERSION_GT_282
++    this->bulletHinge = new btHingeAccumulatedAngleConstraint(
++#else
+     this->bulletHinge = new btHingeConstraint(
++#endif
+         *(bulletParentLink->GetBulletLink()),
+         BulletTypes::ConvertVector3(pivotParent),
+         BulletTypes::ConvertVector3(axisParent));
+@@ -219,7 +231,18 @@ math::Angle BulletHingeJoint::GetAngleIm
+ {
+   math::Angle result;
+   if (this->bulletHinge)
+-    result = this->bulletHinge->getHingeAngle() - this->angleOffset;
++  {
++#ifdef LIBBULLET_VERSION_GT_282
++    btHingeAccumulatedAngleConstraint* hinge =
++      static_cast<btHingeAccumulatedAngleConstraint*>(this->bulletHinge);
++    if (hinge)
++      result = hinge->getAccumulatedHingeAngle();
++    else
++#else
++      result = this->bulletHinge->getHingeAngle();
++#endif
++    result -= this->angleOffset;
++  }
+   return result;
+ }
+ 
+--- gazebo-5.0.1+dfsg.orig/test/integration/joint_revolute.cc
++++ gazebo-5.0.1+dfsg/test/integration/joint_revolute.cc
+@@ -16,6 +16,7 @@
+ */
+ 
+ #include "ServerFixture.hh"
++#include "gazebo/gazebo_config.h"
+ #include "gazebo/physics/physics.hh"
+ #include "SimplePendulumIntegrator.hh"
+ #include "helper_physics_generator.hh"
+@@ -97,12 +98,15 @@ void JointTestRevolute::PendulumEnergy(c
+ ////////////////////////////////////////////////////////////
+ void JointTestRevolute::WrapAngle(const std::string &_physicsEngine)
+ {
+-  /// \TODO: bullet hinge angles are wrapped (#1074)
++#ifndef LIBBULLET_VERSION_GT_282
++  /// bullet hinge angles are wrapped for 2.82 and less
+   if (_physicsEngine == "bullet")
+   {
+-    gzerr << "Aborting test for bullet, see issues #1074.\n";
++    gzerr << "Aborting test for bullet, angle wrapping requires bullet 2.83"
++          << std::endl;
+     return;
+   }
++#endif
+ 
+   // Load an empty world
+   Load("worlds/empty.world", true, _physicsEngine);
+@@ -124,6 +128,7 @@ void JointTestRevolute::WrapAngle(const
+     ASSERT_TRUE(joint != NULL);
+ 
+     // set velocity to 2 pi rad/s and step forward 1.5 seconds.
++    // angle should reach 3 pi rad.
+     double vel = 2*M_PI;
+     unsigned int stepSize = 50;
+     unsigned int stepCount = 30;
diff -Nru gazebo-5.0.1+dfsg/debian/patches/series gazebo-5.0.1+dfsg/debian/patches/series
--- gazebo-5.0.1+dfsg/debian/patches/series	2015-03-25 21:06:37.000000000 +0100
+++ gazebo-5.0.1+dfsg/debian/patches/series	2015-07-27 18:30:04.000000000 +0200
@@ -6,3 +6,4 @@
 0006-remove-maiden-font.patch
 0008-arial-font-removed-in-dfsg.patch
 0009-backport-model-path-fix.patch
+0010-bullet-2.83.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to