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

Rosrun error

asked 2013-03-04 18:13:06 -0500

mdegges gravatar image

updated 2013-03-04 18:13:51 -0500

Quick question-

I'm trying to create a working subscriber to grab pointcloud data from my .bag file. 1. First I created a subscribe.cpp file in workspace/package_name. 2. Then I figured I'd use bag_to_pcd in pcl_ros to get all the pointcloud2 messages out of the .bag file and saved as .pcd files. (Is this necessary?) 3. Later, I can do the calculations I need to on each individual pointcloud.

Right now I'm having trouble with step #2. I did "rosrun pcl_ros bag_to_pcd test.bag /sensor_msgs/PointCloud2 pcd_dir" - I'm getting this error:

[code]Creating directory pcd_dir Saving recorded sensor_msgs::PointCloud2 messages on topic /sensor_msgs/PointCloud2 to pcd_dir Frame /tx90/base_link exists with parent NO_PARENT.[/code]

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-03-05 00:12:43 -0500

mdegges gravatar image

This solved the answer to my problem:

Apparently doing "rosrun pcl_ros pointcloud_to_pcd input:=/sr/pointcloud2_raw" the is the same as using bag_to_pcd, and there is some error with the bag_to_pcd function.

edit flag offensive delete link more


It's better that you edit your question rather than posting an answer

Miquel Massot gravatar image Miquel Massot  ( 2013-03-05 00:57:57 -0500 )edit

answered 2013-03-04 20:54:36 -0500

Miquel Massot gravatar image

updated 2013-03-05 00:00:24 -0500

Check that call again, (look the wiki) for bag_to_pcd you have to provide the message topic, not the message type, e.g. put there

rosrun pcl_ros bag_to_pcd PATH/TO/BAGFILE.bag /my_sensor/my_points2_topic OUTPUT_DIR

Furthermore, you'll need to provide a valid tf from the sensor frame id to the frame id /base_link as it is hardcoded in the bag_to_pcd. You can do that with a static transform publisher.

if you don't know the topic, do a

rosbag info PATH/TO/BAGFILE.bag

and check which topic is a sensor_msgs/PointCloud2

edit flag offensive delete link more


Ahh thanks for your help. I revised my input to "rosrun pcl_ros bag_to_pcd test.bag /sr/pointcloud2_raw pcd_dir". Now I am getting a different error: [ERROR] [1362484330.452858904]: Frame id /base_link does not exist! Frames (3): Frame /tx90/flange exists with parent /tx90/base_link. Frame /tx90/bas

mdegges gravatar image mdegges  ( 2013-03-04 23:54:01 -0500 )edit

Question Tools


Asked: 2013-03-04 18:13:06 -0500

Seen: 779 times

Last updated: Mar 05 '13