ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

tf problem of stereo_odometer in viso2_ros

asked 2018-05-30 03:19:54 -0500

LU_Xiaojun gravatar image

updated 2018-06-04 04:16:23 -0500

Miquel Massot gravatar image

I am simulating a four wheel robot with a stereo camera. When I: "rosrun viso2_ros stereo_odometer", a WARN comes: [ WARN] [1527666187.078464034, 18.886000000]: The tf from '/base_link' to 'TOPY_robot/left_camera' does not seem to be available, will assume it as identity! Actually I have already used: static_transform_publisher to publish the tf as following:

<node pkg="tf" type="static_transform_publisher" name="zed_tf_broadcaster" args="0.215, 0.06, 0.5289 0 0 0 1 /base_link TOPY_robot/left_camera 100" />

I also checked it with rostopic echo: luxiaojun@luxiaojun-P50:~/catkin_ws$ rostopic echo /tf transforms:


header: 
  seq: 0
  stamp: 
    secs: 1248
    nsecs: 724000000
  frame_id: "/base_link"
child_frame_id: "TOPY_robot/left_camera"
transform: 
  translation: 
    x: 0.215
    y: 0.06
    z: 0.5289
  rotation: 
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0

rostopic echo /TOPY_robot/zedcamera/left/image_raw/header 
     seq: 195 
     stamp: 
       secs: 39 
       nsecs: 238000000 
     frame_id: "TOPY_robot/left_camera".

my launchfile:

<launch>
  <arg name="camera" default="/TOPY_robot/zedcamera"/>
  <node ns="$(arg camera)" pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc"/>
  <node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer"> 
    <remap from="stereo" to="$(arg camera)"/>
    <remap from="image" to="image_raw"/> 
  </node>
</launch>

Can anyone help me ? Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-30 07:04:19 -0500

Miquel Massot gravatar image

updated 2018-06-04 04:19:07 -0500

Hi LU_Xiaojun,

viso2 is trying to lookup a transform between the camera frame_id and the frame_id /base_link.

Is the frame_id of your camera TOPY_robot/left_camera? Can you check it with a

rostopic echo /your_camera_topic/image_raw/header

if this is correct, does your camera frame_id have already a parent? To check this, remove viso2 from the launchfile and launch your setup. Once your setup is running, in a terminal run

rosrun tf view_frames && evince frames.pdf

And you will see your TF tree. If your camera already has a parent TF, the parameter base_link_frame_id from viso2 should be changed.

edit flag offensive delete link more

Comments

Thank you. Without viso2, camera doesn't have a parent TF. How to set odom_frame_id, base_link_frame_id and sensor_frame_id in viso2? I'm confused, as i see in the demo.launch, base_link_frame_id was set as /stereo_forward; tf: base_link_frame_id -> sensor_frame_id was not even set.

LU_Xiaojun gravatar image LU_Xiaojun  ( 2018-06-04 21:22:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-30 03:19:54 -0500

Seen: 227 times

Last updated: Jun 04 '18