ros-industrial / motoman

ROS-Industrial Motoman support (http://wiki.ros.org/motoman)
146 stars 192 forks source link

Improve WARN and INFO msgs when topic_list parameter isn't found #485

Closed gavanderhoorn closed 2 years ago

gavanderhoorn commented 2 years ago

This fixes #113 -- and basically implements the suggestion there.

Original commit proposed by @cjue in #483. The version here is a slightly expanded version.

I also wanted to use separate commits and PRs for this change (and the other change in #483, which is now in #484).

The result of this change is that callers of getJointGroups(..) get to decide what to do/print/log when it can't find the topic_list parameter: print a warning or do something else.

Example output with these changes:

[ INFO] [...] [/joint_state]: Failed to find 'topic_list' parameter
[ INFO] [...] [/joint_state]: Expecting/assuming single motion-group controller configuration
[ INFO] [...] [/joint_state]: Adding joint_1_s to list parameter
[ INFO] [...] [/joint_state]: Adding joint_2_l to list parameter
...

As the commit comment explains though: the WARN is retained for the case where the multi-group version of the JTA is started, but the multi-group configuration cannot be found. That's still not necessarily an ERROR, as that node can be used for such cases, but it's definitely abnormal, and warrants a WARN.

gavanderhoorn commented 2 years ago

Let me know if this is an acceptable alternative @cjue.

cjue commented 2 years ago

Looks good to me, much more comprehensive than my initial proposed change.

gavanderhoorn commented 2 years ago

Merging without additional review as I'd already reviewed #483 and @cjue vetted this one.