Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to set forceon links when some of the links are of mass zero?

Hi,

I am trying to model three revolute joints in series using an sdf file (below you can find the sdf snippet for link and joint definition) with the following configuration:

  1. Revolute 1 with axis (0 0 1): Main_body->Link1 (zero mass)
  2. Revolute 1 with axis (0 1 0): Link1 (zero mass)->Link2(zero mass)
  3. Revolute 1 with axis (1 0 0): Link2 (zero mass) -> Link3

Here link 1 and link 2 are of zero mass.

The problem is when I am trying to assign a force using SetForce function to main body at its center of mass, it is not moving. I guess this is because Gazebo is unable to solve the forces through massless link to be transferred to the link 3 which is not mass less. I am however able to set any acceleration, velocity and position to any of the link. I want to apply force to the main body. Is there a way around? I would also want to apply torques to the link 3 from mainbody.

Also I am trying to apply force on the joints between main_body and link 1 and that also seems to not be working. Please suggest the needful. Thank you.

Massless link defination <link name="RW2"> <pose frame="">0 0 0 0 0 0</pose> <inertial> <pose frame="">0.030076 -1e-06 -0.015425 0 -0 0</pose> <mass>0</mass> <inertia> <ixx>0</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>0</iyy> <iyz>0</iyz> <izz>0</izz> </inertia> </inertial> <self_collide>0</self_collide> <enable_wind>0</enable_wind> <kinematic>1</kinematic> <visual name="RW2_visual"> <pose frame="">0 0 0 0 -0 0</pose> <geometry> <mesh> <scale>0.1 0.1 0.1</scale> <uri>/home/suyash/urdf_main/src/cleaner/meshes/RW.STL</uri> </mesh> </geometry> <material> <shader type="pixel"/> </material> <transparency>1</transparency> <cast_shadows>0</cast_shadows> </visual> </link>

JOINT definition: <joint name="RW1_to_RW2" type="revolute"> <parent>RW1</parent> <child>RW2</child> <pose frame="">0 0 -0.015 0 -0 0</pose> <axis> <xyz>0 1 0</xyz> <use_parent_model_frame>0</use_parent_model_frame> <limit> <lower>-1</lower> <upper>1</upper> <velocity>100</velocity> </limit> </axis> </joint>

click to hide/show revision 2
None

How to set forceon links when some of the links are of mass zero?

Hi,

I am trying to model three revolute joints in series using an sdf file (below you can find the sdf snippet for link and joint definition) with the following configuration:

  1. Revolute 1 with axis (0 0 1): Main_body->Link1 (zero mass)
  2. Revolute 1 with axis (0 1 0): Link1 (zero mass)->Link2(zero mass)
  3. Revolute 1 with axis (1 0 0): Link2 (zero mass) -> Link3

Here link 1 and link 2 are of zero mass.

The problem is when I am trying to assign a force using SetForce function to main body at its center of mass, it is not moving. I guess this is because Gazebo is unable to solve the forces through massless link to be transferred to the link 3 which is not mass less. I am however able to set any acceleration, velocity and position to any of the link. I want to apply force to the main body. Is there a way around? I would also want to apply torques to the link 3 from mainbody.

Also I am trying to apply force on the joints between main_body and link 1 and that also seems to not be working. Please suggest the needful. Thank you.

Massless link defination defination

  <link name="RW2">
    name='RW2'>
    <pose frame="">0 frame=''>0 0 0 0 0 0</pose>
     <inertial>
       <pose frame="">0.030076 frame=''>0.030076 -1e-06 -0.015425 0 -0 0</pose>
       <mass>0</mass>
       <inertia>
         <ixx>0</ixx>
         <ixy>0</ixy>
         <ixz>0</ixz>
         <iyy>0</iyy>
         <iyz>0</iyz>
         <izz>0</izz>
       </inertia>
     </inertial>
     <self_collide>0</self_collide>
     <enable_wind>0</enable_wind>
     <kinematic>1</kinematic>
     <visual name="RW2_visual">
    name='RW2_visual'>
      <pose frame="">0 frame=''>0 0 0 0 -0 0</pose>
       <geometry>
         <mesh>
           <scale>0.1 0.1 0.1</scale>
           <uri>/home/suyash/urdf_main/src/cleaner/meshes/RW.STL</uri>
         </mesh>
       </geometry>
       <material>
         <shader type="pixel"/>
    type='pixel'/>
      </material>
       <transparency>1</transparency>
       <cast_shadows>0</cast_shadows>
     </visual>
      </link>

</link>

JOINT definition: definition:

 <joint name="RW1_to_RW2" type="revolute">
    name='RW1_to_RW2' type='revolute'>
    <parent>RW1</parent>
     <child>RW2</child>
     <pose frame="">0 frame=''>0 0 -0.015 0 -0 0</pose>
     <axis>
       <xyz>0 1 0</xyz>
       <use_parent_model_frame>0</use_parent_model_frame>
       <limit>
         <lower>-1</lower>
         <upper>1</upper>
         <velocity>100</velocity>
       </limit>
     </axis>
      </joint>

</joint>