Attach Gripper to Robot - modulabs/gazebo-tutorial GitHub Wiki
Make a Mobile Robot tutorial ์์ ๊ฐ๋จํ mobile robot์ ๋ง๋ค์์๋ค. ์ด ๋ชจ๋ธ์ ์ข ๋ ํฌ๊ฒ ํค์์ ๋ฐ๋ก ์ง์ ์ ๋ง๋ค์๋ gripper๋ฅผ ๋ถ์ฌ๋ณด์. ๋ค์ ๋งํด์ ๋ชจ๋ธ์ assembleํ์ฌ ์๋ก์ด ๋ชจ๋ธ์ ์์ฝ๊ฒ ๋ง๋๋ ๋ฒ์ ๋ฐฐ์๋ณด์.
์ผ๋จ Mobile Robot ํ์ผ์ ์ข ๋ ํฌ๊ฒ ์์ ํ๋ค.
๋ค์์ผ๋ก base์ gripper๋ฅผ ์กฐ๋ฆฝํ manipulator ๋ชจ๋ธ์ ์์ฑํ๋ค. ๋ชจ๋ธ ํด๋๋ฅผ ์์ฑํ๊ณ ,
$ mkdir ~/.gazebo/models/simple_mobile_manipulator
$ gedit ~/.gazebo/models/simple_mobile_manipulator/model.config
model.config ํ์ผ์ ๊ธฐ์กด๊ณผ ๋น์ทํ๊ฒ ์์ฑํ๋ค.
<?xml version="1.0"?>
<model>
<name>Simple Mobile Manipulator</name>
<version>1.0</version>
<sdf version='1.5'>manipulator.sdf</sdf>
<author>
<name>My Name</name>
<email>[email protected]</email>
</author>
<description>
My simple mobile manipulator
</description>
</model>๋ค์์ผ๋ก manipulator SDF ํ์ผ์ ์์ฑํ๋ค.
$ gedit ~/.gazebo/models/simple_mobile_manipulator/manipulator.sdf
<?xml version="1.0" ?>
<sdf version="1.5">
<model name="simple_mobile_manipulator">
<include>
<uri>model://my_gripper</uri>
<pose>1.3 0 0.1 0 0 0</pose>
</include>
<include>
<uri>model://simple_mobile_base_2</uri>
<pose>0 0 0 0 0 0</pose>
</include>
<joint name="arm_gripper_joint" type="fixed">
<parent>mobile_base_2::chassis</parent>
<child>simple_gripper::riser</child>
</joint>
<!-- attach sensor to the gripper -->
<include>
<uri>model://hokuyo</uri>
<pose>1.3 0 0.3 0 0 0</pose>
</include>
<joint name="hokuyo_joint" type="fixed">
<child>hokuyo::link</child>
<parent>simple_gripper::palm</parent>
</joint>
</model>
</sdf>์ด ๋, ์ ์ํ ์ ์ ๊ฐ ๋
ธ๋์ ์ฝ์
๋๋ ๋ชจ๋ธ ์ด๋ฆ์ธ๋ฐ include, uri ๋
ธ๋์ 'model://~' ๋ถ๋ถ์ ๊ฐ ๋ชจ๋ธ ๋๋ ํ ๋ฆฌ ์ด๋ฆ์, joint ๋
ธ๋์ ๋งํฌ๋ก ๋ค์ด๊ฐ๋ ์ด๋ฆ์ *.sdf ํ์ผ์ ๊ธฐ์ฌ๋ ๋ชจ๋ธ ์ด๋ฆ์ด๋ค. ๋ชจ๋ธ ๊ฐ์ ๊ด๊ณ๋ include, pose ๋
ธ๋์ staticํ๊ฒ ๊ธฐ์ ๋๊ณ ๋
ธ๋์์๋ child, parent๊ฐ ์ด๋ค ๋งํฌ์ธ์ง๋ง ๊ธฐ์ฌ๋๋ค.
์ฐธ๊ณ ๋ก, gripper palm์ hokuyo ์ผ์๋ ๋ถ์ฐฉํ์๋๋ฐ, ์๋๋ hokuyo ๋ชจ๋ธ์ ์์ผ๋ฉด ์๋์ผ๋ก download๊ฐ ๋์ง๋ง ์๋์ผ๋ก ์ ๋์ง ์์ ๋๋ ์๋์ผ๋ก ๋ฐ์์ผ ํ๋ค.
$ cd ~/.gazebo/models
$ wget -q -R *index.html*,*.tar.gz --no-parent -r -x -nH http://models.gazebosim.org/hokuyo/
๋๋ Connecting to model database...๋ฅผ ํด๋ฆญํ๊ณ ๊ธฐ๋ค๋ ค๋ณด์