I have a bag file that contains couple of topics needed for localization, odometry data, kinect data and /tf. What I want is watching robot's movement path in rviz after initializing robot position (even I don't know how to initial it). Any help?

All topics:

  • $\begingroup$ I don't understand the question – perhaps you could add some context and explain a bit more $\endgroup$ – James Waldby - jwpat7 Nov 21 '13 at 16:26
  • $\begingroup$ Well, I have recorded data inside a bag file using a wheeled root, right? I've generated map of the environment using that bag file. Now, I want to use these data to see the path of robot inside rviz. $\endgroup$ – Maysam Nov 22 '13 at 7:07
  • $\begingroup$ you might have a better chance of getting an answer for this question if you ask it on the the ROS q/a site: answers.ros.org/questions $\endgroup$ – Robz Dec 1 '13 at 0:17
  • 1
    $\begingroup$ @Robz I did, people there are way too lazy! $\endgroup$ – Maysam Dec 1 '13 at 12:04
  • $\begingroup$ Not 100% sure where's the problem: what do you mean by "after initializing robot position"? Do you mean that you want to run some localisation algorithm on those data? Or did you record the result of the localisation algorithm and simply want to display it? $\endgroup$ – Ugo Dec 2 '13 at 11:18

Before you run rviz, you need to set use_sim_time to true:

rosparam set use_sim_time true

Now start up rviz, then run rosbag using --clock:

rosbag play bagfile_name.bag --clock

For setting up rviz with the navigation stack, you will want to follow this tutiorial.

| improve this answer | |

For localisation you need map of the environment. For the data you have, you should use SLAM algorithm which give path and map of your environment. Try using gmapping in ROS.

| improve this answer | |
  • $\begingroup$ I have map too, sorry I forgot to write its topic name. $\endgroup$ – Maysam Mar 2 '14 at 8:57
  • $\begingroup$ use amcl to localise your robot $\endgroup$ – nayab Mar 2 '14 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.