How can I read velodyne_msgs in c++ and also I want to publish that msg over rviz ?
I have a rosbag file. if I run the command rosbag info filename.bag I am getting following output.
path: data.bag
version: 2.0
duration: 3:48s (228s)
start: Sep 23 2016 12:26:58.43 (1474613818.43)
end: Sep 23 2016 12:30:46.55 (1474614046.55)
size: 486.2 MB
messages: 26301
compression: none [570/570 chunks]
types: geometry_msgs/PoseStamped [d3812c3cbc69362b77dc0b19b345f8f5]
vehicle_socket/CanInfo [605f4356821f92a8fec1a756259316df]
velodyne_msgs/VelodyneScan [50804fc9533a0e579e6322c04ae70566]
topics: /can_info 21743 msgs : vehicle_socket/CanInfo
/current_pose 2279 msgs : geometry_msgs/PoseStamped
/velodyne_packets 2279 msgs : velodyne_msgs/VelodyneScan
- I can see these above three topics.
- I want to publish this msgs on the above topics over rviz.
Any advice? I would appreciate.
Are you asking how to play a bagfile?
I am asking about, how to read rosbag file using c++ api by topic and then how to send that msgs on rviz. I could read that file as well as publishing some msgs(geometry_msgs/PoseStamp) on rviz but that msgs won't get a display.
If this question is not about playing a bagfile, maybe your problem is that there is no existing plugin to directly visualize
velodyne_msgs/VelodyneScan
messages? You need to convert them to a pointcloud using the velodyne_pointcloud package. Is this what you are looking for?