-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
Signed-off-by: Gonzalo de Pedro <[email protected]>
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]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
Let's create a |
Done |
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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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',
],
},
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
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. |
There was a problem hiding this 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.
Signed-off-by: Gonzalo de Pedro <[email protected]>
Signed-off-by: Gonzalo de Pedro <[email protected]>
@@ -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"> |
There was a problem hiding this comment.
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?
Signed-off-by: Gonzalo de Pedro <[email protected]>
This will make the package act like it did before - run by invoking `ros2 run rqt_reconfigure rqt_reconfigure` instead of only `rqt_reconfigure`.
Signed-off-by: Scott K Logan <[email protected]>
There was a problem hiding this 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.
_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 |
There was a problem hiding this comment.
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. | |||
|
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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): | ||
""" | ||
""" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
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]>
No description provided.