0
$\begingroup$

Rosanswers logo

How to publish a message from a rosbag topic?


Originally posted by crazyRan on ROS Answers with karma: 5 on 2020-01-21

Post score: 0


Original comments

Comment by BV_Pradeep on 2020-01-21:
The question is unclear as

rosbag play <filename>

will playback your recorded file. if you then look at the nodes using

rosrun rqt_graph rqt_graph

will show a single rosbag node publishing all topics it recorded. Please elaborate your question.

Comment by snowman on 2020-01-21:
It's not clear from your question what you've tried. I guass rosbag should be used for provide data. Just think it like a recorder, it remembers what happened. You could get something from it, but you couldn't send something to it. So generally, I just use rosbag as publisher.

Comment by crazyRan on 2020-01-21:
Hi, thank you for your reply. What I want to do is that I would like to visualize a lidar data. I have two rosbag data. First, I will get the lidar data from 1st rosbag and visualize it on the 2nd rosbag. The two rosbag is running in different pc.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It's not clear from your question what you've tried, so if this is not what you're looking for, please provide more specific information. There are two basic ways to play back topics from a rosbag file:

  1. Use rosbag play <filename> from the command line as BV_Pradeep suggested. See the wiki for more information.
  2. Use rosrun rqt_bag rqt_bag from the command line to open an interactive GUI. Open a bag file, right-click the topic you want, and check "Publish" in the menu. Then click the play button. See the wiki for more information.

The first option is more useful in general, but the second option may be good for getting started or troubleshooting certain situations.


Originally posted by tryan with karma: 1421 on 2020-01-21

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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