Gazebo | Ignition | Community
Ask Your Question
0

Mismatch between pose of a model in sdf & simulation [closed]

asked 2022-02-28 06:44:47 -0600

user1928 gravatar image

updated 2022-03-02 00:21:08 -0600

Hello,

I want to use a camera in Gazebo & used the model from https://github.com/osrf/gazebo_models. I changed the pose of the camera in its sdf file as follows (& saved it):

 <pose>0 0 0.5 0 1.5708 1.5708</pose>

But, if I launch gazebo & insert the camera model from GUI & check its properties, I see different roll, pitch & yaw: image description

What is happening here?

P.S: 1) I'm using Gazebo11 on Ubuntu 20.04

P.S: 2) This is my camera's sdf file(I'm using a plugin to read camera feed in ROS):

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="camera">
    <pose>0 0 0.5 0 1.5708 1.5708</pose>
    <link name="link">
      <gravity>0</gravity>
      <inertial>
        <mass>0.1</mass>
        <inertia>
          <ixx>1.000166667</ixx>
          <iyy>1.000166667</iyy>
          <izz>1.000166667</izz>
        </inertia>
      </inertial>
      <collision name="collision">
        <geometry>
          <box>
            <size>0.1 0.1 0.1</size>
          </box>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <box>
            <size>0.1 0.1 0.1</size>
          </box>
        </geometry>
      </visual>
      <sensor name="camera" type="camera">
        <camera>
          <horizontal_fov>1.047</horizontal_fov>
          <image>
            <width>320</width>
            <height>240</height>
          </image>
          <clip>
            <near>0.1</near>
            <far>100</far>
          </clip>
        </camera>
        <always_on>1</always_on>
        <update_rate>30</update_rate>
        <visualize>true</visualize>
        <plugin name="camera_controller" filename="libgazebo_ros_camera.so">
          <alwaysOn>true</alwaysOn>
          <updateRate>0.0</updateRate>
          <cameraName>free_camera</cameraName>
          <imageTopicName>/free_camera/image_raw</imageTopicName>
          <cameraInfoTopicName>/free_camera/camera_info</cameraInfoTopicName>
          <frameName>camera_link</frameName>
          <hackBaseline>0.07</hackBaseline>
          <distortionK1>0.0</distortionK1>
          <distortionK2>0.0</distortionK2>
          <distortionK3>0.0</distortionK3>
          <distortionT1>0.0</distortionT1>
          <distortionT2>0.0</distortionT2>
        </plugin>
      </sensor>
    </link>
  </model>
</sdf>
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by user1928
close date 2022-03-02 01:44:54.998399

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-03-02 01:43:48 -0600

user1928 gravatar image

Never mind.

Both are equivalent representations. Follow the rule: First roll around x, then pitch around y and finally yaw around z

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-02-28 06:44:47 -0600

Seen: 74 times

Last updated: Mar 02 '22