tf problem of stereo_odometer in viso2_ros
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.