Skip to content

Add realistic inertial values to use models in physical simulations #4

@acmiyaguchi

Description

@acmiyaguchi

When we load models into the pick-and-place gazebo environment, they drop down onto the table and move around in a very “floaty” fashion. This is because the physical properties are not set correctly. We fixed the initial problem with these models to be able to even use them correctly in the environment by setting a collision mesh. We need to fix the inertial values so things look correct.

See the comment here: #2 (comment)

I think this is good enough, although we might want to go in and manually compute inertial values for items in the warehouse. This script uses pymeshlab to calculate inertial values based on a mesh and an initial weight:

https://github.com/vonunwerth/MeshLabInertiaToURDF

We could take plausible weights for each class of object, compute the intertial values, and then fill in the values.

We need to insert the values into the template (or modify the resulting rendered model with a script) in this CMakeList

simData/CMakeLists.txt

Lines 11 to 23 in bdc5388

foreach(SUBDIR ${SUBDIRS})
get_filename_component(MODEL_NAME ${SUBDIR} NAME)
set(MODEL_DIR ${BUILD_MODEL_DIR}/${MODEL_NAME})
# create the description.sdf for the model
configure_file(
${PROJECT_SOURCE_DIR}/description.sdf.template
${MODEL_DIR}/sdf/description.sdf
)
# move mesh files
file(GLOB MESHES ${SUBDIR}/*.dae)
file(COPY ${MESHES} DESTINATION ${MODEL_DIR}/mesh)

We also want to setup a testing environment and load the models into gazebo to see how they behave.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions