ros-visualization/qt_gui_core — pull request #7 by SvenWe (2012-11-29 17:34:10+00:00)
Title: Use parser.parse_known_args() to ignore unknown/ROS arguments

This small commit replaces the parse_args() call with a parse_known_args(). This allows the user to pass invalid arguments, without raising exceptions.

The reason for this commit is as follows:
rqt is going to be the base for various tools within the ROS environment. But, at the moment it seems to be impossible to load rqt_gui from a launch file. This seems to come from roslaunch adding the arguments "__name:=..." and "__log:=..." for each node. These arguments aren't known to qt_gui_core and rqt_gui, and make them fail with an error.

A possible solution would be to filter the arguments within rqt_gui. This could happen with ros::removeROSArgs(), but this seems to be quite messy.
I think currently it's a better solution to completely ignore invalid argument and those introduced by ROS, while printing a warning.

See: http://docs.python.org/dev/library/argparse.html#argparse.ArgumentParser.parse_known_args