Inertial parameters of triangle meshes - modulabs/gazebo-tutorial GitHub Wiki
Overview
์ ๋ฐํ ์๋ฎฌ๋ ์ด์ ๊ฒฐ๊ณผ๋ฅผ ์ป๊ธฐ ์ํด์๋ ๋ฌผ๋ฆฌ์ ์ผ๋ก ๊ทธ๋ด ๋ฏํ inertial ํ๋ผ๋ฏธํฐ๊ฐ ํ์ํ๋ค. mass, center of mass location, moment of inertia๊ฐ ์ ํํด์ผ ๊ทธ์ ๋ง๋ ๋ฌผ๋ฆฌ์ ์ธ ๊ฒฐ๊ณผ๊ฐ ๋์จ๋ค.
๋ณดํต์ ๋น์ฅฌ์ผํ ๋ณผ๋ฅจ์ ๊ทธ๋ฆฌ๊ธฐ๋ ์ฌ์๋ mass ๋ฑ์ ์ฐ์ ํ๊ธฐ๋ ์ด๋ ต๋ค. ๊ทธ๋์ ๋ณดํต ์บ๋ ํ๋ก๊ทธ๋จ์ geometry๋ฅผ ์์ฑํ ๋ค์์ material์ ๋ฐ๋๋ฅผ ํ ๋นํด์ ๊ทธ์ ๋ง๋ inertial ํ๋ผ๋ฏธํฐ๋ฅผ ๋ฝ์๋ธ๋ค. ์์ฉ ์บ๋ ํด๋ก๋ SolidWorks ๋ฑ์ด ์๋๋ฐ ๊ทธ๊ฒ์ ์ด ์ง๋ฌธ์ ์ฐธ์กฐํ๊ณ ์ฌ๊ธฐ์๋ ๋ฌด๋ฃ ํด์ธ MeshLab์ ์ด์ฉํด์ inertial ํ๋ผ๋ฏธํฐ๋ฅผ ๋ฝ์๋ด๋ ๋ฐฉ๋ฒ์ ์์๋ณด์.
Summary of inertial parameters
Mass
๋ฌผ์ฒด์ ๋ฌด๊ฒ๋ฅผ ๋งํ๋ค. kg์ด ๊ธฐ๋ณธ ๋จ์์ด๋ค.
Center of Mass
๋งํฌ pose ์ขํ๊ณ๋ก๋ถํฐ ์ง๋ ์ค์ฌ๊น์ง์ ๊ฑฐ๋ฆฌ x, y, z vector๋ฅผ ๋ปํ๋ค.
Moment of Inertia Matrix
๊ด์ฑ ๋ชจ๋ฉํธ๋ 'ํ์ ์ฑ๋ถ์ ์ง๋'์ด๋ผ๊ณ ์ค๋ช ํ ์ ์๋ค. ์ง์ ์ด๋์์ ์ง๋์ด ๋ฌด๊ฑฐ์ธ ์๋ก ์ฒ์์๋ ๋ ์์ง์ด์ง ์์ผ๋ ค๊ณ ํ๋ค๊ฐ ๊ฐ์๋๊ฐ ๋ถ์ด์ ์์ง์ธ ํ์๋ ๋ฉ์ถ๊ธฐ ๋ ์ด๋ ค์ด ๊ฒ์ฒ๋ผ ๊ด์ฑ ๋ชจ๋ฉํธ๊ฐ ํด์๋ก ์ ์ง ์ํ์์ ํ์ ์ํค๊ธฐ๋ ์ด๋ ต๊ณ ์๋๊ฐ ๋ถ์ ์ํ์์๋ ๋ฉ์ถ๊ธฐ ์ด๋ ต๋ค. ์ด์ ๋ํ ์์ธํ ์ค๋ช ์ ๋ค์ wikipedia๋ฅผ, ํ์์ ๋ํ ๊ณ์ฐ ํ ์ด๋ธ์ ๋ค์ wikipedia๋ฅผ ์ฐธ์กฐํ๋ค.
Preparation
Installing MeshLab
MeshLab์ inertial parameter๋ฅผ ๊ณ์ฐํด์ฃผ๋ ๋ฌด๋ฃ ํด๋ก์ dae, stl์ ์ง์ํ๋ค. ํํ์ด์ง๋ฅผ ํตํด์ ์ค์นํ ๊ฒฝ์ฐ๋ MeshLab์ ์ฐธ์กฐํ๋ค. ํ์ง๋ง, ์ด ๊ฒฝ์ฐ ์ ์ ๋๋ ๊ฒฝ์ฐ๊ฐ ์์๊ณ LinuxHelp๋ฅผ ์ฐธ๊ณ ํด์ ์ค์นํ๋ ๊ฒ์ด ๊ฐ์ฅ ๊ฐ๋จํ๋ค.
$ add-apt-repository ppa:zarquon42/meshlab
$ apt-get update
$ apt-get install meshlab
์ค์น๊ฐ ๋๋๋ฉด meshlab์ ์คํํ๋ค.
$ meshlab
Computing inertia of sphere
View -> Show Layer Dialog , Filters -> Quality Measure and Computations -> Compute Geometric Measures ๋ฅผ ์คํํ๋ ค๊ณ ํ์ง๋ง, ํด๋น ๋ฉ๋ด๊ฐ ์กด์ฌํ์ง ์์;;
OnShape๋ฅผ ์ด์ฉํ Inertial ํ๋ผ๋ฏธํฐ ์ถ์ถ
OnShape๋ ๋ฌด๋ฃ ์บ๋ ํด๋ก์ ์น๋ธ๋ผ์ฐ์ ์์ ์จ๋ผ์ธ์ผ๋ก ๋์ํ๋ค. ๊ฐ์ ๋ง ํ๋ฉด ์ ์ฅ ๊ณต๊ฐ๊ณผ ์บ๋ ํ๋ก๊ทธ๋จ์ ์ฌ์ฉํ ์ ์๋ค. OnShape์์ ์ํ๋ ํํธ๋ฅผ ์ค๊ณํ๊ณ ์ด์ ๋ธ๋ฆฌ์์ ํํธ๋ฅผ ๋ถ๋ฌ์จ ํ์ ์ํ๋ ํํธ๋ฅผ ์ ํํ๋ฉด ์ค๋ฅธ์ชฝ ํ๋จ์ ์ ์ธ ํ์๊ฐ ๋ํ๋๋ค. ์ด๊ฒ์ ํด๋ฆญํ๋ฉด Inertial ํ๋ผ๋ฏธํฐ๊ฐ ๋ํ๋๋ค. Reference ์ขํ๊ณ๋ Inertial ์ขํ๊ณ๋ฅผ ๊ธฐ์ ํ ๊ธฐ์ค ์ขํ๊ณ๋ฅผ ์ค์ ํ๋ ๊ฒ์ธ๋ฐ ์ค์ ํ์ง ์์ผ๋ฉด ์ง๋ ์ค์ฌ์์ ๊ธฐ์ ๋๋ค.
https://cad.onshape.com/help/Content/massprops-ps.htm
Onshape์์ Colladaํ์ผ๋ก export์ .daeํ์ผ๋ก ๋ค์ด๋ก๋ ๋๋ค. ๋๋ Online 3D Converter์์๋ ๋ณํ ๊ฐ๋ฅํ๋ค.
URDF ๋๋ SDF๋ก ์ฎ๊ธฐ๊ธฐ
ํด๋น ๊ฒฐ๊ณผ๋ urdf, sdf ์ ์๊ธฐ๋ก ์ฎ๊ธด๋ค. ์๋์ผ๋ก ๋ฝ์์ฃผ๋ ํ๋ก๊ทธ๋จ์ด ์์ผ๋ฉด ์ข์ํ ๋ฐ Solidworks์์ sdf ํ์ผ์ ์๋์ผ๋ก ๋ฝ์์ค ์ ์๋ค๊ณ ํ๋ค. ์ถํ ๋ด์ฉ ์ถ๊ฐ..