script_topic_logger
Logs values from a ROS topic to a file.
Defined at line 7 of file ros/ros_scripts.xml in package pitasc_library.
Meta data
CategoriespublisherPrototypesscript, object, dictionary, base, descriptive
Parameters
Hidden parameters:
topic : stringThe ros topic to listen onfields : list:string_parameterThe Field in the topic to be logged. Syntax is comparable to ‘rostopic echo’: Lists with [], subitems with . (dot).Examples: “wrench.force”, “wrench.force.x”, “list[0]”package : stringA rospackage in the workspace to place the file in. Leave empty if absolute path is wanted.folder : stringAn additional folder within the rospackage path. Creates folder if not existing.file_name : stringThe name of the file to log the data into.Accepts subsequent folders, “~” for home (if package==””) and the following special artefacts:“{number}” -> starts at 0 and increases by one every time the logger is reentered within an application (e.g. application starts and stops logger in a loop);“{timestamp%Y-%m-%d_%H-%M-%S}” -> Is replaced by the timestamp at starting with the given structure.Examples: “{timestamp%Y-%m-%d}/{timestamp%H-%M-%S}_iteration_{number}.log” -> 2020-06-06/13-40-31_iteration_0.logfile_mode : stringFile creation flag:a : if file already exists, new data will be appended,w : new data will overwrite and replace already existing data,w+ : if file already exists, a new file will be created with additional surfixDefault: w+
Examples
No examples found that make use of script_topic_logger