5 #define TAU (2.0 * M_PI)
14 const double delta = (stamp -
stamp_).toSec();
19 const double v_avg = (v_left + v_right) / 2;
21 if (v_right == v_left)
44 ret.
x_ = cos(w * delta) * (
x_ - icc_x) - sin(w * delta) * (
y_ - icc_y) + icc_x;
45 ret.
y_ = sin(w * delta) * (
x_ - icc_x) + cos(w * delta) * (
y_ - icc_y) + icc_y;
87 return Odom(stamp, wheel_separation, wheel_radius);
92 , wheel_separation_(wheel_separation)
93 , wheel_radius_(wheel_radius)
97 , heading_offset_(0.0)
106 return o <<
"Odom {" << std::endl
107 <<
" vel_x (m/s): " << odom.
getVelX() << std::endl
108 <<
" vel_y (m/s): " << odom.
getVelY() << std::endl
109 <<
" vel_heading (rad/s): " << odom.
getVelHeading() << std::endl
110 <<
" x (m): " << odom.
getX() << std::endl
111 <<
" y (m): " << odom.
getY() << std::endl
112 <<
" heading (rad): " << odom.
getHeading() << std::endl