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
Next revisionBoth sides next revision
tutorials:advanced:unreal [2019/06/06 12:29] hawkintutorials:advanced:unreal [2020/01/13 08:23] – [Prerequisites] adapted the launching procedure to the new launch files. hawkin
Line 11: Line 11:
  
 === Roslaunch === === Roslaunch ===
-Launch a ''roscore'' first. Then, in a new terminal for each launch file, launch the bullet_world, json_prolog and roslisp_repl+Launch a ''roscore'' first. Then, in a new terminal for each launch file, launch the simulation and roslisp_repl
 <code bash> <code bash>
-    $ roslaunch cram_pr2_pick_place_demo sandbox.launch  +    $ roslaunch cram_knowrob_vr simulation.launch
-    $ roslaunch json_prolog json_prolog.launch +
     $ roslisp_repl     $ roslisp_repl
 </code> </code>
-The bullet world is needed for visualization. The json_prolog node allows us to access information in KnowRob from CRAM+The ''simulation.launch'' includes the json_prolog node which is needed for the communication between KnowRob and CRAM. It also launches the ''bullet world simulation'' and uploads the ''robot description''. This launch file has the following parameters that can be set with its launch. The following are also the default values: 
 +  * **upload:=true** uploads the robot description if set to ''true''. Set to ''false'' if the robot description is being uploaded by another node or e.g. the real robot. 
 +  * **knowrob:=true** determines if the ''json_prolog'' node should be launched to allow communication with KnowRob. Set to ''false'' if another instance of KnowRob or json_prolog is running already. 
 +  * **boxy:=false** determines which robot description should be uploaded and used. The default case ''false'' means that the PR2 description will be used. In case of ''true'', Boxy will be used
  
 ==== Usage and Code ==== ==== Usage and Code ====
Line 37: Line 39:
 </code> </code>
  
-This will create a lisp ros node, clean up the belief-state, load the episodes that get passed to the init function as a list of strings, e.g. in our case "ep1", spawn the semantic map of the episode and the items and initialize the location costmap. In the code section below it will be explained in more detail, what is loaded when. This process may take a while, so please have some patience. +This will create a lisp ros node, clean up the belief-state, load the episodes that get passed to the init function as a list of strings, e.g. in our case "ep1", spawn the semantic map of the episode and the items and initialize the location costmap. In the code section below it will be explained in more detail, what is loaded and when. This process may take a while, so please have some patience. When the function has finished running through your bullet world should look like this: 
  
 Now, let's execute the pick and place plan: Now, let's execute the pick and place plan:
 <code lisp> <code lisp>
-CL-USER> (cram-pr2-projection:with-simulated-robot (kvr::demo))+CL-USER> (cram-urdf-projection:with-simulated-robot (kvr::demo))
 </code> </code>
 With this call we first say that we want to use the simulated bullet-world PR2 robot instead of the real one, and then we simply call the demo. The demo will read out the VR episode data and extract the positions of the objects that have been manipulated, which hand was used and the positions of the human head and hand.  With this call we first say that we want to use the simulated bullet-world PR2 robot instead of the real one, and then we simply call the demo. The demo will read out the VR episode data and extract the positions of the objects that have been manipulated, which hand was used and the positions of the human head and hand.