Note: This is the preferred method as mentioned in the previous tutorial. If you however want to use rosservice calls for configuration look here.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Computing grasps (configuration with web GUI)

Description: This tutorial shows how to use the compute grasps rosservice call of the ItemPick and BoxPick modules. The configuration of the load carrier and the region of interest however uses the web GUI.

Keywords: rc_visard, itempick, boxpick, rosservice, web GUI

Tutorial Level: BEGINNER

For the definition of the load carrier and region of interest, we will be using the rc_itempick module. The same arguments of the rc_itempick rosservice call requests apply to the rc_boxpick module unless explicitly indicated otherwise.

Goal

Learn how to calculate grasp poses, define load carriers and define regions of interest through the web GUI for the ItemPick and BoxPick modules.

Before we start

Make sure you have the rc_itempick_client_node or the rc_boxpick_client_node running and connected to your rc_visard. For the installation and setup see the previous tutorial

Defining a load carrier

Defining a load carrier named tutorial_carrier via the web GUI can be done by going to the correspondent pick module page on the Modules Tab. There you can find the following interface by clicking on "Add a new Load Carrier" in the section Load Carriers

Screenshot of the web GUI showing how to define a load carrier with the GUI

Defining the region of interest

A more interactive way of setting the region of interest is described in the managing regions of interest tutorial.

Setting it up using the web GUI gives you a direct feedback whether your load carrier is detected or not. If a load carrier is detected, the corresponding part of the point cloud will turn from grey to blue. Here, the ROI "tutorial_roi" is defined:

Screenshot of the web GUI showing how to define a region of interest with the GUI

In this case the camera is 0.83 m above the load carrier and the rotation is -25°. Length, width, and height were adjusted until the load carrier was properly detected.

Detecting the load carrier

After the load carrier has been configured, it is important to check that the pick module can detect the load carrier in the scene. The web GUI’s corresponding Pick panel offers a Try Out section for this purpose. One simply needs to specify the respective load carrier id ("tutorial_carrier" as defined above) and hit the Detect button.

Computing grasps inside a load carrier

A region of interest or a load carrier must be given in order to use the compute_grasps service of the Pick modules.

Once the load carrier is configured and detectable in the scene, the pick module can be used to compute grasps only for objects that are inside the bin. To this purpose, the additional argument load_carrier_id is added to the compute grasp service call. To compute grasps using ROS and our predefined load carrier and region of interest, the actual rosservice call (omitting all non-required fields) looks like this:

  • For the ItemPick module:

    $ rosservice call /rc_itempick/compute_grasps "pose_frame: 'camera'
    region_of_interest_id: 'tutorial_roi'
    load_carrier_id: 'tutorial_carrier'
    suction_surface_length: 0.02
    suction_surface_width: 0.02"
  • For the BoxPick module:

    $ rosservice call /rc_boxpick/compute_grasps "pose_frame: 'camera'
    region_of_interest_id: 'tutorial_roi'
    load_carrier_id: 'tutorial_carrier'
    item_models:
    - type: 'RECTANGLE'
      rectangle:
        min_dimensions: {x: 0.05, y: 0.05}
        max_dimensions: {x: 0.1, y: 0.15}
    suction_surface_length: 0.02
    suction_surface_width: 0.02"
    On the rc_boxpick module, the maximal and minimal dimensions of the box to detect have to be given.

This should give you a list of detected object surfaces. Their coordinates are specified in the given pose_frame, i.e., here in "camera". The default value of objects to detect is five. You can adjust it using the web GUI.

Troubleshooting and FAQ

For troubleshooting purposes look here

Wiki: rc_visard/Tutorials/Computing grasps (configuration with web GUI) (last edited 2019-07-05 10:39:21 by CarlosGarcia)