-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve rosbags naming and usage of the `record_rosbag.sh` script - Change default bag name from `<timestamp>_sensor_recording` to `<timestamp>_all_sensors_recording` - Add `--all` flag to record all available topics - Add ` -f | --file` to explicitly specify the topic list file - Add autocomplete for `-f | --file` flag to automatically list available topics list files - Rename `sensor_topics.txt` to `all_sensors_topics.txt` - Record topics listed in `all_sensors_topic.txt` by default - Fix magic numbers
- Loading branch information
Showing
11 changed files
with
123 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/joint_states | ||
/robot_description | ||
/sensor/camera/lspf_r/camera_info | ||
/sensor/camera/lspf_r/image_rect_color/compressed | ||
/sensor/camera/lspf_r/meta | ||
/sensor/lidar/top/points | ||
/tf | ||
/tf_static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/joint_states | ||
/robot_description | ||
/sensor/camera/lspr_l/camera_info | ||
/sensor/camera/lspr_l/image_rect_color/compressed | ||
/sensor/camera/lspr_l/meta | ||
/sensor/lidar/top/points | ||
/tf | ||
/tf_static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/joint_states | ||
/robot_description | ||
/sensor/camera/rsp_l/camera_info | ||
/sensor/camera/rsp_l/image_rect_color/compressed | ||
/sensor/camera/rsp_l/meta | ||
/sensor/lidar/top/points | ||
/tf | ||
/tf_static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/joint_states | ||
/robot_description | ||
/sensor/camera/rspf_l/camera_info | ||
/sensor/camera/rspf_l/image_rect_color/compressed | ||
/sensor/camera/rspf_l/meta | ||
/sensor/lidar/top/points | ||
/tf | ||
/tf_static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/joint_states | ||
/robot_description | ||
/sensor/camera/rspr_r/camera_info | ||
/sensor/camera/rspr_r/image_rect_color/compressed | ||
/sensor/camera/rspr_r/meta | ||
/sensor/lidar/top/points | ||
/tf | ||
/tf_static |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
_record_rosbag_autocomplete() { | ||
local cur prev opts | ||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
prev="${COMP_WORDS[COMP_CWORD-1]}" | ||
|
||
# Directory containing topic lists presets | ||
topic_list_dir="/opt/ros_ws/config/recording_presets" | ||
|
||
COMPREPLY=() | ||
|
||
# Check if the previous argument was -f or --file | ||
if [[ "$prev" == "-f" || "$prev" == "--file" ]]; then | ||
# List only the filenames (not full paths) | ||
local files=$(ls "$topic_list_dir"/*.txt 2>/dev/null | xargs -n1 basename) | ||
|
||
# If the current input (`cur`) starts with the full path, strip the path | ||
if [[ "$cur" == "$topic_list_dir/"* ]]; then | ||
cur="${cur##*/}" # Remove the path, leaving only the filename part | ||
fi | ||
|
||
# Autocomplete the filenames | ||
COMPREPLY=( $(compgen -W "$files" -- "$cur") ) | ||
|
||
# If the user selects a file, prepend the full path | ||
if [[ ${#COMPREPLY[@]} -eq 1 ]]; then | ||
COMPREPLY[0]="$topic_list_dir/${COMPREPLY[0]}" | ||
fi | ||
fi | ||
} | ||
|
||
# Register autocomplete function | ||
complete -F _record_rosbag_autocomplete record_rosbag.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters