Logger

De LCAD
Revisão de 16h45min de 10 de junho de 2011 por Ranik (discussão | contribs)
Ir para: navegação, pesquisa

Logging Data and Playing It Back

Logging Data and Playing It Back

Recording data in CARMEN is made simple with the logger program. When you are ready to start logging data, simply start the logger program with the following command. At the very least, central and must be running.

 ./logger [filename].log[.gz]

[filename] specifies a filename for the sensor log. If the file already exists, the program will ask to overwrite it. If an answer other than "Y" or "y" is given, then the logger will quit. There is no way for this program to append new data to an old logfile.

The logfile will begin with the following message, which explains the format of the file. After that, the file is simply a list of CARMEN messages in the order they were received.

    • CARMEN Logfile
    • file format is one message per line
  1. message_name [message contents] ipc_timestamp ipc_hostname logger_timestamp
  2. message formats defined  : PARAM SYNC ODOM RAWLASER1 RAWLASER2 RAWLASER3 RAWLASER4
  3. ROBOTLASER1 ROBOTLASER2
  4. old message formats defined: FLASER RLASER LASER3 LASER4
  5. PARAM param_name param_value
  6. SYNC tagname
  7. ODOM x y theta tv rv accel
  8. TRUEPOS true_x true_y true_theta odom_x odom_y odom_theta
  9. RAWLASER1 laser_type start_angle field_of_view angular_resolution
  10. maximum_range accuracy remission_mode
  11. num_readings [range_readings] num_remissions [remission values]
  12. RAWLASER2 laser_type start_angle field_of_view angular_resolution
  13. maximum_range accuracy remission_mode
  14. num_readings [range_readings] num_remissions [remission values]
  15. RAWLASER3 laser_type start_angle field_of_view angular_resolution
  16. maximum_range accuracy remission_mode
  17. num_readings [range_readings] num_remissions [remission values]
  18. RAWLASER4 laser_type start_angle field_of_view angular_resolution
  19. maximum_range accuracy remission_mode
  20. num_readings [range_readings] num_remissions [remission values]
  21. ROBOTLASER1 laser_type start_angle field_of_view angular_resolution
  22. maximum_range accuracy remission_mode
  23. num_readings [range_readings] laser_pose_x laser_pose_y laser_pose_theta
  24. robot_pose_x robot_pose_y robot_pose_theta
  25. laser_tv laser_rv forward_safety_dist side_safty_dist
  26. ROBOTLASER2 laser_type start_angle field_of_view angular_resolution
  27. maximum_range accuracy remission_mode
  28. num_readings [range_readings] laser_pose_x laser_pose_y laser_pose_theta
  29. robot_pose_x robot_pose_y robot_pose_theta
  30. laser_tv laser_rv forward_safety_dist side_safty_dist
  31. NMEAGGA gpsnr utc latitude lat_orient longitude long_orient gps_quality
  32. num_satellites hdop sea_level alititude geo_sea_level geo_sep data_age
  33. NMEARMC gpsnr validity utc latitude lat_orient longitude long_orient
  34. speed course variation var_dir date
  35. OLD LOG MESSAGES:
  36. (old) # FLASER num_readings [range_readings] x y theta odom_x odom_y odom_theta
  37. (old) # RLASER num_readings [range_readings] x y theta odom_x odom_y odom_theta
  38. (old) # LASER3 num_readings [range_readings]
  39. (old) # LASER4 num_readings [range_readings]
  40. (old) # REMISSIONFLASER num_readings [range_readings remission_value]
  41. (old) # REMISSIONRLASER num_readings [range_readings remission_value]
  42. (old) # REMISSIONLASER3 num_readings [range_readings remission_value]
  43. (old) # REMISSIONLASER4 num_readings [range_readings remission_value]
  44. robot: b21rmit

There is no way to pause recording; to stop simply type "ctrl-C" in the window in which logger is running.

To start a playback of the data, then start the main CARMEN programs normally, except replace base_services or simulator with the program playback as follows:

 ./playback [filename].log[.gz]

This program will immediately start sending messages from the logfile to central, to be passed to other programs.

To have more control over the playback, running playback_control to call up a graphic user interface, as below.

The double arrows advance or rewind the playback by 100 front laser scan messages, the single arrows by a single laserscan. The square stops the playback, the arrow starts the playback. The "R" resets the playback to the begining of the file. Note that playback starts up playing the logfile, so it is a good idea to have playback control running first, to stop the playback until you are ready.