update
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <steer_drive_controller/odometry.h>
|
||||
|
||||
#include <ros/ros.h>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
namespace steer_drive_controller
|
||||
@@ -86,10 +86,9 @@ namespace steer_drive_controller
|
||||
rear_wheel_old_pos_ = rear_wheel_cur_pos;
|
||||
|
||||
/// Compute linear and angular diff:
|
||||
const double linear = rear_wheel_est_vel * cos(front_steer_pos);//(right_wheel_est_vel + left_wheel_est_vel) * 0.5;
|
||||
//const double angular = (right_wheel_est_vel - left_wheel_est_vel) / wheel_separation_w_;
|
||||
const double linear = rear_wheel_est_vel * cos(front_steer_pos);
|
||||
const double angular = tan(front_steer_pos) * linear / wheel_separation_h_;
|
||||
|
||||
// ROS_INFO("front_steer_pos: %.3f tan(front_steer_pos) %.3f, angular %.3f", front_steer_pos, tan(front_steer_pos), angular);
|
||||
/// Integrate odometry:
|
||||
integrate_fun_(linear, angular);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user