You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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).
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.The text was updated successfully, but these errors were encountered: