Home | Tutorials | Wiki | Issues
Ask Your Question
0

depth camera is publishing wrong rotated pointcloud

asked 2015-10-01 09:29:57 -0500

Jan E. gravatar image

I am new to gazebo and ros. I am trying to simulate a kinect in gazebo and would like to view the data in rviz. But rviz is showing the pointcloud-data related to the Z-axis instead of x-axis. Now I'm not sure if the problem is related to rviz, the gazebo-plugin or the tf. Also wirred is, that he camera image is correct.

Gazebo: 6.1.0 Ros: Indigo Rviz: 1.11.8

image description

image description

mybot.xacro


<link name="chassis">
    <collision> 
      <origin xyz="0 0 0" rpy="0 0 0"/> 
      <geometry> 
        <box size=".4 .2 .1"/> 
      </geometry> 
    </collision>
    <visual> 
      <origin xyz="0 0 0" rpy="0 0 0"/> 
      <geometry> 
        <box size=".4 .2 .1"/> 
      </geometry> 
    </visual>
  </link>

  
  <joint name="camera_joint" type="fixed">
    <origin xyz=".175 0 .075" rpy="0 0 0"/>
    <parent link="chassis"/>
    <child link="camera_link"/>
  </joint>

  <link name="camera_link">
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <geometry>
    <box size="0.05 0.05 0.05"/>
      </geometry>
    </collision>

    <visual>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <geometry>
    <box size="0.05 0.05 0.05"/>
      </geometry>
      <material name="orange"/>
    </visual>

    <inertial>
      <mass value="1e-5"/>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/>
    </inertial>
  </link>

mybot.gazebo


<gazebo reference="chassis"></gazebo>

  
  <gazebo reference="camera_link">
    <sensor type="depth" name="openni_camera_camera">      
        <always_on>1</always_on>
        <visualize>true</visualize>             
        <camera>
            <horizontal_fov>1.3962634</horizontal_fov>  
            <image>
                <width>640</width>
                <height>480</height>
                <format>R8G8B8</format>
            </image>

            <clip>
                <near>0.1</near>
                <far>100</far>
            </clip>
        </camera>
        <plugin name="camera_controller" filename="libgazebo_ros_openni_kinect.so">
            <alwayson>true</alwayson>
                <updaterate>30.0</updaterate>
                <cameraname>cameraLeft</cameraname>
                <framename>camera_link</framename>                  
            <imagetopicname>CameraLeft/rgb/image_raw</imagetopicname>
            <depthimagetopicname>CameraLeft/depth/image_raw</depthimagetopicname>
            <pointcloudtopicname>CameraLeft/depth/points</pointcloudtopicname>
            <camerainfotopicname>CameraLeft/rgb/camera_info</camerainfotopicname>              
            <depthimagecamerainfotopicname>CameraLeft/depth/camera_info</depthimagecamerainfotopicname>            
            <pointcloudcutoff>0.8</pointcloudcutoff>
            <pointcloudcutoffmax>3.5</pointcloudcutoffmax>          
            </plugin>
    </sensor>
  </gazebo>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-03-17 06:54:30 -0500

der.sonic gravatar image

Any answers to this question? I am having the same problem right now. Using libgazebo_ros_camera and libgazebo_ros_openni_kinect controllers. RGB image is displayed properly in RViz, but depth cloud has two problems. One is that gazebo for some reason points depth camera to the left side of the robot/camera, and changing pose tag is not changing anything. At first that was the problem with RGB one, but pose tag helped in that case. Second problem is that in Rviz point cloud is rotated around Y axis I think, so it is in front of the robot, but points down through the ground, and displays the scene from the left side of the robot. Any suggestions? I can provide URDF if needed....

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2015-10-01 09:29:57 -0500

Seen: 1,085 times

Last updated: Mar 17