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:advanced:cram-meshes [2022/04/01 10:20] – [Prepare the 3D mesh] vanessatutorials:advanced:cram-meshes [2022/05/09 09:59] (current) – [Add the mesh to CRAM] vanessa
Line 12: Line 12:
 ====== Add the mesh to CRAM====== ====== Add the mesh to CRAM======
  
-Export as stl and save it either in your demo resource folder or: ~/YOUWS/src/cram/cram_3d_world/cram_bullet_reasoning/resource/+Export as stl and save it either in your demo resource folder or: ~/YOUR_CRAM_WS/src/cram/cram_3d_world/cram_bullet_reasoning/resource/
  
  
-Add your object here for coloring: +To add some coloring on the object one must declare it here: ~/cram_3d_world/cram_bullet_reasoning_utilities/src/objects-database.lisp:
-./cram_3d_world/cram_bullet_reasoning_utilities/src/objects-database.lisp:+
  
   ;; Colors for different object types the same for all scenarios.   ;; Colors for different object types the same for all scenarios.
-  (<- (%scenario-object-color :plate    (0.8 0.58 0.35))) 
-  (<- (%scenario-object-color :fork     (0.2 0.1 0.3))) 
-  (<- (%scenario-object-color :knife    (0.5 0 0))) 
   (<- (%scenario-object-color :big-knife    (0 1 1 1)))   (<- (%scenario-object-color :big-knife    (0 1 1 1)))
      
-Add your object here, so the system can use the correct stl file for the keyword:+Add your object here, so the system can use the correct stl file for the keyword of your will. In this example it is big-knife. The keyword is important since it is used as a reference within the system:
 ./cram_3d_world/cram_bullet_reasoning/src/items.lisp: ./cram_3d_world/cram_bullet_reasoning/src/items.lisp:
  
Line 39: Line 35:
      
 Add your object here for the abstract item-shape: Add your object here for the abstract item-shape:
-world/cram_btr_spatial_relations_costmap/src/knowledge.lisp\052:  +world/cram_btr_spatial_relations_costmap/src/knowledge.lisp:052:  
  
   (<- (%item-type-shape :big-knife :rectangle))   (<- (%item-type-shape :big-knife :rectangle))
Line 45: Line 41:
  
 Add your object here for the padding size: Add your object here for the padding size:
-./cram_3d_world/cram_btr_spatial_relations_costmap/src/knowledge.lisp\087:  +./cram_3d_world/cram_btr_spatial_relations_costmap/src/knowledge.lisp:087:  
  
   (<- (object-type-padding-size :big-knife 0.005d0))   (<- (object-type-padding-size :big-knife 0.005d0))
      
-====== Use the mesh======  +======How to use the mesh======  
 Now you are able to spawn your object by: Now you are able to spawn your object by:
   (btr-utils:spawn-object 'big-knife-1 :big-knife   (btr-utils:spawn-object 'big-knife-1 :big-knife