1. OpenSourceRoboticsFoundation
  2. Simulation
  3. gazebo

Commits

John Hsu  committed 3aea2c0

more gearbox integration

  • Participants
  • Parent commits af2e051
  • Branches ode_gearbox

Comments (0)

Files changed (3)

File gazebo/msgs/joint.proto

View file
     UNIVERSAL = 4;
     BALL      = 5;
     SCREW     = 6;
+    GEARBOX   = 7;
   }
 
   required string name           = 1;

File gazebo/physics/Base.hh

View file
                 /// \brief UniversalJoint type
                 UNIVERSAL_JOINT = 0x00001000,
                 /// \brief GearboxJoint type
-                GEARBOX_JOINT     = 0x00002000,
+                GEARBOX_JOINT   = 0x00002000,
 
                 /// \brief Shape type
                 SHAPE           = 0x00002000,

File gazebo/physics/Joint.cc

View file
     _msg.set_type(msgs::Joint::SCREW);
     _msg.add_angle(this->GetAngle(0).Radian());
   }
+  else if (this->HasType(Base::GEARBOX_JOINT))
+  {
+    _msg.set_type(msgs::Joint::GEARBOX);
+    _msg.add_angle(this->GetAngle(0).Radian());
+    _msg.add_angle(this->GetAngle(1).Radian());
+  }
   else if (this->HasType(Base::UNIVERSAL_JOINT))
   {
     _msg.set_type(msgs::Joint::UNIVERSAL);