Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RQT Parameters for Ros2 #31

Merged
merged 16 commits into from
Jul 22, 2019
Merged

RQT Parameters for Ros2 #31

merged 16 commits into from
Jul 22, 2019

Conversation

gonzodepedro
Copy link
Collaborator

No description provided.

Gonzalo de Pedro and others added 6 commits May 28, 2019 14:07
Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
@gonzodepedro gonzodepedro self-assigned this May 31, 2019
@cottsay
Copy link
Member

cottsay commented May 31, 2019

Let's create a dashing branch for these changes. I'll create the branch from the current master - if you could re-create this PR against that branch so the changes can be reviewed, that would be great.

@gonzodepedro gonzodepedro reopened this Jun 3, 2019
@gonzodepedro gonzodepedro changed the base branch from master to dashing June 3, 2019 19:40
@gonzodepedro
Copy link
Collaborator Author

Done

package.xml Outdated Show resolved Hide resolved
package.xml Outdated
@@ -23,17 +23,18 @@
<author>Isaac Saito</author>
<author>Ze'ev Klapow</author>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything fancy happening in the CMakeLists.txt - is there a reason not to just make this an ament_python package?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Changed to 'ament_python"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't happen. An ament_python package doesn't include a CMakeLists.txt.

We'll also need a more robust setup.py like this:

from setuptools import setup

package_name = 'rqt_reconfigure'
setup(
    name=package_name,
    version='1.0.1',
    package_dir={'': 'src'},
    packages=[package_name],
    data_files=[
        ('share/ament_index/resource_index/packages',
            ['resource/' + package_name]),
        ('share/' + package_name, ['package.xml', 'plugin.xml']),
        ('share/' + package_name + '/resource', [
            'resource/editor_bool.ui',
            'resource/editor_enum.ui',
            'resource/editor_number.ui',
            'resource/editor_string.ui',
            'resource/node_selector.ui',
            'resource/paramedit_pane.ui',
            'resource/param_main.ui',
            'resource/param_timeline.ui',
            'resource/singlenode_parameditor.ui',
            'resource/text_filter_widget.ui',
        ]),
    ],
    zip_safe=True,
    author='Isaac Saito, Ze\'ev Klapow',
    maintainer='Scott K Logan',
    maintainer_email='[email protected]',
    keywords=['ROS'],
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Programming Language :: Python',
        'Topic :: Software Development',
    ],
    description=(
        'This rqt plugin succeeds former dynamic_reconfigure\'s GUI ' +
        '(reconfigure_gui), and provides the way to view and edit the parameters ' +
        'that are accessible via dynamic_reconfigure.'
    ),
    license='BSD',
    entry_points={
        'console_scripts': [
            'rqt_reconfigure = rqt_reconfigure.main:main',
        ],
    },
)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dirk-thomas
Copy link
Contributor

The current patch mixes a lot of unrelated changes. E.g. whitespace / formatting changes should be done separately - they could land in master - and then this PR will focus on changes related to ROS 2. The same goes for other non-ROS 2 changes like changing the permission flags of the test files.

@gonzodepedro gonzodepedro requested a review from cottsay June 19, 2019 18:14
Copy link
Member

@cottsay cottsay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to find a way to keep the log statements the same across ROS 1 and 2. I'll try to make a PR to the ROS 1 branch soon. Hopefully this will minimize the drift.

package.xml Show resolved Hide resolved
package.xml Outdated Show resolved Hide resolved
test/test_parameters_service.py Outdated Show resolved Hide resolved
Gonzalo de Pedro added 2 commits June 27, 2019 15:59
Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
@gonzodepedro gonzodepedro requested a review from cottsay June 28, 2019 18:50
src/rqt_reconfigure/param_editors.py Outdated Show resolved Hide resolved
src/rqt_reconfigure/param_editors.py Outdated Show resolved Hide resolved
src/rqt_reconfigure/param_editors.py Outdated Show resolved Hide resolved
src/rqt_reconfigure/node_selector_widget.py Outdated Show resolved Hide resolved
@@ -1,5 +1,5 @@
<library path="src">
<class name="Param" type="rqt_reconfigure.param_plugin.ParamPlugin" base_class_type="rqt_gui_py::Plugin">
<class name="ParamPlugin" type="rqt_reconfigure.param_plugin.ParamPlugin" base_class_type="rqt_gui_py::Plugin">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about this change - is it to conform to a pattern? Should it be made in ROS 1 as well?

@gonzodepedro gonzodepedro requested a review from cottsay July 17, 2019 15:50
cottsay added 5 commits July 18, 2019 16:38
This will make the package act like it did before - run by invoking
`ros2 run rqt_reconfigure rqt_reconfigure` instead of only
`rqt_reconfigure`.
Copy link
Member

@cottsay cottsay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still curious about the change to plugin.xml, and there is still a lot of alignment we could do, but I think it is OK to merge this change now. All of my tests are coming back green.

Thanks for working with me to keep this package maintainable.

@gonzodepedro gonzodepedro merged commit c72ab76 into dashing Jul 22, 2019
@cottsay cottsay deleted the dashing-devel branch July 23, 2019 14:49
_child_index = curr_qmindex.child(0, 0)
if ((not _child_index.isValid()) and
child_index = curr_qmindex.child(0, 0)
if ((not child_index.isValid()) and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please either revert unnecessary / unrelated changes like this or apply the same diff on the ROS 1 branch.

@@ -328,8 +330,11 @@ def _update_nodetree_pernode(self):

# Instantiate QStandardItem. Inside, dyn_reconf client will
# be generated too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert unnecessary / unrelated changes like this to keep the diff between the branches minimal.

@@ -0,0 +1,136 @@
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this file is new the copyright should be OSRF.


def __init__(self, node, remote_node_name, param_change_callback=None):
"""
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please either remove the empty docblock or add actual documentation to it.

# TODO: .ui file needs to be back into usage in later phase.
# ui_file = os.path.join(rp.get_path('rqt_reconfigure'),
# 'resource', 'singlenode_parameditor.ui')
# loadUi(ui_file, self)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this TODO?


# Labels should not stretch
# self.grid.setColumnStretch(1, 1)
# self.setLayout(self.grid)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out?

).triggered.connect(self._set_to_min)

# TODO: Fix that the naming of _paramval_lineEdit instance is not
# consistent among Editor's subclasses.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this TODO?

# TODO: .ui file needs to replace the GUI components declaration
# below. For unknown reason, referring to another .ui files
# from a .ui that is used in this class failed. So for now,
# I decided not use .ui in this class.
# If someone can tackle this I'd appreciate.
_hlayout_top = QHBoxLayout(self)
_hlayout_top.setContentsMargins(QMargins(0, 0, 0, 0))
hlayout_top = QHBoxLayout(self)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason to rename all these variables?

Please either revert unnecessary / unrelated changes like this or apply the same diff on the ROS 1 branch.

))

def _node_disabled(self, node_grn):
logging.debug('paramedit_w _node_disabled grn={}'.format(node_grn))
# self._checkbox.setChecked(value) # TODO(Gonzo) signal doesn't work
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this comment / TODO?

@wjwwood wjwwood mentioned this pull request Jul 23, 2019
34 tasks
cottsay pushed a commit that referenced this pull request Jul 31, 2019
Follow up PR to address comments made on already committed PR #31

Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Scott K Logan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants