Error in display of Pointcloud in /base_link frame
I tried to view a pointcloud2 message in rviz in /base_link frame. So i wrote a static transform publisher which published a tf base_link->camera_link. The pointcloud2 can be successfully viewed when fixed frame is camera_depth_frame but when i select fixed frame to be base_link the display stops and the pointcloud2 message in Rviz turns red.
What could be possibly wrong..? I am supplying the required Tf, then why does the pointcloud2 message does not transform to /base_link frame.
P.S.
1.During the above process the target frame is always filled with the option of fixed frame
2.The source of all the data is a bag file from Kinect.
3.Also i run roslaunch openni_launch openni.launch load_driver:=false. EDIT: Added the screenshot
Sounds like a problem with your transforms (what does the red text say?). Please run
rosrun tf view_frames
and upload the output somewhere.The error says "Message removed because it is too old" could this be because i didnt record the tf message at the time i recorded the bag file from Kinect..? But i also ran rosparam set use_sim_time true
Your tf-tree looks fine. Try disabling use_sim_time. Or if you leave it enabled, make sure that you are adding the
--clock
parameter torosbag play
Hey the problem found to be was that i didn't record tf messages at the time I recorded the Kinect data. So later when I played the data using rosbag --clock parameter , i also had to play the tf_broadcaster with --clock parameter. With this the error disappeared..!!