This post was flagged by the community and is temporarily hidden.
Try making the weight of the smaller boxes non-negligible. The physics engines do not like big differences in inertia.
Also, check that the inertial matrices you use correspond to something meaningful. A unit matrix is usually an insane inertia.
To be sure our inertia is sane, I usually compute it with helpers like this: https://github.com/osrf/subt/blob/master/submitted_models/ctu_cras_norlab_absolem_sensor_config_1/urdf/utils.xacro#L20 .
Thank you for the response.
I have changed the mass to a non-negligible value(main box=1 unit, left,right box=0.5 unit each). The inertia matrix used is (maa/6)*I(3x3), I being Identity matrix, m is the mass of respective boxes, and a being the corresponding side of the cube(all boxes considered are of cube shape).
Still the box moves linearly along z direction with a net force of fzr+fzl (right ‘r’+left ‘l’), and doesnot show any change in orientation/ rotation
Then I’m out of simple answers. Can you share more detail about how you apply the force (the actual code), and probably also the SDF?
Being a new user in the ROS community I am denied with the permissions for uploading files(both in post and messages). However I have shared the files over email.
Hope you have received the same
Hmm, this seems to be more a practically oriented question than a community issue. The practical questions should be asked on https://robotics.stackexchange.com/ . Please, re-post your question there (and feel free to post the link here).
Thank you for the information.
The urdf file and the controller code are available for reference here: reference files for box rotation(ROS community) - Google Drive
The question is shared in robotics stack exchange also and the link to this is: