apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Record SimControl results into a Rosbag

Open yangydavid opened this issue 8 years ago • 2 comments

System information

  • **OS Platform and Distribution Linux Ubuntu 14.04 **:
  • Apollo installed from (https://github.com/ApolloAuto/apollo):
  • Apollo version (3.0):

Hello Apollo developers, I have a question regarding to the rosbag recording function for the SimControl function in the dreamview HMI interface. I am wondering how can I record the simulation information into a rosbag so that I am able to have the full access to all planning and control data.

Steps to reproduce the issue:

  • I used the python scripts under the directory /apollo/modules/data/tools/recorder/data_recorder_control.sh start.
  • However, once I run the command, the system reports that "you need to select a vehicle first".
  • Hence, I pick the MKZ Example from the dreamview HMI interface, then it reports an error again saying "No such file found in the directory".

I am wondering if I am using the script correctly or not. I really appreciate your help!

Supporting materials (screenshots, command lines, code/script snippets):

yangydavid@in_dev_docker:/apollo$ /use_sim_time is not set, will not subscribe to simulated time [/clock] topic Traceback (most recent call last): File "modules/data/tools/recorder/data_recorder_manager.py", line 512, in <module> main() File "modules/data/tools/recorder/data_recorder_manager.py", line 503, in main launch_data_recorder(cp) File "modules/data/tools/recorder/data_recorder_manager.py", line 445, in launch_data_recorder recorder_manager.start_recorder() File "modules/data/tools/recorder/data_recorder_manager.py", line 330, in start_recorder self.create_task_id() File "modules/data/tools/recorder/data_recorder_manager.py", line 120, in create_task_id os.mkdir(self.output_directory) OSError: [Errno 2] No such file or directory: '/media/apollo/data_storage/MKZ EXAMPLE_20180904113628'

yangydavid avatar Sep 04 '18 18:09 yangydavid

modules/data/tools/recorder has some assumptions such as the external disk path. Please try scripts/record_bag.py which simply calls "rosbag record ...".

xiaoxq avatar Sep 04 '18 22:09 xiaoxq

Hi xiaoxq,

Thanks for your help, it works!

yangydavid avatar Sep 11 '18 22:09 yangydavid