Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sensor Pose is wrong

Hi,

I am having trouble with ray sensors and their pose in gazebo 1.4. The pose of links can be handled like I want them to behave. So I fixed my problem by using an extra link for each sensor until now.

<link name="link_sensor1"> <pose>0.0 0.0 0.51 0.0 0.0 0.0</pose> <sensor name="raysensor" type="ray"> <always_on>true</always_on> <visualize>true</visualize> <ray> </ray> </sensor> </link> <link name="link_sensor2"> <pose>0.0 0.0 0.51 0.0 -1.57 0.0 </pose> <sensor name="raysensor2" type="ray"> <always_on>true</always_on> <visualize>true</visualize> <ray> </ray> </sensor> </link>

Now I want to add all the sensors to one link, to have an easier control via joints (I don't want to add a seperate joint for each sensor)

The model:

<model name="box">
  <pose>0 0 0.5 0 0 0</pose>
  <static>false</static>
  <link name="link">
    <inertial>
      <mass>1.0</mass>
      <inertia>
        <ixx>1.0</ixx>
        <ixy>0.0</ixy>
        <ixz>0.0</ixz>
        <iyy>1.0</iyy>
        <iyz>0.0</iyz>
        <izz>1.0</izz>
      </inertia>
    </inertial>
    <collision name="collision">
      <geometry>
        <box>
          <size>1 1 1</size>
        </box>
      </geometry>
     </collision>
    <visual name="collision">
      <geometry>
        <box>
          <size>1 1 1</size>
        </box>
      </geometry>
    </visual>
  </link>
  <link name="link2">
    <sensor name="raysensor" type="ray">
      <always_on>true</always_on>
      <visualize>true</visualize>
      <pose>0.0 0.0 0.51 0.0 0.0 0.0</pose>
      <ray>
        ...
      </ray>
    </sensor>
    <sensor name="raysensor2" type="ray">
      <always_on>true</always_on>
      <visualize>true</visualize>
      <pose>0.0 0.0 0.51 0.0 -1.57 0.0 </pose>
      <ray>
       ...
      </ray>
    </sensor>
  </link>
  <joint name="my_joint" type="revolute">
    <parent>link</parent>
    <child>link2</child>
    <axis>
      <xyz>0 0 1</xyz>
    </axis>
  </joint>
</model>

In gazebo there is the following result: image description

I don't get any rotation done correctly...

Sensor Pose is wrong

Hi,

I am having trouble with ray sensors and their pose in gazebo 1.4. The pose of links can be handled like I want them to behave. So I fixed my problem by using an extra link for each sensor until now.

 <link name="link_sensor1">
   <pose>0.0 0.0 0.51 0.0 0.0 0.0</pose>
   <sensor name="raysensor" type="ray">
     <always_on>true</always_on>
     <visualize>true</visualize>
     <ray>
       <!--...-->
     </ray>
    </sensor>
 </link>
 <link name="link_sensor2">
   <pose>0.0 0.0 0.51 0.0 -1.57 0.0 </pose>
   <sensor name="raysensor2" type="ray">
     <always_on>true</always_on>
     <visualize>true</visualize>
     <ray>
        <!--...-->
      </ray>
   </sensor>
</link>

</link>

Now I want to add all the sensors to one link, to have an easier control via joints (I don't want to add a seperate joint for each sensor)

The model:

<model name="box">
  <pose>0 0 0.5 0 0 0</pose>
  <static>false</static>
  <link name="link">
    <inertial>
      <mass>1.0</mass>
      <inertia>
        <ixx>1.0</ixx>
        <ixy>0.0</ixy>
        <ixz>0.0</ixz>
        <iyy>1.0</iyy>
        <iyz>0.0</iyz>
        <izz>1.0</izz>
      </inertia>
    </inertial>
    <collision name="collision">
      <geometry>
        <box>
          <size>1 1 1</size>
        </box>
      </geometry>
     </collision>
    <visual name="collision">
      <geometry>
        <box>
          <size>1 1 1</size>
        </box>
      </geometry>
    </visual>
  </link>
  <link name="link2">
    <sensor name="raysensor" type="ray">
      <always_on>true</always_on>
      <visualize>true</visualize>
      <pose>0.0 0.0 0.51 0.0 0.0 0.0</pose>
      <ray>
        ...
      </ray>
    </sensor>
    <sensor name="raysensor2" type="ray">
      <always_on>true</always_on>
      <visualize>true</visualize>
      <pose>0.0 0.0 0.51 0.0 -1.57 0.0 </pose>
      <ray>
       ...
      </ray>
    </sensor>
  </link>
  <joint name="my_joint" type="revolute">
    <parent>link</parent>
    <child>link2</child>
    <axis>
      <xyz>0 0 1</xyz>
    </axis>
  </joint>
</model>

In gazebo there is the following result: image description

I don't get any rotation done correctly...correctly... What am I doing wrong? Can anyone help me please...