Multiple TF issues while running SLAM
I am running ETH zurich's version of ORB SLAM on a bagfile of Kitti dataset of Stereo Images which I am playing at 0.1 r.
The SLAM publishes TF in the camera's frame,
world->cam0
1) I am trying to publish a static transform between cam0 and base-link the following code using in the launch file,
<node pkg="tf2_ros" type="static_transform_publisher" name="camera_broadcaster" args="1 0 0.5 -1.57 0 -1.57 base_link cam0" />
while I am able to see it when I echo /tf_static
sal@sal:~/helper_ws$ rostopic echo /tf_static
transforms:
-
header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: "base_link"
child_frame_id: "cam0"
transform:
translation:
x: 1.0
y: 0.0
z: 0.5
rotation:
x: -0.499999841466
y: 0.499601836645
z: -0.499999841466
w: 0.500398163355
---
but when I do rosrun tf view_frames this is what I get
I am also unable to visualize it in Rviz which says no transform exists between cam0 and base_link
This same problem exists when I run S-PTAM slam ,I wrote a small code to subscribe to pose and republish a transform between a new frame odom to the cam_link and still face the same issue. This issue only occurs when I publish a static transform on moving frame like cam0 if I instead publish on some other new random frame everything works perfectly.
Not sure what is wrong.
<node pkg="tf2_ros" type="static_transform_publisher" name="camera_broadcaster" args="1 0 0.5 -1.57 0 -1.57 base_link camera_link" />
here is sample tf data from orb_slam:
transforms:
-
header:
seq: 0
stamp:
secs: 1385798169
nsecs: 22117622
frame_id: "world"
child_frame_id: "cam0"
transform:
translation:
x: 25.4732408315
y: -1.2908452135
z: 79.1472754724
rotation:
x: 0.0172311913033
y: 0.69976084093
z: 0.00217123302013
w: 0.714166043224
---
transforms:
-
header:
seq: 0
stamp:
secs: 1385798169
nsecs: 22117622
frame_id: "world"
child_frame_id: "cam0"
transform:
translation:
x: 25.4732408315
y: -1.2908452135
z: 79.1472754724
rotation:
x: 0.0172311913033
y: 0.69976084093
z: 0.00217123302013
w: 0.714166043224
---
transforms:
-
header:
seq: 0
stamp:
secs: 1385798169
nsecs: 23126248
frame_id: "world"
child_frame_id: "cam0"
transform:
translation:
x: 25.4732408315
y: -1.2908452135
z: 79.1472754724
rotation:
x: 0.0172311913033
y: 0.69976084093
z: 0.00217123302013
w: 0.714166043224
---