The following codes shouldn't be removed. Otherwise wheelsk would remain 0 when the parameters wheel_separationx and wheel_separationy exist.
bool lookup_wheel_separation = !(has_wheel_separation_x && has_wheel_separation_y);
bool lookup_wheel_radius = !controller_nh.getParam("wheel_radius", wheels_radius_);
// Avoid URDF requirement if wheel separation and radius already specified
if (lookup_wheel_separation || lookup_wheel_radius)
{
...
}
else
{
ROS_INFO_STREAM("Wheel seperation in X: " << wheel_separation_x_);
ROS_INFO_STREAM("Wheel seperation in Y: " << wheel_separation_y_);
// The seperation is the total distance between the wheels in X and Y.
wheels_k_ = (wheel_separation_x_ + wheel_separation_y_) / 2.0;
}
The following codes shouldn't be removed. Otherwise wheelsk would remain 0 when the parameters wheel_separationx and wheel_separationy exist.