Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
tutorials:advanced:cram-meshes [2022/03/30 14:28] – vanessa | tutorials:advanced:cram-meshes [2022/04/01 11:33] – [Use the mesh] vanessa | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Prepare the 3D mesh====== | ====== Prepare the 3D mesh====== | ||
- | Open your mesh in Blender or any other Software of your wishes. | + | There are a few things to watch out for when adding a 3d mesh to the bullet world. |
+ | In order to take into account scaling, rotation and file type, it is recommended to first open the object | ||
+ | Now look at the rotation and consider the Right-Handed 3D Coordinate Frame we are working in. The X-axis is mostly the long side and Z-axis goes up. Just rotate the object to your liking. | ||
+ | {{ : | ||
+ | After the rotation is done check the scaling factor of the object. You will need to hit the scaling factor on 1.0 otherwise the object is weirdly big or small in the bullet world. | ||
+ | {{ : | ||
+ | To apply your changes on the object hit ctrl+A and click on apply rotation and scaling transform. | ||
+ | Now save the object as an stl. | ||
- | {{: | + | ====== Add the mesh to CRAM====== |
- | {{:tutorials: | + | Export as stl and save it either in your demo resource folder or: ~/ |
- | {{: | ||
- | 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: ~/ | + | To add some coloring on the object one must declare |
- | + | ||
- | + | ||
- | Add your object here for coloring: | + | |
- | ./ | + | |
;; Colors for different object types the same for all scenarios. | ;; Colors for different object types the same for all scenarios. | ||
- | (<- (%scenario-object-color : | ||
- | (<- (%scenario-object-color :fork (0.2 0.1 0.3))) | ||
- | (<- (%scenario-object-color : | ||
(<- (%scenario-object-color : | (<- (%scenario-object-color : | ||
| | ||
- | 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 |
./ | ./ | ||
- | (defparameter *mesh-files* | + | |
- | '( | + | '( |
- | | + | |
- | | + | |
- | | + | |
| | ||
Add your object here for the costmap metadata: | Add your object here for the costmap metadata: | ||
Line 47: | Line 45: | ||
(<- (object-type-padding-size :big-knife 0.005d0)) | (<- (object-type-padding-size :big-knife 0.005d0)) | ||
| | ||
- | | + | ======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: | (btr-utils: |