apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Usage of the script modules/tools/planning_traj_plot/main.py

Open gulshan216 opened this issue 8 years ago • 4 comments

Hi, Can someone please let me know how to use the script in modules/tools/planning_traj_plot? I see we need to provide it the input data as planning.pb.txt and localization.pb.txt. But I do not know where to get these files from. Also I would really like to know if there are any other helpful tools which can help in designing and testing the planning algorithms in Apollo

gulshan216 avatar Jul 26 '18 01:07 gulshan216

you could use rosbag folder dump_planning.py to get that file.

gengqx avatar Jul 26 '18 08:07 gengqx

@gengqx Do you know how to record Rosbag data while running Apollo? The reason is that the dump_planning.py needs an input rosbag data. After doing a bit of search i see some scripts like modules/data/tools/recorder/data_recorder_manager.py that might do the job, but on running the script i just get the following error: pl@in_dev_docker:/apollo$ sudo python modules/data/tools/recorder/data_recorder_manager.py -c modules/data/conf/recorder.debug.yaml Traceback (most recent call last): File "modules/data/tools/recorder/data_recorder_manager.py", line 43, in import rospy ImportError: No module named rospy

Am i using the right script? If yes, then do you know why i get this error?

gulshan216 avatar Jul 27 '18 23:07 gulshan216

@gulshan216 Hi, did you figure out the way to generate planning.pb.txt and localization.pb.txt?

I found there's a sample data in the /apollo-master/modules/tools/plot_plan_traj/example_data, I used those day to run the sequence "main.py localization.pb.txt planning.pb.txt" and get one static plot.

I was trying to use the command "rostopic echo /apollo/planning >> planning.pb.txt " to export the rosbag data however the data I got was in a very different format as required in the main.py.

Could you share some ideas with me about how to generate those two files ?

Thanks!

yangydavid avatar Aug 06 '18 22:08 yangydavid

Closed due to inactivity. If the problem persists, pls feel free to reopen it or create a new one and refer to it.

daohu527 avatar Aug 18 '22 02:08 daohu527