Skip to content

Ability to configure domain ID in rclpy #484

Closed

Description

@fujitatomoya

Feature request

Feature description

ability to set the Domain ID on a per-node basis.

the same ability with ros2/rclcpp#910

Implementation considerations

  1. add domain id with rclpy Node Class option. (default RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID)
  2. if it is RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID, the rcl overrides domain id with ROS_DOMAIN_ID environmental variable.

Activity

  1. fujitatomoya commented on Dec 17, 2019

    @fujitatomoya
    CollaboratorAuthor

    related to ros2/rclcpp#910

  2. ivanpauno commented on Dec 18, 2019

    @ivanpauno
    Member

    Closing, as I think it has been clarified in ros2/rclcpp#910 (comment).
    Please, reopen if not.

  3. fujitatomoya commented on Dec 19, 2019

    @fujitatomoya
    CollaboratorAuthor

    @ivanpauno

    this is for the same ability with ros2/rclcpp#910 for rclpy. i believe that this is needed for rclpy also not only for rclcpp.

  4. ivanpauno commented on Dec 19, 2019

    @ivanpauno
    Member

    @ivanpauno

    this is for the same ability with ros2/rclcpp#910 for rclpy. i believe that this is needed for rclpy also not only for rclcpp.

    Sorry, I didn't understand that.
    The title sounds like rclpy is not using ROS_DOMAIN_ID environment variable.
    Can you update the description and reopen? Thanks!

  5. fujitatomoya commented on Dec 20, 2019

    @fujitatomoya
    CollaboratorAuthor

    @ivanpauno

    The title sounds like rclpy is not using ROS_DOMAIN_ID environment variable.

    my bad, that confuses you.

    Can you update the description and reopen? Thanks!

    will do it right now.

  6. changed the title [-]Domain ID not changable via ROS_DOMAIN_ID[/-] [+]Ability to configure domain ID in rclpy[/+] on Dec 20, 2019
  7. suab321321 commented on Jan 2, 2020

    @suab321321
    Contributor

    @ivanpauno sir I would like to contribute to this.

  8. ivanpauno commented on Jan 2, 2020

    @ivanpauno
    Member

    For the same reason than here ros2/rclcpp#910 (comment), it's better to wait now. The other set of PRs will be done soon, after that, this will be unblocked.

  9. added
    enhancement
    on Jan 16, 2020
  10. self-assigned this
    on Jan 16, 2020
  11. fujitatomoya commented on Jun 11, 2020

    @fujitatomoya
    CollaboratorAuthor

    @ivanpauno

    this one too, you can leave it to us.

  12. Barry-Xu-2018 commented on Jun 12, 2020

    @Barry-Xu-2018
    Contributor

    @ivanpauno @fujitatomoya

    After checking current implementation of rclpy, it only supports use default rcl_opitions.

    /// Initialize rcl with default options, ignoring parameters
    /**
    * Raises RuntimeError if rcl could not be initialized
    */
    static PyObject *
    rclpy_init(PyObject * Py_UNUSED(self), PyObject * args)

    If want to support configuring domain ID, I have to expose InitOption to rclpy.
    What do you think ?

  13. fujitatomoya commented on Jun 15, 2020

    @fujitatomoya
    CollaboratorAuthor

    @Barry-Xu-2018

    i think we do need to expose InitOption to rclpy, i think that's the idea.

  14. Barry-Xu-2018 commented on Jun 15, 2020

    @Barry-Xu-2018
    Contributor

    @Barry-Xu-2018

    i think we do need to expose InitOption to rclpy, i think that's the idea.

    Thank you.

  15. Barry-Xu-2018 commented on Jun 16, 2020

    @Barry-Xu-2018
    Contributor

    @ivanpauno

    Friendly ping.
    If have time, please look at comment. #484 (comment)
    I want to hear your opioin.

  16. ivanpauno commented on Jun 29, 2020

    @ivanpauno
    Member

    @ivanpauno @fujitatomoya

    After checking current implementation of rclpy, it only supports use default rcl_opitions.

    /// Initialize rcl with default options, ignoring parameters
    /**
    * Raises RuntimeError if rcl could not be initialized
    */
    static PyObject *
    rclpy_init(PyObject * Py_UNUSED(self), PyObject * args)

    If want to support configuring domain ID, I have to expose InitOption to rclpy.
    What do you think ?

    Prefer adding an extra keyword argument to the functions with a default:

    def init(*, args: Optional[List[str]] = None, context: Context = None) -> None:

    def __init__(self):

    Both should have a new , domain_id: int = get_default_domain_id() argument.

    In _rclpy.c, you will need to write a new rclpy_get_default_domain_id function, and extend rclpy_init signature with an extra argument.

  17. Barry-Xu-2018 commented on Jun 30, 2020

    @Barry-Xu-2018
    Contributor

    @ivanpauno @fujitatomoya
    After checking current implementation of rclpy, it only supports use default rcl_opitions.

    /// Initialize rcl with default options, ignoring parameters
    /**
    * Raises RuntimeError if rcl could not be initialized
    */
    static PyObject *
    rclpy_init(PyObject * Py_UNUSED(self), PyObject * args)

    If want to support configuring domain ID, I have to expose InitOption to rclpy.
    What do you think ?

    Prefer adding an extra keyword argument to the functions with a default:

    def init(*, args: Optional[List[str]] = None, context: Context = None) -> None:

    def __init__(self):

    Both should have a new , domain_id: int = get_default_domain_id() argument.

    In _rclpy.c, you will need to write a new rclpy_get_default_domain_id function, and extend rclpy_init signature with an extra argument.

    Thanks for your suggestion.

  18. ivanpauno commented on Jun 30, 2020

    @ivanpauno
    Member

    Both should have a new , domain_id: int = get_default_domain_id() argument.

    You could also use the number here as a default value, and rcl will check the environment variable here.

  19. Barry-Xu-2018 commented on Jul 1, 2020

    @Barry-Xu-2018
    Contributor

    Both should have a new , domain_id: int = get_default_domain_id() argument.

    You could also use the number here as a default value, and rcl will check the environment variable here.

    Thanks. Got it.

  20. Barry-Xu-2018 commented on Jul 2, 2020

    @Barry-Xu-2018
    Contributor

    @ivanpauno @fujitatomoya

    Please review codes.
    #596

  21. fujitatomoya commented on Aug 6, 2020

    @fujitatomoya
    CollaboratorAuthor

    CC: @ivanpauno

    i am closing this since #596 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions