Gazebo | Ignition | Community
Ask Your Question
0

Why does this thruster have a sideways component ?

asked 2022-05-13 03:39:40 -0500

florian.pix gravatar image

updated 2022-05-13 03:42:49 -0500

I am using the thruster plugin for ignition gazebo and publish a constant thrust to it of 0.1. The joint is offset from the center by -0.1 in the y-direction and rotated by -1.57079632679 around the y-axis. I would expect the model to move to the right and rotate a bit in the x-y-plane but on top of that it also tilts downward as you can see in the gif. Do you have any idea why this is happening ? Here is the sdf file, the thruster that is moving in the gif is called thruster_b:

<sdf version='1.8'>
<world name='auv'>
<scene>
  <sky>
    <clouds>
      <speed>12</speed>
    </clouds>
  </sky>
  <shadows>1</shadows>
  <fog>
    <color>0.05 0.2 0.2 1.0</color>
    <type>linear</type>
    <density>0.1</density>
    <start>1</start>
    <end>4</end>
  </fog>
  <ambient>0 1 1 1</ambient>
  <background>0 0.7 0.8 1</background>
  <shadows>1</shadows>
</scene>
<physics name='1ms' type='ode'>
  <max_step_size>0.001</max_step_size>
  <real_time_factor>1</real_time_factor>
  <real_time_update_rate>1000</real_time_update_rate>
</physics>
<plugin name='ignition::gazebo::systems::Physics' filename='ignition-gazebo-physics-system'/>
<plugin name='ignition::gazebo::systems::UserCommands' filename='ignition-gazebo-user-commands-system'/>
<plugin name='ignition::gazebo::systems::SceneBroadcaster' filename='ignition-gazebo-scene-broadcaster-system'/>
<plugin name="ignition::gazebo::systems::Sensors" filename="ignition-gazebo-sensors-system">
  <render_engine>ogre2</render_engine>
</plugin>
<plugin name="ignition::gazebo::systems::Imu" filename="libignition-gazebo-imu-system.so"/>
<plugin name="ignition::gazebo::systems::Altimeter" filename="libignition-gazebo-altimeter-system.so"/>

<gui>
  <plugin filename="GzScene3D" name="3D View">
    <ignition-gui>
      <title>3D View</title>
      <property type="bool" key="showTitleBar">false</property>
      <property type="string" key="state">docked</property>
    </ignition-gui>

    <engine>ogre2</engine>
    <scene>scene</scene>
    <ambient_light>0.4 0.4 0.4</ambient_light>
    <background_color>0.8 0.8 0.8</background_color>
    <camera_pose>0 1 1 0 0.5 -1.57079632679</camera_pose>
  </plugin>

  <plugin filename="WorldControl" name="World control">
    <ignition-gui>
      <title>World control</title>
      <property type="bool" key="showTitleBar">false</property>
      <property type="bool" key="resizable">false</property>
      <property type="double" key="height">72</property>
      <property type="double" key="width">121</property>
      <property type="double" key="z">1</property>

      <property type="string" key="state">floating</property>
      <anchors target="3D View">
        <line own="left" target="left"/>
        <line own="bottom" target="bottom"/>
      </anchors>
    </ignition-gui>

    <play_pause>true</play_pause>
    <step>true</step>
    <start_paused>true</start_paused>
  </plugin>

  <!-- World statistics -->
  <plugin filename="WorldStats" name="World stats">
    <ignition-gui>
      <title>World stats</title>
      <property type="bool" key="showTitleBar">false</property>
      <property type="bool" key="resizable">false</property>
      <property type="double" key="height">110</property>
      <property type="double" key="width">290</property>
      <property type="double" key="z">1</property>

      <property type="string" key="state">floating</property>
      <anchors target="3D View">
        <line own="right" target="right"/>
        <line own="bottom" target="bottom"/>
      </anchors>
    </ignition-gui>

    <sim_time>true</sim_time>
    <real_time>true</real_time>
    <real_time_factor>true</real_time_factor>
    <iterations>true</iterations>
  </plugin>
</gui>

<light name='sun' type='directional'>
  <cast_shadows>1</cast_shadows>
  <pose>0 0 10 0 -0 0</pose>
  <diffuse>1 1 1 1</diffuse>
  <specular>0.5 0.5 0.5 1</specular>
  <attenuation>
    <range>1000</range>
    <constant>0.90000000000000002</constant>
    <linear>0.01</linear>
    <quadratic>0.001</quadratic ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-05-24 07:50:03 -0500

florian.pix gravatar image

I resolved the issue by setting <velocity_control> to 1 in the sdf file at the thruster plugin part. I looked it up in the thruster plugin source code: If this isn't set to 1 a torque is added that lead to the weird behaviour for me.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2022-05-13 03:39:40 -0500

Seen: 11 times

Last updated: May 24