Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change bridge_name to name and bridge_params to parameters #673

Draft
wants to merge 1 commit into
base: ros2
Choose a base branch
from

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Dec 11, 2024

🦟 Bug fix

Summary

I'm proposing that we change the attribute names because "bridge_" in the attributes seems redundant. The change I propose also alignes the attributes with the attribute names of Node (<node>), which are name and parameters.

Example:
Before:

RosGzBridge(
    bridge_name="bridge1",
    config_file=[FindPackageShare("ros_gz_sim_demos"), "/config/air_pressure.yaml"],
    use_composition=False,
    bridge_params=[{"qos_overrides./air_pressure.publisher.reliability": "best_effort"}],
)

After:

RosGzBridge(
    name="bridge1",
    config_file=[FindPackageShare("ros_gz_sim_demos"), "/config/air_pressure.yaml"],
    use_composition=False,
    parameters=[{"qos_overrides./air_pressure.publisher.reliability": "best_effort"}],
)

#600 changed name to bridge_name, but I'm not sure why that was necessary. @Amronos?

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

The "bridge_" in these attributes seems redundant. This patch removes
the prefix and aligns the names with the attribute names of `Node`
(`<node>`).

Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey requested a review from ahcorde as a code owner December 11, 2024 15:18
@azeey azeey marked this pull request as draft December 11, 2024 15:19
@azeey azeey requested a review from caguero December 11, 2024 15:19
@Amronos
Copy link
Contributor

Amronos commented Dec 11, 2024

#600 changed name to bridge_name, but I'm not sure why that was necessary. @Amronos?

If I remember correctly, it was to differentiate between entity_name and bridge_name in https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_sim/launch/ros_gz_spawn_model.launch.py, and then I had decided to change it throughout for consistency.

@azeey
Copy link
Contributor Author

azeey commented Dec 11, 2024

I see. I think it makes sense to have bridge_name as input in https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_sim/launch/ros_gz_spawn_model.launch.py to differentiate it from other names, but I would prefer to keep the attribute of the RosGzBridge action itself as name since it's pretty clear from usage that it is the name of the bridge. i.e, in RosGzBridge(name="bridge1") or <ros_gz_bridge name="bridge1"> , the name attribute is not ambiguous that it belongs to RosGzBridge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants