software:cram:tutorials:pick-and-place-primer
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
software:cram:tutorials:pick-and-place-primer [2013/03/28 09:26] – winkler | software:cram:tutorials:pick-and-place-primer [2016/05/19 09:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 11: | Line 11: | ||
==== Prerequisites ==== | ==== Prerequisites ==== | ||
- | It is assumed that you successfully completed the [[software: | + | It is assumed that you successfully completed the [[software: |
==== Getting the Code ==== | ==== Getting the Code ==== | ||
Line 71: | Line 71: | ||
This will start Gazebo, spawn a PR2 robot and a table with two mugs on it. | This will start Gazebo, spawn a PR2 robot and a table with two mugs on it. | ||
{{ : | {{ : | ||
- | The PR2 and the mugs are dynamic objects while the table is fixed to the ground, i.e. you can't move it. | + | The PR2 and the mugs are dynamic objects while the table is fixed to the ground, i.e. you can't move it. (If you encounter problems with parts of the simulation not showing up correctly, see [[pick-and-place-primer# |
In yet another terminal, open rviz: | In yet another terminal, open rviz: | ||
<code bash> | <code bash> | ||
Line 122: | Line 123: | ||
{{ : | {{ : | ||
- | This display type can visualize ROS messages of type '' | + | This display type can visualize ROS messages of type '' |
{{ : | {{ : | ||
Line 158: | Line 159: | ||
<code lisp> | <code lisp> | ||
LESSON01> | LESSON01> | ||
+ | (move-away-arms) | ||
(with-process-modules | (with-process-modules | ||
(with-designators | (with-designators | ||
Line 179: | Line 181: | ||
<code lisp> | <code lisp> | ||
LESSON01> | LESSON01> | ||
+ | (move-away-arms) | ||
(with-process-modules | (with-process-modules | ||
(with-designators | (with-designators | ||
Line 202: | Line 205: | ||
The PR2 will drive around and will try to get into a suitable position for grasping. It then will try to grasp the object. | The PR2 will drive around and will try to get into a suitable position for grasping. It then will try to grasp the object. | ||
+ | Once the object is being grasped, the robot will execute a motion to achieve the following grasp and carrying pose: | ||
+ | |||
+ | {{ : | ||
+ | {{ : | ||
+ | |||
+ | === Handle-based grasping === | ||
+ | The fact that the PR2 grasps the mug on it's handle results from two things: | ||
+ | * An extensive reasoning machinery that checks for the existance of handles on an object to grasp, plus an algorithm that calculates the respective grasp poses | ||
+ | * The definition of the object handle in the source code | ||
+ | |||
+ | The system relies on information given to it about handles. This information if thought to be stored in an external knowledge source such as [[software: | ||
+ | |||
+ | The important part in the source code for handle definition is found here: | ||
+ | <code lisp> | ||
+ | (with-designators | ||
+ | ((handle-loc (location | ||
+ | `((desig-props: | ||
+ | , | ||
+ | | ||
+ | -0.12 0.0 0.07) | ||
+ | | ||
+ | :ax (/ pi 2))))))) | ||
+ | | ||
+ | `((desig-props: | ||
+ | (desig-props: | ||
+ | (mug (object `((desig-props: | ||
+ | (desig-props: | ||
+ | </ | ||
+ | |||
+ | The variable '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | |||
+ | ==== Completing the Pick and Place Task ==== | ||
+ | To make the robot execute the task at hand, the function '' | ||
+ | <code lisp> | ||
+ | LESSON01> | ||
+ | </ | ||
+ | |||
+ | During the runtime of this function, the robot will try to get hold of the object (i.e., pick it up) and then put it down on a different spot of the table. | ||
+ | |||
+ | Since finding a good spot to put the object down on the table isn't that easy, it is possible that the PR2 will drive around a bit and try different spots before it finds a suitable location. | ||
+ | |||
+ | For putting down the object, the same techniques with respect to location costmaps are used as in the pick-up part of this tutorial. | ||
+ | |||
+ | ==== Pitfalls and known issues ==== | ||
+ | In case the table doesn' | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Just close the Gazebo window and restart the client, using: | ||
+ | <code bash> | ||
+ | $ `rospack find gazebo`/ | ||
+ | </ | ||
+ | The (simulated) table is physically there, but the visual is missing. The simulation could go on without it, but for the scenery' | ||
- | ==== Open Topics / Unfinished Sections ==== | + | --- // |
- | Parts missing from this lesson: | + | |
- | * Handle based grasping | + | |
- | * Handle definition in the object (mug, in this example) | + | |
- | * Pictures and logs from successful grasps | + | |
- | --- // | + |
software/cram/tutorials/pick-and-place-primer.1364462808.txt.gz · Last modified: 2016/05/19 09:18 (external edit)