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

Read only parameters #495

Merged
merged 48 commits into from
Apr 23, 2019
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
73553ec
in progress broken test_time_source
sloretz Jun 8, 2018
88a74ff
style
sloretz Jun 8, 2018
bc8457d
test undeclared params
sloretz Jun 8, 2018
a6fc8de
Only get parameter if it is set
sloretz Jun 8, 2018
7e19756
doc fixup
wjwwood Oct 18, 2018
2597f46
use override rather than virtual in places
wjwwood Oct 18, 2018
347449d
rename ParameterInfo_t to ParameterInfo and just use struct, no typedef
wjwwood Oct 18, 2018
304ba62
add method to access ParameterValue within a Parameter
wjwwood Oct 18, 2018
6e5aae9
enable get<Parameter> and get<ParameterValue> on Parameter class
wjwwood Oct 18, 2018
38c7670
avoid const pass by value
wjwwood Oct 18, 2018
c11654e
match type of enum in C++ to type used in message definition
wjwwood Oct 18, 2018
b3325aa
fixup after rebase
wjwwood Jan 30, 2019
189c02e
more fixup after rebase
wjwwood Jan 30, 2019
85b0377
replace create_parameter with declare_parameter
wjwwood Feb 1, 2019
598325d
provide implementation for templated declare_parameter method
wjwwood Feb 1, 2019
6b14049
style
wjwwood Feb 4, 2019
46c207f
do not use const reference when it's a primitive (like bool)
wjwwood Feb 22, 2019
8e28200
typo
wjwwood Feb 22, 2019
5273ad9
follow to bool change that wasn't staged
wjwwood Feb 23, 2019
06ddfc4
fixup tests
wjwwood Feb 23, 2019
04f812c
added lots of docs, alternative API signatures, and some of the tests
wjwwood Apr 10, 2019
206ffe3
more tests and associated fixes
wjwwood Apr 11, 2019
89018de
address documentation feedback
wjwwood Apr 12, 2019
9e03b08
fixup previously added tests
wjwwood Apr 15, 2019
ac1b6a6
add tests and fixes for describe_parameter(s) and get_parameter_types
wjwwood Apr 15, 2019
73b4c28
remove old parameter tests
wjwwood Apr 16, 2019
78a94d9
use const reference where possible
wjwwood Apr 16, 2019
bf1d149
address comments
wjwwood Apr 16, 2019
00da0a6
fix tests for deprecated methods
wjwwood Apr 16, 2019
570c7c2
address feedback
wjwwood Apr 17, 2019
3ef385d
significantly improve the reliability of the time_source tests
wjwwood Apr 18, 2019
01362ff
uncrustify, cpplint, and cppcheck fixes
wjwwood Apr 18, 2019
c48db2d
Revert "significantly improve the reliability of the time_source tests"
wjwwood Apr 18, 2019
4673ce9
Merge remote-tracking branch 'origin/master' into read_only_parameters
wjwwood Apr 18, 2019
ce9af32
only declare use_sim_time parameter if not already declared
wjwwood Apr 18, 2019
fb78acd
fixup rclcpp_lifecycle
wjwwood Apr 19, 2019
b7e4c0d
fixup tests
wjwwood Apr 19, 2019
efb3f85
add missing namespace scope which fails on Windows
wjwwood Apr 19, 2019
4ba4eeb
extend deprecation warning suppression to support Windows too
wjwwood Apr 19, 2019
cb72e58
fix compiler warnings and missing visibility macro
wjwwood Apr 19, 2019
7e79bba
remove commented left over tests
wjwwood Apr 19, 2019
933ac09
fix compiler warning on Windows
wjwwood Apr 19, 2019
444de25
suppress deprecation warning on include of file in Windows
wjwwood Apr 19, 2019
df7b036
avoid potential loss of data warning converting int64_t to int
wjwwood Apr 19, 2019
ea3285f
trying to fix more loss of data warnings
wjwwood Apr 20, 2019
68a4afe
fix test_node
wjwwood Apr 22, 2019
d9ad096
add option to automatically declare parameters from initial parameter…
wjwwood Apr 23, 2019
e29cdf1
remove redundant conditional
wjwwood Apr 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rclcpp/test/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,13 @@ TEST_F(TestNode, declare_parameters_with_no_initial_values) {
auto node = std::make_shared<rclcpp::Node>("test_declare_parameters_node"_unq);
{
// with namespace, defaults, no custom descriptors, no initial
auto values = node->declare_parameters<int>("namespace1", {
int64_t bigger_than_int = INT64_MAX - 42;
auto values = node->declare_parameters<int64_t>("namespace1", {
{"parameter_a", 42},
{"parameter_b", 256},
{"parameter_b", bigger_than_int},
});
std::vector<int> expected = {42, 256};
std::vector<int64_t> expected = {42, 256, bigger_than_int};
wjwwood marked this conversation as resolved.
Show resolved Hide resolved
EXPECT_EQ(values, expected);
EXPECT_TRUE(node->has_parameter("namespace1.parameter_a"));
EXPECT_TRUE(node->has_parameter("namespace1.parameter_b"));
Expand Down