Skip to content
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

[ros2] Port vacuum gripper to ROS2 #960

Merged
merged 7 commits into from Aug 14, 2019

Conversation

@shiveshkhaitan
Copy link

commented Jul 18, 2019

Port gazebo_ros_vacuum_gripper plugin to ROS2.

Example usage:

    <plugin name='vacuum_gripper' filename='libgazebo_ros_vacuum_gripper.so'>
      <ros>
        <namespace>/demo</namespace>
        <argument>switch:=custom_switch</argument>
        <argument>grasping:=custom_grasping</argument>
      </ros>

      <!-- Link associated with gripper -->
      <link_name>link</link_name>

      <!-- Max and min distance to attract entities -->
      <max_distance>10.0</max_distance>
      <min_distance>0.01</min_distance>

      <!-- Max force applied while attracting entities -->
      <max_force>2</max_force>

      <!-- List of entities to be not attracted by the gripper -->
      <fixed>ground_plane</fixed>
      <fixed>wall</fixed>

    </plugin>

Migration guide at ROS 2 Migration: Vacuum Gripper

@chapulina chapulina self-requested a review Jul 18, 2019

@chapulina chapulina added the ros2 label Jul 18, 2019

@chapulina

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

@osrf-jenkins run tests please

@chapulina
Copy link
Contributor

left a comment

I was testing the demo world, and it behaves quite strangely. This is just speeding up the simulation (on left panel, set Physics -> real time update rate to 0 to run as fas as possible). See how the gripper pulls the models, but then throws them away. And things start getting real fun as the gripper is moved:

vacuum_gripper

I think the problem comes from the ROS 1 plugin, so it's not introduced by this pull request. Sorry I didn't know of those problems beforehand 😕


The ARIAC competition wrote their own vacuum gripper plugin to work around the limitations of the plugin in gazebo_ros_pkgs. They have a pure gazebo plugin and a ROS wrapper around it. That plugin has been used on the competition successfully many times, so I think we can trust that implementation better than the one here.

How do you feel about porting that plugin to gazebo_ros_pkgs instead? We can keep the "pure gazebo + ROS wrapper" approach, similar to what you did for the multicamera.

I think it's also valid for us to decline this PR, and mark the vacuum gripper as deprecated for now, since it doesn't really work. And in the future, if users come looking for it, someone else could port a better version like ARIAC's to work here.

@shiveshkhaitan

This comment has been minimized.

Copy link
Author

commented Aug 9, 2019

I have updated this plugin itself. Please see if it solves the problem.

@chapulina

This comment has been minimized.

Copy link
Contributor

commented Aug 12, 2019

I have updated this plugin itself. Please see if it solves the problem.

Nothing moves in the demo world for me, does it move for you?

I saw you removed the min and max distances. I'm ok removing the min, but without the max, it means that the gripper will be applying tiny forces to objects really far away, which I'm not sure we want. Also, using SetForce instead of AddForce will probably cancel gravity and other forces.

@shiveshkhaitan

This comment has been minimized.

Copy link
Author

commented Aug 13, 2019

Nothing moves in the demo world for me, does it move for you?

Did you try switching on the gripper
ros2 service call /demo/switch_demo std_srvs/srv/SetBool "{data: True}"

@chapulina

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

Did you try switching on the gripper

Haha no I didn't. Sorry about that, I just needed some ☕️ . It's working for me! Looks more like a magnet though 😄

magnets

Did you give some thought to the max distance? Right now the demo gripper can pull spheres from any distance. I placed one of the spheres 100m away and it was gripped.

It would also be interesting to keep using AddForce if possible, so the gripper reacts differently according to other forces in the world.

Add option to set max_distance
Change SetForce -> Add Force
@chapulina
Copy link
Contributor

left a comment

Works for me, thanks for fixing it! I removed max_force and min_distance from the wiki page:

@chapulina chapulina merged commit b29b355 into ros-simulation:dashing Aug 14, 2019

2 checks passed

Dpr__gazebo_ros_pkgs__ubuntu_bionic_amd64 Build finished.
Details
ros2_gazebo_pkgs-ci-pr_any_dashing-bionic-amd64 Build finished.
Details
shiveshkhaitan added a commit to shiveshkhaitan/gazebo_ros_pkgs that referenced this pull request Aug 15, 2019
[ros2] Port vacuum gripper to ROS2 (ros-simulation#960)
* [ros2] Port vacuum gripper to ROS2

* Fix gripper forces

* Add option to set max_distance

Change SetForce -> Add Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.