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

Global rosparam/namespace refactor #38

Open
RMichaelSwan opened this issue Apr 21, 2021 · 0 comments
Open

Global rosparam/namespace refactor #38

RMichaelSwan opened this issue Apr 21, 2021 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request high priority

Comments

@RMichaelSwan
Copy link
Collaborator

RMichaelSwan commented Apr 21, 2021

We are using global rosparams in many instances where we should be using rosparams which are relative to some namespace (nodes and groups can have their own namespaces in launch files).

Names that start with a "/" are global -- they are considered fully resolved. Global names should be avoided as much as possible as they limit code portability.

Namespace Reference
Useful overview of roslaunch structure recommendations

For example:
When services are instantiated they often have an /instance_id rosparam in their launch file or in their code. The problem is, if two services somehow launch at the same time, they could overwrite each other's rosparam value (race condition) resulting in possible instancing bugs.

Similarly, we are often setting custom parameter names for each service instead of using the most obvious name and making it relative to the namespace of that service.

Fixing this issue will require a refactor of many of the main() functions in nodes and their associated launch files. A correct example is provided in the harmoni_face_detector service. In addition, the use of a constants file for Namespaces should be refactored. The Namespaces can be stored in launch files or possibly a global launch include.

@RMichaelSwan RMichaelSwan added the bug Something isn't working label Apr 21, 2021
@RMichaelSwan RMichaelSwan changed the title rosparam "instance_id" is shared among all services Global rosparam "instance_id" Apr 21, 2021
@RMichaelSwan RMichaelSwan changed the title Global rosparam "instance_id" Global rosparams Apr 21, 2021
@RMichaelSwan RMichaelSwan added the enhancement New feature or request label Apr 21, 2021
@RMichaelSwan RMichaelSwan changed the title Global rosparams Global rosparam refactor Apr 21, 2021
@RMichaelSwan RMichaelSwan changed the title Global rosparam refactor Global rosparam/namespace refactor Apr 21, 2021
@RMichaelSwan RMichaelSwan self-assigned this Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

1 participant