0
$\begingroup$

Rosanswers logo

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 

where,

  • 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() 
Aborted 

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!


Originally posted by liquidmonkey on ROS Answers with karma: 37 on 2011-11-08

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You should start roscore before running bag_to_pcd.


Originally posted by joq with karma: 25443 on 2011-11-09

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by joq on 2011-11-10:
If you can't figure that out yourself, please post a new question.

Comment by liquidmonkey on 2011-11-09:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.