Since there are so many controls, it would be nice if we could have a whole different controller mapping if we held down a button. Essentially the same way that a computer keyboard's "shift" button allows you to either type a "7" (no shift) or "&" (with shift).
Current Behavior
Take a look at the controller code. The main idea is that each controller is mapped to a specific .json file which holds a mapping of each button/axis to a ROS topic name.
How to Implement
Perhaps add another entry to the .json file that indicates if a button is used as a "shifter" or not. Detect this shift button, and change what ROS topic is sent when a button is pressed according to the controller bindings. This would most likely be implemented in the controllerState.ts file.
Example of the json; the entry "isShift" is added:
Context
Since there are so many controls, it would be nice if we could have a whole different controller mapping if we held down a button. Essentially the same way that a computer keyboard's "shift" button allows you to either type a "7" (no shift) or "&" (with shift).
Current Behavior
Take a look at the controller code. The main idea is that each controller is mapped to a specific .json file which holds a mapping of each button/axis to a ROS topic name.
How to Implement
Perhaps add another entry to the .json file that indicates if a button is used as a "shifter" or not. Detect this shift button, and change what ROS topic is sent when a button is pressed according to the controller bindings. This would most likely be implemented in the
controllerState.ts
file.Example of the json; the entry "isShift" is added: