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 fixed package to run with ros2 run #58

Merged
merged 2 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions CMakeLists.txt

This file was deleted.

5 changes: 2 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
<author>Dorian Scholz</author>
<author email="dthomas@osrfoundation.org">Dirk Thomas</author>

<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend version_gte="0.2.19">python_qt_binding</exec_depend>
<exec_depend>python3-matplotlib</exec_depend>
<exec_depend>python3-numpy</exec_depend>
Expand All @@ -30,7 +28,8 @@
<exec_depend>std_msgs</exec_depend>

<export>
<build_type>ament_cmake</build_type>
<architecture_independent/>
<build_type>ament_python</build_type>
<rqt_gui plugin="${prefix}/plugin.xml"/>
</export>
</package>
Empty file added resource/rqt_plot
Empty file.
10 changes: 0 additions & 10 deletions scripts/rqt_plot

This file was deleted.

4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[develop]
script-dir=$base/lib/rqt_plot
[install]
install-scripts=$base/lib/rqt_plot
44 changes: 36 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
#!/usr/bin/env python
from setuptools import setup

from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
package_name = 'rqt_plot'

d = generate_distutils_setup(
packages=['rqt_plot', 'rqt_plot.data_plot'],
setup(
name=package_name,
version='1.0.7',
packages=[package_name, package_name + '/data_plot'],
package_dir={'': 'src'},
scripts=['scripts/rqt_plot']
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name + '/resource',
['resource/plot.ui']),
('share/' + package_name, ['package.xml']),
('share/' + package_name, ['plugin.xml']),
],
install_requires=['setuptools'],
zip_safe=True,
author='Dorian Scholz',
maintainer='Dirk Thomas, Dorian Scholz, Austin Hendrix',
maintainer_email='dthomas@osrfoundation.org',
keywords=['ROS'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Topic :: Software Development',
],
description=(
'rqt_plot provides a GUI plugin visualizing numeric values in a 2D plot ' +
'using different plotting backends.'
),
license='BSD',
entry_points={
'console_scripts': [
'rqt_plot = ' + package_name + '.main:main',
],
},
)

setup(**d)
14 changes: 14 additions & 0 deletions src/rqt_plot/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import sys

from rqt_gui.main import Main
from rqt_plot.plot import Plot


def main():
plugin = 'rqt_plot.plot.Plot'
main = Main(filename=plugin)
sys.exit(main.main(standalone=plugin, plugin_argument_provider=Plot.add_arguments))


if __name__ == '__main__':
main()