-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
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
[gazebo_plugins] Add vacuum gripper plugin #389
[gazebo_plugins] Add vacuum gripper plugin #389
Conversation
Huge +1. This is so cool, @wkentaro! Well done generalizing the interface to a plugin as well. |
@@ -0,0 +1,161 @@ | |||
/* | |||
* Copyright (C) 2012-2014 Open Source Robotics Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This date could be updated to 2015-2016
closing and re-opening to trigger CI builds |
physics::Link_V links = models[i]->GetLinks(); | ||
for (size_t j = 0; j < links.size(); j++) { | ||
math::Pose link_pose = links[j]->GetWorldPose(); | ||
math::Pose diff = parent_pose - link_pose; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses the difference in link pose between the end effector and an object to determine whether they are close enough for force to be applied, but this depends on where the coordinate frames are defined. This might work for small objects, but it would be better to use collision checking (such as ray-casting) to determine the proximity to the actual surface, which won't be affected by how coordinate frames are defined.
Let me know if that didn't make sense and we can discuss further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now I realize that you said exactly this in the description of the pull request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I don't know how to get the distance between robot link and object collision for now.
Do you know how to do this? Or example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wada San,
This is a wonderful , plugin and very helpful. How can I do a specific modification, such as applying force to the links position (x,y,z) with an offset, (x+10,y,z)
This way, I can solve a specifc problem, that I have, i.e. to apply force at the corners of a large cylindrical object, rather than applying force on the center of the cylinder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should change the direction of the force.
https://github.com/ros-simulation/gazebo_ros_pkgs/blob/jade-devel/gazebo_plugins/src/gazebo_ros_vacuum_gripper.cpp#L210-L211
Currently the direction is from gripper link to object link.
if (norm_force > 20) { | ||
norm_force = 20; // max_force | ||
} | ||
math::Vector3 force = norm_force * diff.pos.Normalize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it also applies the force in every direction, when it should apply it in a single direction only. We would need a way to specify this direction to implement this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it should be.
Maybe, It will be not single direction but restricted.
This is a working plugin even if it isn't perfect, as you stated. I'll be ready to merge this if the copyright year is updated. We can create an issue to address the other comments I made (poses of coordinate frames instead of collision proximity, directionality of force, parameterization). |
I will create a new pull request to fix the problem with the copyright. Thanks to everyone for the pull request. |
Thanks. |
Thanks for the review. I watch the issue on #446 and will work for this when I have time. |
this plugin is not perfect:
rrbot_sample:
baxter_sample: