Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thank you for taking the time to answer the question. I made some changes to the SDF file. I have a joint which connects the shovel to the frontloader (shovel_joint) and another joint, which is supposed to connect the frontloader to the tractor (frontloader_joint). The is supposed to revolute around the frontloader_joint. Originally, my shovel_joint had a parent of base and the frontloader_joint was it's child. I changed things around, so that now frontloader_joint is connected to base and shovel_joint has front_loader_link as it's parent as here:

<joint name="frontloader_joint" type="revolute">
  <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
  <child>frontloader_link</child>
  <parent>base</parent>
  <axis>
    <xyz>0.0 1.0 0.0</xyz>
    <limit>
      <lower>0.0</lower>
      <upper>90.0</upper>
    </limit>
    <dynamics/>
  </axis>
</joint>`<joint name="shovel_joint" type="revolute">
  <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
  <child>shovel_link</child>
  <parent>base</parent>
  <axis>
    <xyz>0.0 0.0 0.0</xyz>
    <limit>
      <lower>0.0</lower>
      <upper>45.0</upper>
    </limit>
    <dynamics/>
  </axis>

</joint>

This new configuration makes the tractor speed forward out of the plain. And the frontloader arm appear under the tractor making it tilt even more. Below is a picture with the inertial boxes displayed as you asked. image description`

I have also raised the enertia values as you suggested from

<pose>1.8 0.0 0.0 3.14159265 0.0 -1.570796326794897</pose>
  <inertial>
    <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
    <mass>1</mass>
    <inertia>
      <ixx>0.01</ixx>
      <ixy>0.0</ixy>
      <ixz>0.0</ixz>
      <iyy>0.01</iyy>
      <iyz>0.0</iyz>
      <izz>0.01</izz>
    </inertia>
  </inertial>

To

<pose>1.8 0.0 0.0 3.14159265 0.0 -1.570796326794897</pose>
  <inertial>
    <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
    <mass>1</mass>
    <inertia>
      <ixx>0.5</ixx>
      <ixy>0.0</ixy>
      <ixz>0.0</ixz>
      <iyy>0.5</iyy>
      <iyz>0.0</iyz>
      <izz>0.5</izz>
    </inertia>
  </inertial>

I'm pretty sure this is a misconfiguration in my values...perhaps pose? Could you tell me if the way these 2 joints are configured makes sense? Is there a better way to do it? As I stated before, the idea is to have the frontloader arm revolute up and down when I press two previously configured keys. For this, I have setup a plugin already. Any other ideas of what I am doing wrong?

Thank you very much for your time. it is deeply appreciated!

Thank you for taking the time to answer the question. I made some changes to the SDF file. I have a joint which connects the shovel to the frontloader (shovel_joint) and another joint, which is supposed to connect the frontloader to the tractor (frontloader_joint). The is supposed to revolute around the frontloader_joint. Originally, my shovel_joint had a parent of base and the frontloader_joint was it's child. I changed things around, so that now frontloader_joint is connected to base and shovel_joint has front_loader_link as it's parent as here:

<joint name="frontloader_joint" type="revolute">
  <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
  <child>frontloader_link</child>
  <parent>base</parent>
  <axis>
    <xyz>0.0 1.0 0.0</xyz>
    <limit>
      <lower>0.0</lower>
      <upper>90.0</upper>
    </limit>
    <dynamics/>
  </axis>
</joint>`<joint name="shovel_joint" type="revolute">
  <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
  <child>shovel_link</child>
  <parent>base</parent>
<parent>frontloader_link</parent>
  <axis>
    <xyz>0.0 0.0 0.0</xyz>
    <limit>
      <lower>0.0</lower>
      <upper>45.0</upper>
    </limit>
    <dynamics/>
  </axis>

</joint>

This new configuration makes the tractor speed forward out of the plain. And the frontloader arm appear under the tractor making it tilt even more. Below is a picture with the inertial boxes displayed as you asked. image description`

I have also raised the enertia values as you suggested from

<pose>1.8 0.0 0.0 3.14159265 0.0 -1.570796326794897</pose>
  <inertial>
    <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
    <mass>1</mass>
    <inertia>
      <ixx>0.01</ixx>
      <ixy>0.0</ixy>
      <ixz>0.0</ixz>
      <iyy>0.01</iyy>
      <iyz>0.0</iyz>
      <izz>0.01</izz>
    </inertia>
  </inertial>

To

<pose>1.8 0.0 0.0 3.14159265 0.0 -1.570796326794897</pose>
  <inertial>
    <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
    <mass>1</mass>
    <inertia>
      <ixx>0.5</ixx>
      <ixy>0.0</ixy>
      <ixz>0.0</ixz>
      <iyy>0.5</iyy>
      <iyz>0.0</iyz>
      <izz>0.5</izz>
    </inertia>
  </inertial>

I'm pretty sure this is a misconfiguration in my values...perhaps pose? Could you tell me if the way these 2 joints are configured makes sense? Is there a better way to do it? As I stated before, the idea is to have the frontloader arm revolute up and down when I press two previously configured keys. For this, I have setup a plugin already. Any other ideas of what I am doing wrong?

Thank you very much for your time. it is deeply appreciated!

Thank you for taking the time to answer the question. I made some changes to the SDF file. I have a joint which connects the shovel to the frontloader (shovel_joint) and another joint, which is supposed to connect the frontloader to the tractor (frontloader_joint). The is supposed to revolute around the frontloader_joint. Originally, my shovel_joint had a parent of base and the frontloader_joint was it's child. I changed things around, so that now frontloader_joint is connected to base and shovel_joint has front_loader_link as it's parent as here:

<joint name="frontloader_joint" type="revolute">
  <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
  <child>frontloader_link</child>
  <parent>base</parent>
  <axis>
    <xyz>0.0 1.0 0.0</xyz>
    <limit>
      <lower>0.0</lower>
      <upper>90.0</upper>
    </limit>
    <dynamics/>
  </axis>
</joint>`<joint name="shovel_joint" type="revolute">
  <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
  <child>shovel_link</child>
  <parent>frontloader_link</parent>
  <axis>
    <xyz>0.0 0.0 0.0</xyz>
    <limit>
      <lower>0.0</lower>
      <upper>45.0</upper>
    </limit>
    <dynamics/>
  </axis>

</joint>

This new configuration makes the tractor speed forward out of the plain. move very slowly backwards. And the frontloader arm appear under the tractor making it tilt even more. Below is a picture with the inertial boxes displayed as you asked. image description`image description

I have also raised the enertia values as you suggested from

<pose>1.8 0.0 0.0 3.14159265 0.0 -1.570796326794897</pose>
  <inertial>
    <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
    <mass>1</mass>
    <inertia>
      <ixx>0.01</ixx>
      <ixy>0.0</ixy>
      <ixz>0.0</ixz>
      <iyy>0.01</iyy>
      <iyz>0.0</iyz>
      <izz>0.01</izz>
    </inertia>
  </inertial>

To

<pose>1.8 0.0 0.0 3.14159265 0.0 -1.570796326794897</pose>
  <inertial>
    <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
    <mass>1</mass>
    <inertia>
      <ixx>0.5</ixx>
      <ixy>0.0</ixy>
      <ixz>0.0</ixz>
      <iyy>0.5</iyy>
      <iyz>0.0</iyz>
      <izz>0.5</izz>
    </inertia>
  </inertial>

I'm pretty sure this is a misconfiguration in my values...perhaps pose? Could you tell me if the way these 2 joints are configured makes sense? Is there a better way to do it? As I stated before, the idea is to have the frontloader arm revolute up and down when I press two previously configured keys. For this, I have setup a plugin already. Any other ideas of what I am doing wrong?

Thank you very much for your time. it is deeply appreciated!