0
$\begingroup$

Rosanswers logo

Hi all, I am new on ROS and Linux. I am trying to display point cloud using rviz with VLP-16. Before starting to see real time data, I wanted to see how pcap file can be converted into human-readable, and visible data. So I used pcap file (downloaded from www.velodynelidar.com) to convert to bag file as follows:

$ rosrun velodyne_driver velodyne_node _mol:=VLP16 _pcap:=/home/soowon/Documents/County_Fair.pcap _read_once:=true

On new terminal, to record pcap data into bag file:

$ rosrun rosbag record -O Countyfair.bag /velodyne_packets

ON new terminal, I used rosbag to play bag file that I just made:

$ rosbag play Countyfair.bag

Another new terminal, to open rviz:

$ rosrun rviz rviz

Problem starts from here.

  1. I cannot see anything on the screen, even though I added PointCloud, PointCloud2. In rviz, it says "No tf data. Actual error: Fixed Frame [map] does not exist."
  2. Not only that I want to see point cloud in rviz, my ultimate goal is acquiring xyz coordinates for each frame. Can you guys tell me where can I find this data?

Any advice? I would appreciate :)


Originally posted by Soowon on ROS Answers with karma: 23 on 2016-02-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You probably forgot to set the rviz fixed frame to velodyne.

EDIT: You are not running the velodyne_pointcloud nodelet. That is the component that translates the raw packets into a point cloud.

You can use this launch script to view your PCAP data directly:

$ roslaunch velodyne_pointcloud VLP16_points.launch pcap:=/home/soowon/Documents/County_Fair.pcap

If you want to do it as described above in your question, be sure to spell the model parameter correctly:

$ rosrun velodyne_driver velodyne_node _model:=VLP16 _pcap:=/home/soowon/Documents/County_Fair.pcap

Then, run the point cloud node:

$ rosrun velodyne_pointcloud cloud_node _calibration:=$(rospack find velodyne_poitncloud)/params/VLP16db.yaml

Originally posted by joq with karma: 25443 on 2016-02-22

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Soowon on 2016-02-22:
Thank you for helping me :). I tried rosrun rviz rviz -f velodyne, as described in the ros tutorial, however, still I could not see any data from the view. In rviz, it says No tf data. Actual error: Fixed Frame [velodyne] does not exist Can you give me help on this?

Comment by joq on 2016-02-22:
You should try leaving off the _read_once option. The file may have finished playing before your rviz started running.

Comment by Soowon on 2016-02-22:
Thanks! It really help me! Now I can see point cloud on RViz. But now, it flickers so many times as if the data is interpreted in a wrong way. This data is given from the velodyne website, so I am sure that the data is not corrupted.

Comment by Soowon on 2016-02-22:
Also, it still shows that I have No tf data. Does it matter? And the duration of the data is longer than 200 seconds, so I am pretty sure that I didn't miss the data while trying to figure out tf data. Would you explain me how to set a fixed frame with respect to the center of the laser? Thanks :)

Comment by joq on 2016-02-24:
The velodyne frame is relative to the center of the laser.

Comment by joq on 2016-02-24:
Please edit your question to describe what you are doing now. Running rosbag record and rosbag play at the same time is probably not a good idea. Does the VPL16_points.launch script work?

Comment by sohel on 2017-11-12:
how much time does it require to create the .bag file from the .pcap file

$\endgroup$

Your Answer

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