Gazebo | Ignition | Community
Ask Your Question
0

Implementing gimbal control on IRIS model

asked 2020-08-11 07:48:27 -0500

gimbaliris gravatar image

Hello, I'm trying to implement gimbal control with the "iris" drone. I can implement fly the drone using sitl and QGC, but when i try to add a control for tilt joint I cant get a mavlink connction..

This is the code (the control i added is channel 5 )

<sdf version="1.6" xmlns:xacro="http://ros.org/wiki/xacro"> <model name="iris_demo"> <include> <uri>model://iris_with_standoffs</uri> </include>

<include>
  <uri>model://gimbal_small_2d</uri>
  <pose>0 -0.01 0.070 1.57 0 1.57</pose>
</include>

!-->

<joint name="iris_gimbal_mount" type="revolute">
  <parent>iris::base_link</parent>
  <child>gimbal_small_2d::base_link</child>
  <axis>
    <xyz>0 0 1</xyz>
    <limit>
      <upper>0</upper>
      <lower>0</lower>
    </limit>
    <use_parent_model_frame>true</use_parent_model_frame>
  </axis>
</joint>


<!-- visual markers for debugging
<link name="rotor_0_blade_1_cp">
  <gravity>0</gravity>
  <pose>0.13 -0.22 0.216 0 -0 0</pose>
  <visual name='rotor_0_visual_root'>
    <pose>0 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.01</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_0_visual_tip'>
    <pose>0.12 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.01</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_0_visual_cp'>
    <pose>0.084 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_0_visual_cp_forward'>
    <pose>0.084 0.02 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_0_visual_cp_upward'>
    <pose>0.084 0 0.02 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
</link>
<link name="rotor_0_blade_2_cp">
  <gravity>0</gravity>
  <pose>0.13 -0.22 0.216 0 -0 0</pose>
  <visual name='rotor_0_visual_root'>
    <pose>0 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.01</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_0_visual_tip'>
    <pose>-0.12 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.01</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_0_visual_cp'>
    <pose>-0.084 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_0_visual_cp_forward'>
    <pose>-0.084 -0.02 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_0_visual_cp_upward'>
    <pose>-0.084 0 0.02 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
</link>

<link name="rotor_1_blade_1_cp">
  <gravity>0</gravity>
  <pose>-0.13 0.2 0.216 0 -0 0</pose>
  <visual name='rotor_1_visual_root'>
    <pose>0 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.01</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_1_visual_tip'>
    <pose>0.12 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.01</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_1_visual_cp'>
    <pose>0.084 0 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_1_visual_cp_forward'>
    <pose>0.084 0.02 0 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
  <visual name='rotor_1_visual_cp_upward'>
    <pose>0.084 0 0.02 0 -0 0</pose>
    <geometry>
      <sphere>
        <radius>0.003</radius>
      </sphere>
    </geometry>
  </visual>
</link>
<link name="rotor_1_blade_2_cp">
  <gravity ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-08-19 06:36:38 -0500

Jaeyoung-Lim gravatar image

If you are running PX4, you can try using the typhoon_h480model which has gimbal controls already running: https://github.com/PX4/sitl_gazebo/tr...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-08-11 07:48:27 -0500

Seen: 347 times

Last updated: Aug 19 '20