Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No TF data" in rviz when running ros_depth_camera tutorial #139

Open
FSund opened this issue Feb 25, 2021 · 3 comments
Open

"No TF data" in rviz when running ros_depth_camera tutorial #139

FSund opened this issue Feb 25, 2021 · 3 comments

Comments

@FSund
Copy link

FSund commented Feb 25, 2021

I'm trying to follow the ros_depth_camera tutorial, but having some issues when trying to visualize in RViz.

I launch gazebo via roslaunch gazebo_ros empty_world.launch, add my model and run rosrun rviz rviz, but I get "No TF data" under Global Status/Fixed Frame, so I'm unable to visualize the PointCloud2.

rosrun tf2_tools view_frames.py also reports "no tf data received", and the /tf and /tf_static topics are not showing any messages.

Environment:

  • Ubuntu 20.04
  • ROS Noetic

model.sdf

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="kinect_depth">
    <static>true</static>
    <pose>0 0 0.036 0 0 0</pose>
    <link name="link">
      <inertial>
        <mass>0.1</mass>
      </inertial>
      <collision name="collision">
        <geometry>
          <box>
            <size>0.073000 0.276000 0.072000</size>
          </box>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://kinect_depth/meshes/kinect.dae</uri>
          </mesh>
        </geometry>
      </visual>
      <sensor name="camera" type="depth">
        <update_rate>20</update_rate>
        <camera>
          <horizontal_fov>1.047198</horizontal_fov>
          <image>
            <width>640</width>
            <height>480</height>
            <format>R8G8B8</format>
          </image>
          <clip>
            <near>0.05</near>
            <far>3</far>
          </clip>
        </camera>
        <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so">
          <baseline>0.2</baseline>
          <alwaysOn>true</alwaysOn>
          <!-- Keep this zero, update_rate in the parent <sensor> tag
            will control the frame rate. -->
          <updateRate>0.0</updateRate>
          <cameraName>camera_ir</cameraName>
          <imageTopicName>/camera/color/image_raw</imageTopicName>
          <cameraInfoTopicName>/camera/color/camera_info</cameraInfoTopicName>
          <depthImageTopicName>/camera/depth/image_raw</depthImageTopicName>
          <depthImageCameraInfoTopicName>/camera/depth/camera_info</depthImageCameraInfoTopicName>
          <pointCloudTopicName>/camera/depth/points</pointCloudTopicName>
          <frameName>camera_link</frameName>
          <pointCloudCutoff>0.5</pointCloudCutoff>
          <pointCloudCutoffMax>3.0</pointCloudCutoffMax>
          <distortionK1>0</distortionK1>
          <distortionK2>0</distortionK2>
          <distortionK3>0</distortionK3>
          <distortionT1>0</distortionT1>
          <distortionT2>0</distortionT2>
          <CxPrime>0</CxPrime>
          <Cx>0</Cx>
          <Cy>0</Cy>
          <focalLength>0</focalLength>
          <hackBaseline>0</hackBaseline>
        </plugin>
      </sensor>
    </link>
  </model>
</sdf>
@martinerk0
Copy link

You need to type camera_link in Fixed Frame in Global options.

@FSund
Copy link
Author

FSund commented Apr 14, 2021

That is obvious to me now that I have some more experience with ROS, but it was not clear from the tutorial at the time. Perhaps a notice about this should be added to the tutorial?

@martinerk0
Copy link

I agree. Also why is camera in rviz pointing upwards? There are 5 Q/A hacks doing multiple links / using static transform but people doing tutorials should not google this for hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants