ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

source code in kobuki.cpp ecl::Angle<double> Kobuki::getHeading() const { ecl::Angle<double> heading; // raw data angles are in hundredths of a degree, convert to radians. heading = (static_cast<double>(inertia.data.angle) / 100.0) * ecl::pi / 180.0; return ecl::wrap_angle(heading - heading_offset); }

double Kobuki::getAngularVelocity() const { // raw data angles are in hundredths of a degree, convert to radians. return (static_cast<double>(inertia.data.angle_rate) / 100.0) * ecl::pi / 180.0; }

click to hide/show revision 2
No.2 Revision

source code in kobuki.cpp kobuki.cpp

ecl::Angle<double> Kobuki::getHeading() const
{
  ecl::Angle<double> heading;
  // raw data angles are in hundredths of a degree, convert to radians.
  heading = (static_cast<double>(inertia.data.angle) / 100.0) * ecl::pi / 180.0;
  return ecl::wrap_angle(heading - heading_offset);
}

}

double Kobuki::getAngularVelocity() const { // raw data angles are in hundredths of a degree, convert to radians. return (static_cast<double>(inertia.data.angle_rate) / 100.0) * ecl::pi / 180.0; }

}