MoffKalast / vizanti

A mission planner and visualizer for controlling outdoor ROS robots.
https://wiki.ros.org/vizanti
BSD 3-Clause "New" or "Revised" License
164 stars 34 forks source link

Parameter loading issue #72

Closed kosmonauta144 closed 1 month ago

kosmonauta144 commented 7 months ago

Hi,

last time I encontered an issue. I launched some nodes right after booting the system, and they are perfectly fine to set parameters

image

imu presented above is only one if few examples.

But there are some nodes which are launched after startup by user and they are not able to load parameters image

I don't know if I am doing something wrong, but some parameters are not loading and they are important for me. I can changed them with classic ros2 param set but I would prefer to do it through gui. I will be grateful for every hint for fixing this.

MoffKalast commented 7 months ago

Yeah I'm afraid that's somewhat of a known issue right now. Param reconfigure has been spotty on the ROS 2 branch as a whole.

Currently the node params and their current values are obtained by running ros2 param dump via subprocess with a timeout of 5 seconds. I haven't found this to be reliable even running it manually in the terminal, it's often extremely slow and sometimes it just hangs forever, which may be what you're seeing on the front end side. Or it may be taking 6 seconds and it's always just slightly cut off. You could try increasing the timeout a bit to see if it gets you any closer, but in my tests at the time it wasn't much of an improvement.

It is interesting that rqt_reconfigure manages to very quickly obtain the params and their values, so I presume it's more of a fault in rclpy (since that's what roscli uses now). As such the eventual goal is to move the reconfigure part to a cpp node and use the internal rclcpp SyncParametersClient instead, but that's still on the todo list.

There's also a secondary problem that humble and rolling have some changes around that internal api, so implementing this now would force another branch split to avoid breaking compatibility, which isn't ideal.

kosmonauta144 commented 7 months ago

thank you very much for your reply. I will try to look into it then

MoffKalast commented 1 month ago

Addressed by #104 for now.