We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description
gazebo_ros_ackermann_drive should warn users if the wheel radius is an invalid value.
gazebo_ros_ackermann_drive
The plugin finds the radius by calling GetRadius() on sphere and cylinder objects but this fails silently if the wheel geometry is a mesh.
Screenshots The relevant parts of the code is:
impl_->wheel_radius_ = impl_->CollisionRadius( impl_->joints_[GazeboRosAckermannDrivePrivate::REAR_RIGHT]->GetChild()->GetCollision(id));
double GazeboRosAckermannDrivePrivate::CollisionRadius(const gazebo::physics::CollisionPtr & _coll) { if (!_coll || !(_coll->GetShape())) { return 0; } if (_coll->GetShape()->HasType(gazebo::physics::Base::CYLINDER_SHAPE)) { gazebo::physics::CylinderShape * cyl = dynamic_cast<gazebo::physics::CylinderShape *>(_coll->GetShape().get()); return cyl->GetRadius(); } else if (_coll->GetShape()->HasType(gazebo::physics::Base::SPHERE_SHAPE)) { gazebo::physics::SphereShape * sph = dynamic_cast<gazebo::physics::SphereShape *>(_coll->GetShape().get()); return sph->GetRadius(); } return 0; }
The return value from the CollisionRadius() method is never checked.
Expected behavior
The limitation should be documented, and the plugin should output an error if impl_->wheel_radius_ is 0 or negative.
impl_->wheel_radius_
Additional context I'll attempt to make a pull request to fix it soon
The text was updated successfully, but these errors were encountered:
@SivertHavso I have opened this PR to address the problem.
Sorry, something went wrong.
No branches or pull requests
Description
gazebo_ros_ackermann_drive
should warn users if the wheel radius is an invalid value.The plugin finds the radius by calling GetRadius() on sphere and cylinder objects but this fails silently if the wheel geometry is a mesh.
Screenshots
The relevant parts of the code is:
The return value from the CollisionRadius() method is never checked.
Expected behavior
The limitation should be documented, and the plugin should output an error if
impl_->wheel_radius_
is 0 or negative.Additional context
I'll attempt to make a pull request to fix it soon
The text was updated successfully, but these errors were encountered: