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

bag_to_pcd failed to contact master

asked 2011-11-08 19:46:26 -0600

liquidmonkey gravatar image

updated 2011-11-16 04:42:18 -0600

tfoote gravatar image

i'm trying to run 'bag_to_pcd' from the terminal but keep getting the following error..

[ERROR] [1320830633.224372085]: [registerPublisher] Failed to contact master at [localhost:11311].  Retrying... 

rosrun pcl_ros bag_to-pcd points2.bag /camera/depth/points2 mr


  • points2.bag is my bag file
  • /camera/depth/points2 is the topic
  • mr is the directory where to put the pcd files

if i ctrl c out of it, the following comes up...

^Cterminate called after throwing an instance of 'ros::TimeNotInitializedException' 
  what():  Cannot use ros::Time::now() before the first NodeHandle has been created or ros::start() has been called.  If this is a standalone app or test that just uses ros::Time and does not communicate over ROS, you may also call ros::Time::init() 

and rosbag info points2.bag gives me...

path:        points2.bag 
version:     2.0 
duration:    8.6s 
start:       Nov 08 2011 15:23:14.96 (1320762194.96) 
end:         Nov 08 2011 15:23:23.58 (1320762203.58) 
size:        156.9 MB 
messages:    428 
compression: none [143/143 chunks] 
types:       sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181] 
topics:      /camera/depth/points2   428 msgs    : sensor_msgs/PointCloud2

thanks for reading!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-11-09 01:27:50 -0600

joq gravatar image

You should start roscore before running bag_to_pcd.

edit flag offensive delete link more


yep, that was it. but now there seems to be an issue with the way bag-to_pcd is doing the actual conversion. i get a bunch of binary pcd files which only display a few points when using rxbag.
liquidmonkey gravatar image liquidmonkey  ( 2011-11-09 19:19:38 -0600 )edit
If you can't figure that out yourself, please post a *new* question.
joq gravatar image joq  ( 2011-11-10 02:40:04 -0600 )edit

Question Tools


Asked: 2011-11-08 19:46:26 -0600

Seen: 2,193 times

Last updated: Nov 16 '11