Commits

Jeongseok Lee committed 0751143 Draft Merge

Merge with gazebo_3.0_dart_4.0

  • Participants
  • Parent commits d4608ed, 70f1857
  • Branches gazebo_3.0_dart_4.0_atlas_test

Comments (0)

Files changed (4)

File gazebo/physics/dart/DARTScrewJoint.cc

   this->SetThreadPitch(0, this->threadPitch);
 }
 
-/////////////////////////////////////////////////
+//////////////////////////////////////////////////
 void DARTScrewJoint::SetAnchor(unsigned int /*index*/,
     const math::Vector3 &/*_anchor*/)
 {
   if (_key  == "thread_pitch")
     return this->threadPitch;
   else
-    return DARTJoint::GetAttribute(_key, _index);
+    return DARTJoint::GetParam(_key, _index);
 }
 
 //////////////////////////////////////////////////

File gazebo/physics/dart/DARTScrewJoint.hh

       public: virtual double GetAttribute(const std::string &_key,
                   unsigned int _index) GAZEBO_DEPRECATED(3.0);
 
-      // Documentation inherited
+      /// \copydoc ScrewJoint::SetThreadPitch
       public: virtual void SetThreadPitch(unsigned int _index,
                   double _threadPitch);
 
-      ///  \copydoc ScrewJoint::SetThreadPitch
+      /// \copydoc ScrewJoint::SetThreadPitch
       public: virtual void SetThreadPitch(double _threadPitch);
 
-      // Documentation inherited
+      /// \copydoc ScrewJoint::GetThreadPitch
       public: virtual double GetThreadPitch(unsigned int _index);
 
-      ///  \copydoc ScrewJoint::GetThreadPitch
+      /// \copydoc ScrewJoint::GetThreadPitch
       public: virtual double GetThreadPitch();
 
       // Documentation inherited

File test/integration/CMakeLists.txt

   gz_physics.cc
   gz_world.cc
   imu.cc
+  joint_screw.cc
   joint_force_torque.cc
   joint_gearbox.cc
   joint_revolute.cc
-  joint_screw.cc
   joint_spawn.cc
   joint_test.cc
   joint_universal.cc

File test/integration/physics_link.cc

   // Set upward velocity and check
   math::Vector3 vel(0, 0, 1);
   link->SetLinearVel(vel);
+  gzmsg << "pos1: " << link->GetWorldPose() << std::endl;
+  gzmsg << "lvel1: " << link->GetWorldLinearVel() << std::endl;
+  gzmsg << "avel1: " << link->GetWorldAngularVel() << std::endl;
+  gzmsg << "lacc1: " << link->GetWorldLinearAccel() << std::endl;
+  gzmsg << "aacc1: " << link->GetWorldAngularAccel() << std::endl;
   world->Step(1);
+  gzmsg << "pos2: " << link->GetWorldPose() << std::endl;
+  gzmsg << "lvel2: " << link->GetWorldLinearVel() << std::endl;
+  gzmsg << "avel2: " << link->GetWorldAngularVel() << std::endl;
+  gzmsg << "lacc2: " << link->GetWorldLinearAccel() << std::endl;
+  gzmsg << "aacc2: " << link->GetWorldAngularAccel() << std::endl;
   EXPECT_EQ(vel, link->GetWorldLinearVel());
   EXPECT_EQ(math::Vector3::Zero, link->GetWorldAngularVel());
 
   // Step forward and check velocity again
-  world->Step(44);
+  world->Step(1);
   double time = world->GetSimTime().Double();
   EXPECT_EQ(vel, link->GetWorldLinearVel());
   EXPECT_EQ(math::Vector3::Zero, link->GetWorldAngularVel());
 
+  gzmsg << "vel: " << vel << std::endl;
+  gzmsg << "time: " << time << std::endl;
+  gzmsg << "pos0: " << pos0 << std::endl;
+
   // check position
   math::Vector3 pos = link->GetWorldPose().pos;
+  gzmsg << "pos: " << pos << std::endl;
   if (_physicsEngine.compare("bullet") == 0)
   {
     /// \TODO skipping bullet, see issue #1081