Differences

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

Link to this comparison view

tutorials:pycram:demo [2020/04/08 09:39]
jdech created
tutorials:pycram:demo [2020/07/30 08:45] (current)
jdech
Line 1: Line 1:
 ====== Run the PyCRAM demos ====== ====== Run the PyCRAM demos ======
-There are two demos available for PyCRAM, the first can only be used with a real PR2 and shows how to use the ProcessModules,​ Motion Designator and the PyCRAM plan language. ​The second one shows the usage of the BulletWorld and its reasoning mechanisms. ​+There are two demos available for PyCRAM, the first shows the usage of the BulletWorld and its reasoning mechanisms. The Second ​can only be used with a real PR2 and shows how to use the ProcessModules,​ Motion Designator and the PyCRAM plan language. ​ 
  
-===== Demo 1 ===== +===== Demo 1 ===== 
 +This demo shows the capabilities of the BulletWorld and its reasoning mechanisms.  
 + 
 +==== Setup ==== 
 +To run the demo a few packages need to be installed, they are all available via PyPi. 
 +If you already installed pip you can skip this, if not the pip version for Python3 can be installed with the following command. 
 +<​code>​ apt install python3-pip</​code>​ 
 +To install the required packages via pip the following command is used. 
 +<​code>​pip3 install pybullet pathlib numpy</​code>​ 
 + 
 +Now the Repository needs to be cloned. 
 +<​code>​cd ~ && git clone https://​www.github.com/​cram2/​pycram.git</​code>​ 
 +  
 +This demo needs the models of the PR2 and the kitchen of the Institute of Artificial Intelligence. 
 +They need to be in the resources directory in the PyCRAM repo. 
 + 
 +<​code>​cd ~/​pycram/​resources</​code>​ 
 +<​code>​git clone git@github.com:​PR2/​pr2_common.git</​code>​ 
 +<​code>​git clone git@github.com:​code-iai/​iai_maps.git</​code>​ 
 + 
 + 
 +==== Start the IK service ==== 
 +To run the demo an external IK service is needed. To start this service a working ROS installation is needed, for a tutorial on how to install and setup ROS look [[http://​wiki.ros.org/​kinetic/​Installation/​Ubuntu|here]] 
 + 
 +<​code>​cd ~/​pycram/​launch </​code>​ 
 +<​code>​roslaunch ik_and_description.launch</​code>​ 
 + 
 +==== Run the Demo ==== 
 +Now that all dependencies are installed and the IK service is running the demo can be executed. 
 +For this open a new terminal and enter the pycram_pr2_bullet_world_demo in the PyCRAM repository. 
 +<​code>​cd ~/​pycram/​demos/​pycram_pr2_bullet_world_demo</​code>​ 
 +Now execute the run.py. 
 +<​code>​python3 run.py</​code>​ 
 + 
 + 
 +===== Demo 2 ===== 
 For this demo a real PR2 is needed. Furthermore,​ ROS1 is needed to communicate with the PR2. For this demo a real PR2 is needed. Furthermore,​ ROS1 is needed to communicate with the PR2.
 It is meant to show what  is possible with the ProcessModules,​ Motion Designator and PyCRAM plan language. ​ It is meant to show what  is possible with the ProcessModules,​ Motion Designator and PyCRAM plan language. ​
Line 30: Line 65:
 Now the Demo can be run by simply executing the run.py srcipt. Now the Demo can be run by simply executing the run.py srcipt.
 <​code>​cd ~/​ros_ws/​src/​pycram/​demos/​pycram_pr2_demo/​src</​code>​ <​code>​cd ~/​ros_ws/​src/​pycram/​demos/​pycram_pr2_demo/​src</​code>​
-<​code>​python3 run.py</​code>​ 
- 
-===== Demo 2 ===== 
-Running the second demo is a bit simpler because no real PR2 is needed and the setup is a bit simpler. ​ 
- 
-==== Setup ==== 
-To run the demo a few packages need to be installed, they are all available via PyPi. 
-If you already installed pip you can skip this, if not the pip version for Python3 can be installed with the following command. 
-<​code>​ apt install python3-pip</​code>​ 
-To install the required packages via pip the following command is used. 
-<​code>​pip3 install pybullet pathlib numpy</​code>​ 
- 
-Now the Repository needs to be cloned. This step can be skiped if the setup of the first demo was already done.  
-<​code>​git clone https://​www.github.com/​cram2/​pycram.git</​code>​ 
-  
-This demo needs the models of the PR2 and the kitchen of the Institute of Artificial Intelligence. 
-They need to be in the resources directory in the PyCRAM repo. 
- 
-The PR2 description:​ https://​github.com/​PR2/​pr2_common/​tree/​melodic-devel/​pr2_description 
- 
-The kitchen description:​ https://​github.com/​code-iai/​iai_maps/​tree/​master/​iai_kitchen 
- 
-==== Run the Demo ==== 
-Now that all dependencies are installed the demo can be executed. 
-For this you just need to enter the pycram_pr2_bullet_world_demo in the PyCRAM repo. 
-<​code>​cd <path to the repo>/​demos/​pycram_pr2_bullet_world_demo</​code>​ 
-Now execute the run.py. 
 <​code>​python3 run.py</​code>​ <​code>​python3 run.py</​code>​