Questions about modules/tools/planning_traj_plot
Hi, I have a question regarding to the python scripts in the file /modules/tools/planning_traj_plot
When I try to run the file with command python main.py planning.pb.txt localization.pb.txt with the data from the folder /modules/tools/planning_traj_plot/example_data. I only have a small data set which I believe was collected from one single frame. However, I want to plot the entire moving trajectory stored in the rosbag demo_2.0.bag. Therefore I have the following question.
How to extract the planning data (adc_trajectory_point) out of rosbag demo_2.0.bag . I know I can use rostopic echo /apollo/planning >> planning.pb.txt while playing the rosbag, however the data format i got from this command was not consistent as the one given in the folder
/modules/tools/planning_traj_plot/example_data. Therefore, could you tell me how to generate the example data?
I notice that there's another thread talking about using dump_planning.py to generate such planning trajectory. However, I still have difficulty running this script. If this is the right thing to do, could you elaborate a bit more on how to use this script? For instance, does it has to be run in real time? or it can somehow extract the data from the rosbag demo_2.0.bag?
Thanks so much!
dump_planning.py is a tool to extract planning messages from a bag file. Usage: python dump_planning.py bag_file save_directory