Ask Your Question
1

How to display bag file in rviz

asked 2016-02-20 14:34:47 -0500

Soowon gravatar image

updated 2016-02-22 17:29:00 -0500

joq gravatar image

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 :)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-02-22 09:49:35 -0500

joq gravatar image

updated 2016-02-29 08:54:47 -0500

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
edit flag offensive delete link more

Comments

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?

Soowon gravatar imageSoowon ( 2016-02-22 15:31:03 -0500 )edit

You should try leaving off the _read_once option. The file may have finished playing before your rviz started running.

joq gravatar imagejoq ( 2016-02-22 17:22:36 -0500 )edit

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.

Soowon gravatar imageSoowon ( 2016-02-22 20:01:20 -0500 )edit

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 :)

Soowon gravatar imageSoowon ( 2016-02-22 20:03:53 -0500 )edit

The velodyne frame is relative to the center of the laser.

joq gravatar imagejoq ( 2016-02-24 16:46:42 -0500 )edit

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?

joq gravatar imagejoq ( 2016-02-24 16:48:57 -0500 )edit

how much time does it require to create the .bag file from the .pcap file

sohel gravatar imagesohel ( 2017-11-12 15:29:23 -0500 )edit
0

answered 2017-11-12 14:47:46 -0500

sohel gravatar image

updated 2017-11-12 15:28:56 -0500

how much time does it require to create the .bag file from the .pcap file? I have run

1st terminal:roscore

2nd terminal:rosrun velodyne_driver velodyne_node _mol:=VLP16 _pcap:=Downloads/sub3.pcap _read_once:=true 3rd terminal:rosrun rosbag record -O sub3.bag /velodyne_packets But there is a sub3.bag.active file is created no sub3.bag file.

edit flag offensive delete link more

Comments

For a new question, please open a new thread instead of posting it on the answer section. Otherwise your question won't get attention and won't be answered.

130s gravatar image130s ( 2017-11-13 13:22:03 -0500 )edit

did you solve this ?

mathbeaudry gravatar imagemathbeaudry ( 2017-12-02 16:27:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2016-02-20 14:34:47 -0500

Seen: 8,350 times

Last updated: Nov 12 '17