Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
acmiyaguchi opened this issue Sep 27, 2023 · 0 comments
Open

Comments

@acmiyaguchi
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant