ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You might want to print the value of full_param_name after getting it with searchParam before calling getParam.

The API docs describe the second argument of searchParam with:

[out] result the found value (if any)

So I would it expect it to be the parameter value. You are using it as if searchParam would return the found key instead.

You might want to print the value of full_param_name after getting it with searchParam before calling getParam.

The API docs describe the second argument of searchParam with:

[out] result the found value (if any)

So Update:

The docblock is kind of misleading. The `result is actually a parameter key and not a value.


When I would it expect it to be the parameter value. You run your code snippet as-is I get:

  • no parameter set: Okay, parameter 'a/b' not found on the ROS parameter server.
  • after rosparam set /a/b global_value: Okay, parameter found: 'a/b' = 'global_value'.
  • after rosparam set /test_node/a/b node_value: Okay, parameter found: 'a/b' = 'node_value'.

What you are using it as if searchParam would return the found key instead.

seeing might a problem with caching.

After calling rosparam delete /test_node/a/b I do get THIS SHOULD NEVER BE PRINTED ... ?! (/test_node/a/b).

Maybe you can the exact steps you are performing when running into the problem.

You might want to print the value of full_param_name after getting it with searchParam before calling getParam.

The API docs describe the second argument of searchParam with:

[out] result the found value (if any)

Update:

The docblock is kind of misleading. The `result result is actually a parameter key and not a value.


When I run your code snippet as-is I get:

  • no parameter set: Okay, parameter 'a/b' not found on the ROS parameter server.
  • after rosparam set /a/b global_value: Okay, parameter found: 'a/b' = 'global_value'.
  • after rosparam set /test_node/a/b node_value: Okay, parameter found: 'a/b' = 'node_value'.

What you are seeing might a problem with caching.

After calling rosparam delete /test_node/a/b I do get THIS SHOULD NEVER BE PRINTED ... ?! (/test_node/a/b).

Maybe you can the exact steps you are performing when running into the problem.

You might want to print the value of full_param_name after getting it with searchParam before calling getParam.

The API docs describe the second argument of searchParam with:

[out] result the found value (if any)

Update:

The docblock is kind of misleading. The result is actually a parameter key and not a value.


When I run your code snippet as-is I get:

  • no parameter set: Okay, parameter 'a/b' not found on the ROS parameter server.
  • after rosparam set /a/b global_value: Okay, parameter found: 'a/b' = 'global_value'.
  • after rosparam set /test_node/a/b node_value: Okay, parameter found: 'a/b' = 'node_value'.

What you are seeing might a problem with caching.

After calling rosparam delete /test_node/a/b I do get THIS SHOULD NEVER BE PRINTED ... ?! (/test_node/a/b).

Maybe you can post the exact steps you are performing when running into the problem.

You might want to print the value of full_param_name after getting it with searchParam before calling getParam.

The API docs describe the second argument of searchParam with:

[out] result the found value (if any)

Update:

The docblock is kind of misleading. The result is actually a parameter key and not a value.


When I run your code snippet as-is I get:

  • no parameter set: Okay, parameter 'a/b' not found on the ROS parameter server.
  • after rosparam set /a/b global_value: Okay, parameter found: 'a/b' = 'global_value'.
  • after rosparam set /test_node/a/b node_value: Okay, parameter found: 'a/b' = 'node_value'.

What you are seeing might a problem with caching.

After calling rosparam delete /test_node/a/b I do get THIS SHOULD NEVER BE PRINTED ... ?! (/test_node/a/b).

Maybe you can post the exact steps you are performing when running into the problem.

You might want to print the value of full_param_name after getting it with searchParam before calling getParam.

The API docs describe the second argument of searchParam with:

[out] result the found value (if any)

Update:

The docblock is kind of misleading. The result is actually a parameter key and not a value.


When I run your code snippet as-is I get:

  • no parameter set: Okay, parameter 'a/b' not found on the ROS parameter server.
  • after rosparam set /a/b global_value: Okay, parameter found: 'a/b' = 'global_value'.
  • after rosparam set /test_node/a/b node_value: Okay, parameter found: 'a/b' = 'node_value'.

After calling rosparam delete /test_node/a/b I do get THIS SHOULD NEVER BE PRINTED ... ?! (/test_node/a/b).

Maybe you can post the exact steps you are performing when running into the problem.

May this docblock clarifies the behavior of searchParam which seems to be the rational for the case above: https://github.com/ros/ros_comm/blob/38799662b45a42e118762865fac854317b0924a0/tools/rosmaster/src/rosmaster/paramserver.py#L82-L103