Document node parameters and switch to config-file based launch - #3
Conversation
- Rename launch/sas_force_sensor_bota_launch.py to launch/force_sensor_launch.py and convert it to load parameters from config/config.yaml (name + config_file launch arguments). The hardware-specific configuration_file_path stays a launch argument, with a default pointing at config/bota_binary_gen0.json. - Add config/config.yaml with the topic_name and sampling_time parameters. - Fix the dangling data_files glob in setup.py to also install the config/*.yaml file. - Add a 'ROS 2 Nodes & Parameters' section to the README documenting every parameter of the node. - Update the docker compose files and README to the renamed launch file. Co-authored-by: openhands <openhands@all-hands.dev>
mmmarinho
left a comment
There was a problem hiding this comment.
The path to the .json should be embedded in the .yml
Address review feedback: the hardware-specific configuration_file_path is no longer a launch argument; it is embedded in the YAML configuration files (config/config.yaml -> bota_binary_gen0.json and the new config/config_ethercat.yaml -> ethercat_gen0.json). - force_sensor_launch.py drops the configuration_file_path launch argument and loads everything from the config file. - The node resolves a relative configuration_file_path against the package config/ directory (absolute paths still work), so the embedded filenames resolve correctly regardless of the install prefix (colcon build in docker or system install). - docker/compose_ethercat.yml now selects the EtherCAT variant via config_file:=.../config_ethercat.yaml instead of a JSON path launch arg. - README updated accordingly. Co-authored-by: openhands <openhands@all-hands.dev>
|
Done — the JSON path is now embedded in the YAML config files (commit
One deliberate deviation from the UR-style absolute This comment was created by an AI agent (OpenHands) on behalf of the user. |
|
Thanks for the review — glad the embedded JSON path approach works for you. Let me know if there is anything else to adjust. This comment was created by an AI agent (OpenHands) on behalf of the user. |
Summary
Applies the standard "ROS 2 Nodes & Parameters" README section and converts the launch file to the config-file-based pattern used by
sas_robot_driver_ur.launch/sas_force_sensor_bota_launch.py→launch/force_sensor_launch.pyand converts it to load parameters fromconfig/config.yamlvianame+config_filelaunch arguments.configuration_file_path(a JSON file) stays a launch argument, now defaulting toconfig/bota_binary_gen0.jsonin the package share directory — replacing the previous fragile../config/relative-path default.config/config.yamlwith thetopic_nameandsampling_timeparameters.data_filesglob insetup.pyonly installedconfig/*.json; added aconfig/*.yamlentry so the new YAML is installed into the share directory.ROS 2 Nodes & ParametersREADME section documenting every parameter of the node (type, mandatory/optional, default, purpose).Verification
python3 -m py_compile launch/force_sensor_launch.pypasses.config/config.yamlparses;setup.pyAST-parses.force_sensor_bota.py.Note: this PR was created by an AI agent (OpenHands) on behalf of the user.