Skip to content

Commit 29046af

Browse files
committed
initial_values -> initial_parameters
1 parent 04cb6a9 commit 29046af

6 files changed

Lines changed: 12 additions & 10 deletions

File tree

rclcpp/include/rclcpp/node.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class Node : public std::enable_shared_from_this<Node>
8585
* \param[in] namespace_ Namespace of the node.
8686
* \param[in] context The context for the node (usually represents the state of a process).
8787
* \param[in] arguments Command line arguments that should apply only to this node.
88+
* \param[in] initial_parameters a list of initial values for parameters on the node.
8889
* This can be used to provide remapping rules that only affect one instance.
8990
* \param[in] use_global_arguments False to prevent node using arguments passed to the process.
9091
* \param[in] use_intra_process_comms True to use the optimized intra-process communication
@@ -96,7 +97,7 @@ class Node : public std::enable_shared_from_this<Node>
9697
const std::string & namespace_,
9798
rclcpp::Context::SharedPtr context,
9899
const std::vector<std::string> & arguments,
99-
const std::vector<Parameter> & initial_values,
100+
const std::vector<Parameter> & initial_parameters,
100101
bool use_global_arguments = true,
101102
bool use_intra_process_comms = false,
102103
bool start_parameter_services = true);

rclcpp/include/rclcpp/node_interfaces/node_parameters.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class NodeParameters : public NodeParametersInterface
5151
const node_interfaces::NodeBaseInterface::SharedPtr node_base,
5252
const node_interfaces::NodeTopicsInterface::SharedPtr node_topics,
5353
const node_interfaces::NodeServicesInterface::SharedPtr node_services,
54-
const std::vector<Parameter> & initial_values,
54+
const std::vector<Parameter> & initial_parameters,
5555
bool use_intra_process,
5656
bool start_parameter_services);
5757

rclcpp/src/rclcpp/node.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Node::Node(
5555
const std::string & namespace_,
5656
rclcpp::Context::SharedPtr context,
5757
const std::vector<std::string> & arguments,
58-
const std::vector<rclcpp::Parameter> & initial_values,
58+
const std::vector<rclcpp::Parameter> & initial_parameters,
5959
bool use_global_arguments,
6060
bool use_intra_process_comms,
6161
bool start_parameter_services)
@@ -70,7 +70,7 @@ Node::Node(
7070
node_base_,
7171
node_topics_,
7272
node_services_,
73-
initial_values,
73+
initial_parameters,
7474
use_intra_process_comms,
7575
start_parameter_services
7676
)),

rclcpp/src/rclcpp/node_interfaces/node_parameters.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ NodeParameters::NodeParameters(
3131
const rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base,
3232
const rclcpp::node_interfaces::NodeTopicsInterface::SharedPtr node_topics,
3333
const rclcpp::node_interfaces::NodeServicesInterface::SharedPtr node_services,
34-
const std::vector<rclcpp::Parameter> & initial_values,
34+
const std::vector<rclcpp::Parameter> & initial_parameters,
3535
bool use_intra_process,
3636
bool start_parameter_services)
3737
{
@@ -54,8 +54,8 @@ NodeParameters::NodeParameters(
5454

5555
// TODO(sloretz) store initial values and use them when a parameter is created
5656
// Set initial parameter values
57-
if (!initial_values.empty()) {
58-
rcl_interfaces::msg::SetParametersResult result = set_parameters_atomically(initial_values);
57+
if (!initial_parameters.empty()) {
58+
rcl_interfaces::msg::SetParametersResult result = set_parameters_atomically(initial_parameters);
5959
if (!result.successful) {
6060
throw std::runtime_error("Failed to set initial parameters");
6161
}

rclcpp_lifecycle/include/rclcpp_lifecycle/lifecycle_node.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class LifecycleNode : public node_interfaces::LifecycleNodeInterface,
8989
* \param[in] node_name Namespace of the node.
9090
* \param[in] context The context for the node (usually represents the state of a process).
9191
* \param[in] arguments Command line arguments that should apply only to this node.
92+
* \param[in] initial_parameters a list of initial values for parameters on the node.
9293
* This can be used to provide remapping rules that only affect one instance.
9394
* \param[in] use_global_arguments False to prevent node using arguments passed to the process.
9495
* \param[in] use_intra_process_comms True to use the optimized intra-process communication
@@ -100,7 +101,7 @@ class LifecycleNode : public node_interfaces::LifecycleNodeInterface,
100101
const std::string & namespace_,
101102
rclcpp::Context::SharedPtr context,
102103
const std::vector<std::string> & arguments,
103-
const std::vector<rclcpp::Parameter> & initial_values,
104+
const std::vector<rclcpp::Parameter> & initial_parameters,
104105
bool use_global_arguments = true,
105106
bool use_intra_process_comms = false,
106107
bool start_parameter_services = true);

rclcpp_lifecycle/src/lifecycle_node.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ LifecycleNode::LifecycleNode(
6262
const std::string & namespace_,
6363
rclcpp::Context::SharedPtr context,
6464
const std::vector<std::string> & arguments,
65-
const std::vector<rclcpp::Parameter> & initial_values,
65+
const std::vector<rclcpp::Parameter> & initial_parameters,
6666
bool use_global_arguments,
6767
bool use_intra_process_comms,
6868
bool start_parameter_services)
@@ -77,7 +77,7 @@ LifecycleNode::LifecycleNode(
7777
node_base_,
7878
node_topics_,
7979
node_services_,
80-
initial_values,
80+
initial_parameters,
8181
use_intra_process_comms,
8282
start_parameter_services
8383
)),

0 commit comments

Comments
 (0)