ROS(drone포함)

urdf를 이용하여 로봇청소기 만들기

728x90

https://durian9s-coding-tree.tistory.com/162

 

원통좌표형 매니퓰레이터 URDF 만들기

cd ~/catkin_ws/src/testbot_description/urdf vim testbot_homework.urdf urdf파일을 작성하고 아래의 코드를 실행시킨다. $ roslaunch testbot_description testbot_homework.launch roslaunch를 실행시킨 상..

durian9s-coding-tree.tistory.com

어제 원통 좌표형 매니퓰레이터를 만들었었고, 오늘은 로봇 청소기 모양의 매니퓰레이터를 만들었다.

 

모양은 비교적 쉽에 만들었으나 조인트를 조정하여 바퀴를 만져봤을 때 생각지도 못한 부분의 디버깅으로 인해 시간이 다소 소요되었다.

문제는 축의 설정.

조인트와 중심의 개념을 더 숙지할 필요가 있어보인다.

 

아래는 코드

<?xml version="1.0" ?>
<robot name="testbot">

  <material name="black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="orange">
    <color rgba="1.0 0.4 0.0 1.0"/>
  </material>

  <link name="base">
    <visual>
        <geometry>
            <cylinder length="0.3" radius="0.8"/>
        </geometry>
        <origin rpy="0 0 0" xyz="0 0 0.21"/>
        <material name="white">
            <color rgba="1.0 1.0 1.0 1.0"/>
        </material>
    </visual>

    <collision>
        <geometry>
            <cylinder length="0.3" radius="0.8"/>
        </geometry>
        <origin rpy="0 0 0" xyz="0 0 0.21"/>
    </collision>

      <inertial>
        <mass value="1"/>
        <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>       </inertial>
    </link>


  <joint name="joint1" type="continuous">
    <parent link="base"/>
    <child link="link1"/>
    <origin xyz="0.4 0 0.15" rpy="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="30" lower="-2.617" upper="2.617" velocity="1.571"/>
  </joint>


  <link name="link1">
    <collision>
      <origin xyz="0.4 0 0" rpy="0 1.57 0"/>
      <geometry>
        <cylinder length="0.1" radius="0.15"/>
      </geometry>
    </collision>
    <visual>
	<origin xyz="0.4 0 0" rpy="0 1.57 0"/>
      <geometry>
        <cylinder length="0.1" radius="0.15"/>
      </geometry>
      <material name="black"/>
    </visual>
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="1"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
  </link>

  <joint name="joint2" type="continuous">
    <parent link="base"/>
    <child link="link2"/>
    <origin xyz="-0.4 0 0.15" rpy="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="30" lower="-2.617" upper="2.617" velocity="1.571"/>
  </joint>


  <link name="link2">
    <collision>
      <origin xyz="-0.4 0 0" rpy="0 1.57 0"/>
      <geometry>
        <cylinder length="0.1" radius="0.15"/>
      </geometry>
    </collision>
    <visual>
        <origin xyz="-0.4 0 0" rpy="0 1.57 0"/>
      <geometry>
        <cylinder length="0.1" radius="0.15"/>
      </geometry>
      <material name="black"/>
    </visual>
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="1"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
  </link>

  <joint name="joint3" type="continuous">
    <parent link="base"/>
    <child link="link3"/>
    <origin xyz="0 0.3 0.15" rpy="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="30" lower="-2.617" upper="2.617" velocity="1.571"/>
  </joint>

  <link name="link3">
    <collision>
      <origin xyz="0 0 0" rpy="0 1.57 0"/>
      <geometry>
        <cylinder length="0.1" radius="0.15"/>
      </geometry>
    </collision>
    <visual>
        <origin xyz="0 0 0" rpy="0 1.57 0"/>
      <geometry>
        <cylinder length="0.1" radius="0.15"/>
      </geometry>
      <material name="black"/>
    </visual>
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="1"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
  </link>



</robot>

$ cd ~/catkin_ws/src/testbot_description/urdf

$  urdf_to_graphiz testbot_homework2.urdf 

 

728x90

'ROS(drone포함)' 카테고리의 다른 글

ROS 기본 개념 (topic, service, action, parameter)  (0) 2021.08.18
ROS topic 통신  (0) 2021.06.15
원통좌표형 매니퓰레이터 URDF 만들기  (0) 2021.06.03
Manipulator 모델링  (0) 2021.06.03
Manipulator  (0) 2021.06.03