Ask Your Question
0

Why can't rtabmap_ros access the published zed camera topics?

asked 2020-02-26 10:16:39 -0500

Uwe gravatar image

updated 2020-03-13 06:03:55 -0500

Hi,

I'm new to ROS and currently working on using rtabmap with move_base and the zed camera on a jetston-tx2 for Navigation.

I start the roscore on the Host machine.

Than I start the zed node on the robot.

$ roslaunch zed_wrapper zed.launch

During the start the following error comes up:

...[ INFO] [1582724028.740786655]: depth_frame: depth_frame
Couldn't find an AF_INET address for [hostname]
Couldn't find an AF_INET address for [hostname]
Couldn't find an AF_INET address for [hostname]
ZED (Init) >> Depth mode: PERFORMANCE
ZED (Init) >> Video mode: HD720@30

At this point I can see the topcis published by the zed camere via rostopic list and via rqt, but any rtabmap or rviz application I start returns something similar to this:

...[ WARN] [1582724056.543819469]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
    /rtabmap/rtabmap subscribed to (exact sync):
   /rtabmap/odom,
   /zed/zed_node/left/image_rect_color,
   /zed/zed_node/right/image_rect_color,
   /zed/zed_node/left/camera_info,
   /zed/zed_node/right/camera_info,
   /rtabmap/odom_info

Meanwhile in the zed node terminal:

...[ WARN] [1582724033.052059891]: The tf from 'base_frame' to 'camera_frame' does not seem to be available, will assume it as identity!
Couldn't find an AF_INET address for [hostname]
Couldn't find an AF_INET address for [hostname]
Couldn't find an AF_INET address for [hostname]
Couldn't find an AF_INET address for [hostname]
Couldn't find an AF_INET address for [hostname]...

Additional Information:

On host machine: ros_kinetic, Ubuntu 16.04, 4.15.0-76-generic

On jetson-tx2: ros_kinetic, Ubuntu 16.04, 4.4.38-tegra, zed_wrapper: 2.8.x

Regarding the AF_INET address error i already tried this: https://answers.ros.org/question/1635...

But that didnt change anything for me.

I also wrote two tf static_transform_publisher which added the camera_frame and base_frame into the existingt tf_tree. After I had done that the frames where in the tf_tree and there was a transform between them but the error message still appeared. I would rather change that directly in the zed_urdf but I can't find where they're defined.

It would be very much appreciated if You could give me some idea on what to look into.

Best regards, Uwe

Things I tryed so fa, but didn't work out: -Reinstall rtabmap -Built rtabmap from source -Run diffrent examples -Turn approx sync = true

Edit: I now have tried running the example (http://wiki.ros.org/rtabmap_ros/Tutor...) on the jetson itself and I got the same error message. The Topics are being publish and aren't empty.

edit retag flag offensive close merge delete

Comments

I fixed the AF_INET Error by following http://wiki.ros.org/ROS/NetworkSetup

Uwe gravatar image Uwe  ( 2020-02-26 10:16:06 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-02-27 04:39:32 -0500

bob-ROS gravatar image

updated 2020-02-28 08:32:28 -0500

The ZED creates its own base_link which I found to be problematic. Here is where it is created:

https://github.com/stereolabs/zed-ros...

I added the frames from the ZED manually to my URDF and setting the publish_urdf argument to false for zed_camera.launch

https://github.com/bob-ROS/asc_projec...

  <link name="zed_camera_center">
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <geometry>
        <mesh filename="package://asc_description/meshes/ZED/ZED.stl"/>
      </geometry>
      <material name="light_grey">
        <color rgba="0.8 0.8 0.8 0.8"/>
      </material>
    </visual>   </link> 

  <joint name="base_to_camera" type="fixed">
    <origin xyz="0.149 0 0.49" rpy="0 -0.1 0"/> <!-- tune pitch here -->
    <parent link="base_link"/>
    <child link="zed_camera_center"/>   </joint>   <link name="camera_link_pc"/>   <joint name="camera_to_pc" type="fixed">
    <origin xyz="0 0 0" rpy="-1.57 0 -1.57"/>
    <parent link="zed_camera_center"/>
    <child link="camera_link_pc"/>   </joint>
     <!-- Left Camera -->   <joint name="zed_left_camera_joint" type="fixed">
    <parent link="zed_camera_center"/>
    <child link="zed_left_camera_frame"/>
    <origin xyz="0 0.06 0" rpy="0 0 0"/>   </joint>   <link name="zed_left_camera_frame"/>   <joint name="zed_left_camera_optical_joint" type="fixed">
    <origin xyz="0 0 0" rpy="-1.57079632679 0.0
-1.57079632679"/>
    <parent link="zed_left_camera_frame"/>
    <child link="zed_left_camera_optical_frame"/> </joint>   <link name="zed_left_camera_optical_frame"/> <!-- Right Camera -->   <joint name="zed_right_camera_joint" type="fixed">
    <parent link="zed_camera_center"/>
    <child link="zed_right_camera_frame"/>
    <origin xyz="0 -0.06 0" rpy="0 0 0"/>   </joint>   <link name="zed_right_camera_frame"/>   <joint name="zed_right_camera_optical_joint" type="fixed">
    <origin xyz="0 0 0" rpy="-1.57079632679 0.0
-1.57079632679"/>
    <parent link="zed_right_camera_frame"/>
    <child link="zed_right_camera_optical_frame"/> </joint>   <link name="zed_right_camera_optical_frame"/>

You could probably resolve this by rewriting the existing zed URDF file to not use the base_link and then connect your existing base_link to e.g. "zed_base_link".

edit flag offensive delete link more

Comments

Hey, thank you for your fast reply. I will try this asap. I think I still misunderstand something about the frames. Doesn't the zed camera also publish the frames base_frame and camera_frame? My tf tree looks pretty much like this: https://answers.ros.org/question/3313...

Uwe gravatar image Uwe  ( 2020-02-28 04:42:20 -0500 )edit

What frames does your robot have?

bob-ROS gravatar image bob-ROS  ( 2020-02-28 08:35:14 -0500 )edit

Sry for replying so late. At the moment I'm just trying to run rtabmap on the jetson an drive the robot via remote control through an eviorment for stereo mapping, so I didnt attach the Robotframes.

Uwe gravatar image Uwe  ( 2020-03-04 11:48:47 -0500 )edit

I don't think it is a frame problem. "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called. So I assume you didn't run the existing example. Check this example out

bob-ROS gravatar image bob-ROS  ( 2020-03-04 17:07:55 -0500 )edit

I also tried to turn "approx_sync" true, but it didn't change the outcome. It just erased the sentence from the error output in the terminal. I can try this example tomorrow and will report on the outcome. Thank you for your help so far. :)

Uwe gravatar image Uwe  ( 2020-03-05 12:22:30 -0500 )edit

The example you sended me ist the zed example which dosen't work for remote mapping, or does it? I wish to start the camera on the robot and rtabmap on the remote computer which ist hosting the roscore. I thougth maybe I should this http://wiki.ros.org/rtabmap_ros/Tutor... tutorial first, but I got a diffrent error now. I guess I should wirte a new thread about that error now. Am I right about this? Asking because the structure of message boards for asking questions is new to me.

Uwe gravatar image Uwe  ( 2020-03-07 11:37:45 -0500 )edit

I would recommend having the robot as the master, which Matlabbe also does in that tutorial.

bob-ROS gravatar image bob-ROS  ( 2020-03-07 12:27:14 -0500 )edit

Yes, I agree this would be better. At the moment I'm not able to change that circumstance, due to other partys working on the robot and some errors which were solved doing it this way around. If that would be the definitive origin of my erros though, I would look into that.

Uwe gravatar image Uwe  ( 2020-03-07 12:39:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-02-26 09:52:29 -0500

Seen: 35 times

Last updated: Mar 13