You were redirected here from faq.

FAQ

Q: How can I add a mesh in bullet having the full mesh path and not using the mesh folder?

A: The mesh paths are stored here: https://github.com/cram2/cram/blob/boxy-melodic/cram_3d_world/cram_bullet_reasoning/src/items.lisp#L36

To add new entries into the variable you use this function: https://github.com/cram2/cram/blob/boxy-melodic/cram_3d_world/cram_bullet_reasoning/src/items.lisp#L62

Here is an example. These are two meshes that we use for the shopping scenario: https://github.com/cram2/cram/tree/boxy-melodic/cram_demos/cram_donbot_retail_demo/resource

In order to register them, we call the add-objects-to-mesh-list function in the init-projection function, which is called upon ROS node startup: https://github.com/cram2/cram/blob/boxy-melodic/cram_demos/cram_donbot_retail_demo/src/setup.lisp#L45

To register any function as a callback upon node startup we use this macro https://github.com/cram2/cram/blob/boxy-melodic/cram_demos/cram_donbot_retail_demo/src/setup.lisp#L47

Once you have the paths stored in the btr::mesh-files variable, you can spawn an object of the same type as the filename, e.g., for the retail scenario one can spawn an object of type :balea-bottle or :dish-washer-tabs.

You can, of course, just populate the mesh variable manually to hack something quickly, but I'd suggest using the add-objects-to-mesh list function.

Important: the meshes should be located in a ROS package that the system is able to find with roscd $THE_PACKAGE.