ridgeback / ridgeback

Common packages for Ridgeback.
BSD 3-Clause "New" or "Revised" License
28 stars 56 forks source link

assign wheels_k_ with wheel_separation_x_ and wheel_separation_y_ #35

Open onionsflying opened 4 years ago

onionsflying commented 4 years ago

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;
  }