ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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; }
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;
}}