Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:demo:fetch_and_place_edited [2020/06/19 11:24] – [Spawning Objects] vanessatutorials:demo:fetch_and_place_edited [2020/06/19 11:54] (current) – [Credits] vanessa
Line 331: Line 331:
 {{ :tutorials:demo:weisswurst.png?600 |}} {{ :tutorials:demo:weisswurst.png?600 |}}
  
 +FIXME  //**Ending: Spawning Objects**//
 ==== Perceiving Objects ==== ==== Perceiving Objects ====
 +
 +FIXME  //**Begin: Perceiving Objects**// Next Task. Perceive the object that you spawned in the task before (you also have to move the robot for that).
  
 The objective of this tutorial would be to enable you to write methods to pick an object (for us, the bottle) from one place and transport and place it somewhere else. But before the robot can pick up anything, it has to know where the object is, which is enabled by the cameras placed on the robot. We have to explicitly command the robot to perceive a bottle to find it.  The objective of this tutorial would be to enable you to write methods to pick an object (for us, the bottle) from one place and transport and place it somewhere else. But before the robot can pick up anything, it has to know where the object is, which is enabled by the cameras placed on the robot. We have to explicitly command the robot to perceive a bottle to find it. 
Line 428: Line 431:
 ''setf'' is used to assign a value to a variable. ''setf'' is used to assign a value to a variable.
  
 +FIXME  //**Ending: Perceiving Objects**//
 ==== Picking up Objects ==== ==== Picking up Objects ====
 +
 +FIXME  //**Begin: Picking up and Placing Objects**// Next task. Picking and Placing chapter is one Tutorial itself. Don't seperate those two, since they work only together. Add more explanation to the describing text for this chapter. Exercise: Pick up your spawned object and try it with the other hand as well. If Placing does not work, provide a way to release the object from the gripper and maybe also despawning the object. Exercise: Pick up your spawned object and try it with the other hand as well.
 +
 Once the object has been found, picking up is very straightforward: Once the object has been found, picking up is very straightforward:
 <code lisp> <code lisp>
Line 449: Line 456:
  
 ==== Placing the object ==== ==== Placing the object ====
 +
 Now that the robot has the object in its gripper, the next task is to place the object in the destination. Let us use the dining area counter on the left side as our destination. So, to place the bottle the robot has to do two things - drive with the base to a location from where it can place the bottle on the dining table, and move the arm to place the object down.  Now that the robot has the object in its gripper, the next task is to place the object in the destination. Let us use the dining area counter on the left side as our destination. So, to place the bottle the robot has to do two things - drive with the base to a location from where it can place the bottle on the dining table, and move the arm to place the object down. 
  
Line 485: Line 493:
 The robot has finally placed the object in the destination.  The robot has finally placed the object in the destination. 
 {{ :tutorials:demo:placed_at_dest.png?600 |}} {{ :tutorials:demo:placed_at_dest.png?600 |}}
 +FIXME  //**Ending: Picking and Placing the object**//
 ==== Simple Plan ==== ==== Simple Plan ====
 +FIXME //** Begin: Simple Plan**//
 +Now for the Chapter 'Simple Plan' i think that the “after that you can copy-paste the following code into the file:” contains a way to long code for just copy and paste. The code is explained afterward, but it would be good to provide more of a learning effect here e.g. Writing the wrapper for the plan and then put something like ;;your code goes here for navigation, within the plan and the people have to add the actions they've learned from above sections. Or still copy and paste the code, but use it for your own object.
 +
  
-Even though we have achieved the goal we had set, the entire process would have felt a little tedious, especially if you want to perform it multiple times, when you have made a mistake, etc. So let's bundle what we have done so far into a single method called, ''move-bottle'' which can easily be reused. To save your work so that the changes you make are still available even if you exit Emacs, we will save the code for it in a file.+Even though we have achieved the goal we had set, the entire process would have felt a little tedious, especially if you want to perform it multiple times, when you have made a mistake, etc. So let's bundle what we have done so far into a single method called, ''move-bottle'' which can easily be reused. To save your work so that the changes you make are still available even if you exit Emacs, we will save the code for it in a file. 
  
 First let's open the file which we will write into. Press ''Ctrl-x Ctrl-f'' to open the "Find file" dialog on the bottom of Emacs. The folder will be set to "~/<workspace>/src/cram/cram_tutorials/cram_pick_place_tutorial/" by default (This is because it is the path of the project we loaded). We have already saved a file called "pick-and-place.lisp" under the src folder of this project as a workspace for you. So open the file by completing the folder name as below and pressing Enter. First let's open the file which we will write into. Press ''Ctrl-x Ctrl-f'' to open the "Find file" dialog on the bottom of Emacs. The folder will be set to "~/<workspace>/src/cram/cram_tutorials/cram_pick_place_tutorial/" by default (This is because it is the path of the project we loaded). We have already saved a file called "pick-and-place.lisp" under the src folder of this project as a workspace for you. So open the file by completing the folder name as below and pressing Enter.
Line 584: Line 595:
  
 Congratulations! You have just written your first rudimentary plan to pick and place a bottle. Congratulations! You have just written your first rudimentary plan to pick and place a bottle.
 +
 +FIXME //** Ending: Simple Plan**//
  
 ===== Recovering from Failures ===== ===== Recovering from Failures =====
 +FIXME //** Begin: Recovering from Failures**// Next Lecture. Make an explanation video (How To). 
 +
  
 The previous example worked perfectly because we knew and provided the exact coordinates to look for the bottle. This is hardly true for the real-life scenario, especially since we are dealing with a kitchen environment, which is far from being precise compared to a factory floor. What would happen if the bottle was moved a little bit to the right of its previous spawn position? For this, let's change the arguments to reflect this on our method, and let's see what happens. The previous example worked perfectly because we knew and provided the exact coordinates to look for the bottle. This is hardly true for the real-life scenario, especially since we are dealing with a kitchen environment, which is far from being precise compared to a factory floor. What would happen if the bottle was moved a little bit to the right of its previous spawn position? For this, let's change the arguments to reflect this on our method, and let's see what happens.
Line 753: Line 768:
 {{:tutorials:intermediate:btw-tut-found-bottle-again.png?800|}} {{:tutorials:intermediate:btw-tut-found-bottle-again.png?800|}}
  
 +
 +FIXME //**Ending: Recovering from Failures**// 
 ==== Handling More Failures ==== ==== Handling More Failures ====
 +
 +FIXME //** Begin: Handling More Failures**// Next Exercise Motivation. 
  
 Everything is good so far, even though by design, let's call this a lucky coincidence. For the robot, knowing which arm to use to pick up the bottle is not always enough. There are many positions with which we can grasp objects - from the object's front, back, left, right, etc. So what decides the "side" (left, right, top, bottom) of the object? As you might have guessed, these are defined for objects according to the coordinate reference frame of each object. Every object spawned in the bullet world has its own coordinate axes - even rotationally symmetric objects like the bottle here. (Red:+ve x, Green: +ve y, Blue: +ve z axes)  Everything is good so far, even though by design, let's call this a lucky coincidence. For the robot, knowing which arm to use to pick up the bottle is not always enough. There are many positions with which we can grasp objects - from the object's front, back, left, right, etc. So what decides the "side" (left, right, top, bottom) of the object? As you might have guessed, these are defined for objects according to the coordinate reference frame of each object. Every object spawned in the bullet world has its own coordinate axes - even rotationally symmetric objects like the bottle here. (Red:+ve x, Green: +ve y, Blue: +ve z axes) 
Line 948: Line 967:
  
  
 +FIXME //** Ending: Handling More Failures**// 
 ===== Visualizing Coordinates ===== ===== Visualizing Coordinates =====
 +FIXME //** Begin: Visualizing Coordinates**// Move this section up. The best place would be after spawning the object. 
  
 If you want to know if a coordinate you defined is correct, you can visualize the axis of the coordinate frame in the Bullet World and see for yourself. If you want to know if a coordinate you defined is correct, you can visualize the axis of the coordinate frame in the Bullet World and see for yourself.
Line 998: Line 1018:
  
  
 +FIXME //** Ending: Visualizing Coordinates**//
  
  
 ===== Exercise 1 ===== ===== Exercise 1 =====
 +FIXME //** Begin: Exercise 1**// !For all following exercises: Add some tips, but make sure people have to click on them (so they dont appear directly).
 +
  
 Difficulty level: Easy. Difficulty level: Easy.
Line 1046: Line 1068:
 With that the robot should be able to grasp the object from any location on any of the two tables. With that the robot should be able to grasp the object from any location on any of the two tables.
  
 +FIXME //** Ending: Exercise 1**//
 ===== Exercise 2 ===== ===== Exercise 2 =====
  
Line 1216: Line 1238:
  
 ===== Credits ===== ===== Credits =====
 +FIXME //** Begin: Credits**// Add Vanessa and Jörn
  
 This tutorial was created with the combined efforts of Amar Fayaz, Arthur Niedzwiecki and Gayane Kazhoyan. This tutorial was created with the combined efforts of Amar Fayaz, Arthur Niedzwiecki and Gayane Kazhoyan.
  
  
 +FIXME //** Ending: Credits**//