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

Changed the build type to ament_python and added setup.cfg #21

Merged
merged 7 commits into from
Jan 26, 2021

Conversation

ahcorde
Copy link

@ahcorde ahcorde commented May 13, 2020

Fixed package to run with ros2 run rqt_console rqt_console. Related to this issue #20

Signed-off-by: ahcorde ahcorde@gmail.com

Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde added the bug label May 13, 2020
@ahcorde ahcorde requested a review from dirk-thomas May 13, 2020 14:47
@ahcorde ahcorde self-assigned this May 13, 2020
Signed-off-by: ahcorde <ahcorde@gmail.com>
Copy link

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

I think a better title for this PR would indicate that we're converting to a pure Python package, e.g. "Convert to pure Python package".

setup.py Outdated Show resolved Hide resolved
src/rqt_console/main.py Outdated Show resolved Hide resolved
Signed-off-by: ahcorde <ahcorde@gmail.com>
Copy link

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

I can't get the executable to run. I think there's something wrong with the setup.py.

$ ros2 run rqt_console rqt_console
RosPluginProvider.load(rqt_console/Console) exception raised in __builtin__.__import__(rqt_console.console, [Console]):
Traceback (most recent call last):
  File "/opt/ros/foxy/lib/python3.8/site-packages/rqt_gui/ros_plugin_provider.py", line 80, in load
    module = __builtin__.__import__(
  File "/root/rqt_console_ws/install/rqt_console/lib/python3.8/site-packages/rqt_console/console.py", line 43, in <module>
    from rqt_console.console_widget import ConsoleWidget
  File "/root/rqt_console_ws/install/rqt_console/lib/python3.8/site-packages/rqt_console/console_widget.py", line 48, in <module>
    from .filters.custom_filter import CustomFilter
ModuleNotFoundError: No module named 'rqt_console.filters'

PluginManager._load_plugin() could not load plugin "rqt_console/Console":
Traceback (most recent call last):
  File "/opt/ros/foxy/lib/python3.8/site-packages/qt_gui/plugin_handler.py", line 102, in load
    self._load()
  File "/opt/ros/foxy/lib/python3.8/site-packages/qt_gui/plugin_handler_direct.py", line 55, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "/opt/ros/foxy/lib/python3.8/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/foxy/lib/python3.8/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rqt_gui_py/ros_py_plugin_provider.py", line 64, in load
    return super(RosPyPluginProvider, self).load(plugin_id, ros_plugin_context)
  File "/opt/ros/foxy/lib/python3.8/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rqt_gui/ros_plugin_provider.py", line 91, in load
    raise e
  File "/opt/ros/foxy/lib/python3.8/site-packages/rqt_gui/ros_plugin_provider.py", line 80, in load
    module = __builtin__.__import__(
  File "/root/rqt_console_ws/install/rqt_console/lib/python3.8/site-packages/rqt_console/console.py", line 43, in <module>
    from rqt_console.console_widget import ConsoleWidget
  File "/root/rqt_console_ws/install/rqt_console/lib/python3.8/site-packages/rqt_console/console_widget.py", line 48, in <module>
    from .filters.custom_filter import CustomFilter
ModuleNotFoundError: No module named 'rqt_console.filters'

It might make sense to move the source files out of the src directory, similar to other ROS 2 python packages.

setup.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde requested a review from jacobperron May 14, 2020 08:01
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde changed the title Fixed package to run with ros2 run Changed the build type to ament_python and fixed package to run with ros2 run May 14, 2020
Copy link

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM pending CI

I do see this error when I stop (ctrl-c) the process, but seems like something unrelated to this change (ros-visualization/qt_gui_core#213).

@ahcorde
Copy link
Author

ahcorde commented May 27, 2020

@jacobperron This package does not have any tests. Does make sense to include copyright, flake8 and pep256? I can do it in a follow up PR.

Running CI up-to rqt_console

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@jacobperron
Copy link

This package does not have any tests. Does make sense to include copyright, flake8 and pep256? I can do it in a follow up PR.

If you like, a follow-up PR sounds good.

@ahcorde
Copy link
Author

ahcorde commented Jul 10, 2020

can we merge this?

@ahcorde ahcorde changed the title Changed the build type to ament_python and fixed package to run with ros2 run Changed the build type to ament_python and added setup.cfg Jul 24, 2020
@ahcorde
Copy link
Author

ahcorde commented Jul 27, 2020

@jacobperron CI is green, can we merge this one?

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

setup.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
Signed-off-by: ahcorde <ahcorde@gmail.com>
Copy link

@ivanpauno ivanpauno left a comment

Choose a reason for hiding this comment

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

LGTM with the missing import fixed and green CI

setup.py Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde
Copy link
Author

ahcorde commented Jan 26, 2021

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@ahcorde ahcorde merged commit 9442cc8 into dashing-devel Jan 26, 2021
ahcorde added a commit that referenced this pull request Jan 27, 2021
Signed-off-by: ahcorde <ahcorde@gmail.com>
clalancette pushed a commit that referenced this pull request Jan 27, 2021
Signed-off-by: ahcorde <ahcorde@gmail.com>
@wjwwood wjwwood deleted the ahcorde/fix_run branch March 18, 2021 23:57
@tfoote tfoote mentioned this pull request Jul 14, 2022
arne48 pushed a commit that referenced this pull request Jul 15, 2022
* Fixed package to run with ros2 run

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fix author and maintener

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed version on setup.py

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added feedback

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed description

Signed-off-by: ahcorde <ahcorde@gmail.com>

* package collected automatically using setuptools.find_packages()

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added feedback

Signed-off-by: ahcorde <ahcorde@gmail.com>
arne48 pushed a commit that referenced this pull request Jul 15, 2022
Signed-off-by: ahcorde <ahcorde@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants