/ cartesian_controller_utilities / etc / button_cmds.yaml
button_cmds.yaml
 1  # Define button commands in this file
 2  spacenav_buttons:
 3    ros__parameters:
 4  
 5      # If set to False, a button cannot be pressed twice in a row.
 6      # Can be used to force alternation between to buttons, e.g. when doing `start recording`
 7      # - `stop recording` tasks.
 8      repeat_same_button : False
 9  
10      # Minimum duration in seconds to pass between two buttons pressed.
11      # Can be used to control the rate of pressing.
12      button_sleep: 1.0
13  
14      # Define which commands to execute on pressing buttons
15      button_cmds :
16              [
17                      # button 0
18                      "echo 'start recording' && screen -d -m ros2 bag record topics /spacenav/twist",
19                      # button 1
20                      "echo 'stop recording' && screen -X stuff '^C'"
21              ]
22  
23      # Directories where the commands are executed
24      cmd_dirs :
25              [
26                      # command 0
27                      "",
28                      # command 1
29                      ""
30              ]