Attach Gripper to Robot - modulabs/gazebo-tutorial GitHub Wiki

Make a Mobile Robot tutorial ์—์„œ ๊ฐ„๋‹จํ•œ mobile robot์„ ๋งŒ๋“ค์—ˆ์—ˆ๋‹ค. ์ด ๋ชจ๋ธ์„ ์ข€ ๋” ํฌ๊ฒŒ ํ‚ค์›Œ์„œ ๋ฐ”๋กœ ์ง์ „์— ๋งŒ๋“ค์—ˆ๋˜ gripper๋ฅผ ๋ถ™์—ฌ๋ณด์ž. ๋‹ค์‹œ ๋งํ•ด์„œ ๋ชจ๋ธ์„ assembleํ•˜์—ฌ ์ƒˆ๋กœ์šด ๋ชจ๋ธ์„ ์†์‰ฝ๊ฒŒ ๋งŒ๋“œ๋Š” ๋ฒ•์„ ๋ฐฐ์›Œ๋ณด์ž.

Mobile Base

์ผ๋‹จ Mobile Robot ํŒŒ์ผ์€ ์ข€ ๋” ํฌ๊ฒŒ ์ˆ˜์ •ํ•œ๋‹ค.

Aseembling a Composite 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...๋ฅผ ํด๋ฆญํ•˜๊ณ  ๊ธฐ๋‹ค๋ ค๋ณด์ž

โš ๏ธ **GitHub.com Fallback** โš ๏ธ