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:pycram:bullet_world [2022/06/16 08:52] – [General] jdechtutorials:pycram:bullet_world [2022/09/27 07:47] (current) jdech
Line 1: Line 1:
 ====== PyCRAM Bullet World Tutorial ====== ====== PyCRAM Bullet World Tutorial ======
 +Before you can work with PyCRAM you have to provide it with a robot description, so PyCRAM knows which robot is currently used. This can be done via the ROS launchfile in the launch directory. This launchfile contains an argument that specifies which robot urdf should be uploaded as the description. 
 +To launch the ROS launchfile just execute the following command:
 +<code>
 +roslaunch pycram ik_and_description.launch 
 +</code>
 +
 +===== Remarks =====
 +==== Camera ====
 +The BulletWorld comes equipped with a window that renders the current state of the simulation. To interact with this window and change the position of the camera you have to press and hold the ctrl key and the left mouse button, then you can change the position of the camera in the simulation. 
 +
 +==== Caching ====
 +When loading an Object in the BulletWorld either from a URDF, OBJ or SDF file there are some operations like resolving ROS package paths to actual paths in the file systems that have to be done. To save time on this part when loading the same Object again, PyCRAM caches the resulting file with the actual paths in resources/cached. 
 +
 +Keep in mind that PyCRAM does not check for changes of the original file and always loads the cached file if it exists. You can circumvent this by using the ignoreCachedFiles parameter when creating an Object. 
 +<code>
 +milk = Object("milk", "milk", "milk.stl", [0, 0, 1], ignoreCachedFiles=true)
 +</code>
 +
 +Another option would be to just remove the directory resources/cached. 
 +
 ===== General ===== ===== General =====
 The BulletWorld is PyCRAMs internal physics simulation which is used for geometric reasoning as well as executing the robot control plans. For a detailed description as well as a documentation of the API please look in the corresponding docu [[doc/pycram/bulletworld|here]]. The BulletWorld is PyCRAMs internal physics simulation which is used for geometric reasoning as well as executing the robot control plans. For a detailed description as well as a documentation of the API please look in the corresponding docu [[doc/pycram/bulletworld|here]].
Line 16: Line 36:
 world.set_gravity([0, 0, -9.8]) world.set_gravity([0, 0, -9.8])
 </code> </code>
- 
-**To change the camera position in the BulletWorld you have to press the control key while using the mouse to move the camera** 
  
 The opening window should look like this.  The opening window should look like this.