geometry icon indicating copy to clipboard operation
geometry copied to clipboard

Add dynamic reconfigure to static_tf_publisher

Open bgromov opened this issue 12 years ago • 15 comments

Make static_tf_publisher a bit more dynamic.

bgromov avatar Jul 31 '13 12:07 bgromov

@bgromov Thanks, I've always wanted to see this functionality.

It would be helpful if this also had a checkbox to 'use_quaternion' followed by qw, qx, qy, and qz. I won't have time to get to this until tomorrow, but I'll test this and add quaternion support then if you don't beat me to it.

chadrockey avatar Aug 01 '13 00:08 chadrockey

@chadrockey I will add it, but it may be confusing. Quaternions should always be normalized, thus GUI should not change one component of vector at a time. So it may be better to use use_quaternion as a trigger, whose state will be reset in reconfigure callback.

I've also tried current version on a real system today and it seems that a switch between radians and degrees is necessary. Unfortunately I don't know how to implement this properly since it is necessary to replace max/min values dynamically (from -pi/+pi to -180/+180). As I understand dynamic reconfigure doesn't allow this. Am I right?

bgromov avatar Aug 01 '13 08:08 bgromov

@bgromov There's a not well tested but functional API to change limits dynamically. I've used it here in urg_node: https://github.com/ros-drivers/urg_node/blob/hydro-devel/src/urg_node.cpp#L78

Another possibility is to just make three sections, RPY Radians, RPY Degrees, and Quaternion. Triggers used to work better than they do now with rqt_reconfigure. It's possible we could use three triggers: 'set_radians', 'set_degrees', and 'set_quaternion'.

chadrockey avatar Aug 01 '13 08:08 chadrockey

@chadrockey Thanks for the hint with limits.

Seems that neither triggering nor changing limits are working well with rqt_reconfigure. Very often checkbox does not generate event and thus remains ticked. Limits are set, but interface does not update unless node is selected again.

bgromov avatar Aug 01 '13 11:08 bgromov

I gave up with drop-down menus and limits because of rqt_reconfigure, but I have commited results to experimental branch, if somebody interested.

bgromov avatar Aug 01 '13 16:08 bgromov

I'll talk to @ablasdel about this today.

chadrockey avatar Aug 01 '13 17:08 chadrockey

Overall this looks very useful. How is it going to behave if you instantiate 2 copies? We just patched the view_frames service to deduplicate advertising on the same name.

tfoote avatar Aug 03 '13 01:08 tfoote

@tfoote Since dynamic reconfigure attaches to particular node it will change only the parameters of that node, won't it?

bgromov avatar Aug 03 '13 04:08 bgromov

Right, but my question is how does it work if you create two copies of that class in one node?

On Fri, Aug 2, 2013 at 9:09 PM, Boris Gromov [email protected]:

@tfoote https://github.com/tfoote Since dynamic reconfigure attaches to particular node it will change only the parameters of that node, won't it?

— Reply to this email directly or view it on GitHubhttps://github.com/ros/geometry/pull/25#issuecomment-22048117 .

tfoote avatar Aug 03 '13 22:08 tfoote

Current version will not work with two instances of TransformSender class as dynamic_reconfigure::Server will advertise services in the same namespace.

If it breaks any existing code I can add extra node handle or namespace parameter to TransformSender constructor to pass to dynamic_reconfigure::Server. Thus each instance will advertise in its private namespace. Though it will be up to a user to provide correct names.

bgromov avatar Aug 06 '13 15:08 bgromov

@bgromov If you could add that to the constructor I'll plan to merge this for the indigo cycle.

tfoote avatar Feb 06 '14 19:02 tfoote

Done.

I am a bit out of sync with current development, so may need to recheck everything. The reconfigure GUI behaves strangely on my Groovy - whenever I move orientation sliders, either RPY or WXYZ, some orientation values start jumping. It seems something changed in event notification mechanism in rqt_reconfigure.

bgromov avatar Feb 09 '14 11:02 bgromov

Unfortunately, rqt_reconfigure is abandoned and doesn't work. This means there's no functioning GUI for dynamic_reconfigure, which means there's essentially no dynamic_reconfigure.

As a work around, I've been installing it from fuerte and switching workspaces to use it with hydro packages. @bgromov I would say that if you can 'source /opt/ros/fuerte/setup.bash; rosrun dynamic_reconfigure reconfigure_gui" and it works there, go ahead and fix this for an indigo release. That was the standard reference of functionality and rqt_reconfigure should be considered broken until it performs as dynamic_reconfigure did.

chadrockey avatar Feb 09 '14 20:02 chadrockey

@chadrockey Thanks for the workaround. I can confirm that everything works correctly with the old reconfigure_gui.

bgromov avatar Feb 10 '14 18:02 bgromov

Can one of the admins verify this patch?

rosbuild avatar Mar 24 '14 21:03 rosbuild