[ros-users] [Discourse.ros.org] [Next Generation ROS] Compos…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Poonam1120 via Discourse.ros.org via ros-users
Date:  
To: ros-users
CC: Poonam1120 via Discourse.ros.org
Subject: [ros-users] [Discourse.ros.org] [Next Generation ROS] Composition and Parameters: Best Practice Suggestions


Hi All,
I am also trying to use manual composition and ros2 parameter feature with the demo example only.
I tried both ways.
1) add parameter client to the node itself.

    rclcpp::SyncParametersClient::SharedPtr parameters_client = std::make_shared<rclcpp::SyncParametersClient>(this);


With this approch, I get error as no matchin function as "rclcpp::SyncParametersClient::SyncParametersClient". Because this is referrence to talker node which is of type composition.

2)add parameter client before adding to the executor:
    auto talker = std::make_shared<composition::Talker>();
      auto parameter_client = std::make_shared<rclcpp::parameter_client::SyncParametersClient>(talker);
      exec.add_node(talker);
With this approach, not able to set parameters, as parameter_client is define here and set parameter action is getting done in talker_component.cpp.


I am testing this on crystal.
Thanks





---
[Visit Topic](https://discourse.ros.org/t/composition-and-parameters-best-practice-suggestions/1001/13) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list

http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>