This is an old revision of the document!
Prepare the 3D mesh
Open your mesh in Blender or any other Software of your wishes.
check scaling factor = 1.0 and apply rotation and scaling to the object by hitting ctrl+A
Export as stl and save it either in your demo resource folder or: ~/YOUWS/src/cram/cram_3d_world/cram_bullet_reasoning/resource/
Add your object here for coloring: ./cram_3d_world/cram_bullet_reasoning_utilities/src/objects-database.lisp:
;; 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)))
Add your object here, so the system can use the correct stl file for the keyword: ./cram_3d_world/cram_bullet_reasoning/src/items.lisp:
(defparameter *mesh-files*
'( .... (:big-knife "package://cram_bullet_reasoning/resource/big-knife.stl" nil) ....
Add your object here for the costmap metadata: ./cram_3d_world/cram_btr_spatial_relations_costmap/src/knowledge.lisp:113:
(<- (object-type-costmap-threshold :big-knife 0.8d0)) ; 0.99d0))
Add your object here for the abstract item-shape: world/cram_btr_spatial_relations_costmap/src/knowledge.lisp\052:
(<- (%item-type-shape :big-knife :rectangle))
Add your object here for the padding size: ./cram_3d_world/cram_btr_spatial_relations_costmap/src/knowledge.lisp\087:
(<- (object-type-padding-size :big-knife 0.005d0))
Now you are able to spawn your object by:
(btr-utils:spawn-object 'big-knife-1 :big-knife :pose (cl-transforms:make-pose (cl-tf:make-3d-vector 1.5 0.0 1.3) (cl-tf:make-identity-rotation)))