Ask Your Question
0

rviz not showing any data

asked 2019-06-19 07:51:48 -0500

rabrn gravatar image

updated 2019-06-19 07:52:35 -0500

I have installed ROS Melodic and the Velodyne Driver ros-melodic-velodyne. I haven't found a VLP-32C tutorial for the Velodyne Driver although what I see here http://wiki.ros.org/velodyne, says that the VLP-32C is supported. I used this VLP-16 tutorial and this HDL-32E tutorial but changed the input files for the VLP-32C. The output from rosrun gives an error:

$ rosrun velodyne_pointcloud gen_calibration.py 32db.xml

converting "32db.xml" to "32db.yaml" gen_calibration.py: unable to read 32db.xml

From what I found, this is fine because the as of 1.5, the yaml file is already created. This should be why I couldn't find VeloView-VLP-32C.xml.

The output from roslaunch seems fine:

 $ roslaunch velodyne_pointcloud VLP-32C_points.launch calibration:=/opt/ros/melodic/share/velodyne_pointcloud/params/VeloView-VLP-32C.yaml

... logging to /home/shimron/.ros/log/51d45dac-9248-11e9-bb1c-c8d9d2836857/roslaunch-LiDAR-5140.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://LiDAR:35601/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.3
 * /velodyne_nodelet_manager_cloud/calibration: /opt/ros/melodic/...
 * /velodyne_nodelet_manager_cloud/max_range: 130.0
 * /velodyne_nodelet_manager_cloud/min_range: 0.4
 * /velodyne_nodelet_manager_driver/cut_angle: -0.01
 * /velodyne_nodelet_manager_driver/device_ip: 
 * /velodyne_nodelet_manager_driver/frame_id: velodyne
 * /velodyne_nodelet_manager_driver/model: 32C
 * /velodyne_nodelet_manager_driver/pcap: 
 * /velodyne_nodelet_manager_driver/port: 2368
 * /velodyne_nodelet_manager_driver/read_fast: False
 * /velodyne_nodelet_manager_driver/read_once: False
 * /velodyne_nodelet_manager_driver/repeat_delay: 0.0
 * /velodyne_nodelet_manager_driver/rpm: 600.0
 * /velodyne_nodelet_manager_laserscan/resolution: 0.007
 * /velodyne_nodelet_manager_laserscan/ring: -1

NODES
  /
    velodyne_nodelet_manager (nodelet/nodelet)
    velodyne_nodelet_manager_cloud (nodelet/nodelet)
    velodyne_nodelet_manager_driver (nodelet/nodelet)
    velodyne_nodelet_manager_laserscan (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [5150]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 51d45dac-9248-11e9-bb1c-c8d9d2836857
process[rosout-1]: started with pid [5161]
started core service [/rosout]
process[velodyne_nodelet_manager-2]: started with pid [5168]
process[velodyne_nodelet_manager_driver-3]: started with pid [5169]
process[velodyne_nodelet_manager_cloud-4]: started with pid [5170]
process[velodyne_nodelet_manager_laserscan-5]: started with pid [5172]
^X^C[velodyne_nodelet_manager_laserscan-5] killing on exit
[velodyne_nodelet_manager_cloud-4] killing on exit
[velodyne_nodelet_manager_driver-3] killing on exit
[velodyne_nodelet_manager-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

When I run rosrun rviz rviz -f velodyne, I see the GUI but no data from the sensor. I have point cloud and point cloud 2 selected under add->rviz. I can ping the sensor. My graphics card is GeForce GTX 1070. I tried to implement this rviz solution but from rostopic info /tfI get:

Type: tf2_msgs/TFMessage

Publishers: None

Subscribers: 
 * /rostopic_4686_1560947462150 (http://LiDAR:39601/)

And from rosnode info robot_state_publisher I get

--------------------------------------------------------------------------------
Node [/robot_state_publisher]
Publications: None

Subscriptions: None

Services: None

cannot contact [/robot_state_publisher]: unknown node

I did try to troubleshoot /tf and found that I should test turtle examples but those didn't work. I'm not sure if those outputs would be helpful so let me know if you'd like them. Thanks in advance for the help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-06-19 09:18:27 -0500

ChuiV gravatar image

There's a couple things to check for: First, when you rostopic echo your pointcloud, Do you see data there? And what is the frame_id in the header? If you see data there, you can tell rviz to show everything in the frame of your point cloud (probably velodyne), which should work. You can select which frame to display things in from the Global Options -> Fixed Frame field in rviz.

It also appears that you don't have a /robot_state_publisher running at all, and you don't have anything publishing tfs. What is the output of rostopic info /tf_static? Is anything publishing static tfs? If not, that explains why rviz didn't display anything, because it didn't know how to translate from it's main display frame to velodyne frame.

edit flag offensive delete link more

Comments

When I run rostopic echo velodyne_points in a separate terminal from roslaunch velodyne_pointcloud VLP-32C_points.launch pcap:=$(pwd)/20190604_205742test.pcap -v, I do see the data. Here is a small sample:

21, 75, 62, 252, 151, 127, 0]
is_dense: True

The frame_id I get in the header of rostopic echo /scan is velodyne. When I run rosrun rviz rviz -f velodyne followed by rosrun tf static_transform_publisher 0 0 2 0 0 0 odom velodyne 100 to change the frame to velodyne, I don't get any visual data. I also don't see where to change the viewing frame. Global options has fixed frame selected and listed as velodyne but I haven't figured out how to change that. There don't seem to be any other options shown. The output of rostopic info /tf_static is: Type: tf2_msgs/TFMessage
Publishers: None
Subscribers: * /rviz_1561005941558178475 (http://LiDAR:33929/) I've tried to get ...(more)

rabrn gravatar imagerabrn ( 2019-06-20 00:19:27 -0500 )edit

I got it! I had the wrong pcap2 display selected. Once I selected the one under topic->velodyne_points it worked. Thanks for your help!

rabrn gravatar imagerabrn ( 2019-06-20 03:15:04 -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

2 followers

Stats

Asked: 2019-06-19 07:49:50 -0500

Seen: 114 times

Last updated: Jun 19