Simple superquadric-based grasping pose generator and renderer for iCub
git clone https://github.com/robotology/cardinal-points-grasp.git
cd cardinal-points-grasp
mkdir build && cd build
cmake ../
make install
This module is supposed to be used to generate and execute grasps on simple objects that lie on a surface (e.g. a table) in front of the robot. Given an object to grasp, the following actions get undertaken:
cardinal-points-grasp
interfaces with point-cloud-read to retrieve a point cloud (if the object is present in the scene).The module visualizes the point cloud, superquadric, and suitable grasps. The best grasp is highlighted by a larger indicator, and for each grasp the cost function is displayed in the format [primary_cost]_[secondary_cost]
.
Once all the modules are running and connected (the code comes with a yarpmanager
app to keep track of the connections) it can be interacted via RPC calls to /graspProcessor/cmd:rpc
. The available commands are as follows:
grasp_pose objectToGrasp hand [gaze]
triggers the synthesis of a suitable grasp without executing it. The grasp gets displayed on the visualizer. The optional parameter makes the robot fixate the object before acquiring its point cloud. grasp_pose_from_file objectToGrasp hand
same as previous command, but the point cloud gets parsed from a .off
(examples are provided with the code) and therefore there is no call to point-cloud-read
. grasp objectToGrasp hand [gaze]
generates a good grasp position/pose and executes it with the requested hand. The optional parameter makes the robot fixate the object before acquiring its point cloud. home
relays a homing command to IOL, moving the robot in the ready state.drop
the robot gently drops the object in front of him. All of these commands (at the moment) return an ack
if the module reaches the end of the procedure, otherwise nack
This module is made to interact with the Interactive Object Learning (IOL) suite of modules. It interacts with 'iolReachingCalibration' to compensate for the kinematic offset between the stereo rig and the robot root reference frame. When calibrating such module, make sure that the 2D centroid of the detected object is on top of the object, that is where the robot lands its hand for calibration. Otherwise, the calibration will consider points lower than the top end of the object, resulting in an undesired shift along the z-axis (robot reference frame) while executing any grasp.
--name moduleName
: start the module with the desired name (watch out for the port names!). --sim
: if you need to use the module with the iCub-SIM.--control-arms [both|left|right]
: let you specify which arm to control exclusively.yarp rpc /graspProcessor/rpc
>>grasp_pose Box right
Response: [ack]