Open jeremyfix opened 1 year ago
It seem odd. I think it could be the issue with rqt_reconfigure
in your ros2 foxy..
Have you try reinstall rqt_reconfigure
?
$ sudo apt update
$ sudo apt upgrade
$ sudo apt remove ros-foxy-rqt-reconfigure
$ sudo apt install ros-foxy-rqt-reconfigure
if this not works, could you try to declare your parameter as a string?
self.declare_parameter("linear_vel_str", "0.5")
...
def cb_params(self, data):
for p in data:
name = p.name
value = float(p.value) if name == "linear_vel_str" else p.value
setattr(self, name, value)
self.get_logger().info(f"Parameter change notified : {self.linear_vel}")
return SetParametersResult(successful=True)
I have got the same Issue with Humble. I tried to reinstall rqt as mentioned but it did not resolve the problem. As i especially want to tune native Nav2 parameters i'm not able to declare my parameter as string.
The described behavior is exactly the same as @jeremyfix mentioned.
Unfortunately, I did not work on this question from last year. So I did not test the suggestion of @bmaxdk on foxy. And I cannot suggest you something else to test @phinners .
Hello,
I'm using ROS2 foxy and facing the issue that a floating point value parameter changed in rqt_reconfigure does not get notified to the node which is declaring the parameter for specific values.
By default, I set the parameter to "0.5" . If I change it to "0.9", the change is not notified. If I change it to "1" , the change is notified.
Interestingly, the "." decimal point is not allowed (I cannot add it to the field although I strike the key) in the rqt reconfigure field, although it is the separator initially used to display the initial value.
Changing the value of the parameter from the command line works, e.g.
ros2 param set param_issue linear_vel 1.5
from the code provided below.Below is a minimal example for reproducing the issue :
If you now start
rqt_reconfigure
, changing the value will either succeed or fail.If you change it from the command line, this will always work .
Best;
Jeremy.