Skip to content

Commit

Permalink
Fix install rules and dashing changes (#38)
Browse files Browse the repository at this point in the history
* fix ament indexing
* fix package resource files
* add tk depenndency
* add check for param index-ability
* data files are now package agnostic
Signed-off-by: Ted Kern <ted.kern@canonical.com>
  • Loading branch information
Arnatious authored and bmagyar committed Sep 18, 2019
1 parent f5780eb commit 1ea3edd
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 23 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,22 @@ def __init__(self):
self.get_logger().error('command {} was duplicated'.format(i))
continue

interface_group = config['type']
try:
interface_group = config['type']

self.add_command(i, config)
self.add_command(i, config)

if interface_group == 'topic':
self.register_topic(i, config)
elif interface_group == 'action':
self.register_action(i, config)
elif interface_group == 'service':
self.register_service(i, config)
else:
self.get_logger().error("unknown type '{type}'"
"for command '{i}'".format_map(locals()))
if interface_group == 'topic':
self.register_topic(i, config)
elif interface_group == 'action':
self.register_action(i, config)
elif interface_group == 'service':
self.register_service(i, config)
else:
self.get_logger().error("unknown type '{type}'"
"for command '{i}'".format_map(locals()))
except TypeError:
self.get_logger().warn(f"parameter {i} is not a dict")

# Don't subscribe until everything has been initialized.
self._subscription = self.create_subscription(
Expand Down
1 change: 1 addition & 0 deletions joy_teleop/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<author email="paul.mathieu@pal-robotics.com">Paul Mathieu</author>

<exec_depend>control_msgs</exec_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>teleop_tools_msgs</exec_depend>
Expand Down
File renamed without changes.
13 changes: 9 additions & 4 deletions joy_teleop/setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import os

from setuptools import find_packages
from setuptools import setup


package_name = 'joy_teleop'
share_path = 'share/' + package_name


setup(
name=package_name,
version='0.3.0',
packages=find_packages(exclude=['test']),
data_files=[
(share_path, ['package.xml']),
(share_path + '/config/', ['config/joy_teleop_example.yaml']),
(share_path + '/launch/', ['launch/example.launch.py']),
(os.path.join(share_path, 'config'), [os.path.join('config', 'joy_teleop_example.yaml')]),
(os.path.join(share_path, 'launch'), [os.path.join('launch', 'example.launch.py')]),
(os.path.join('share', 'ament_index', 'resource_index', 'packages'), [os.path.join('resource', package_name)]),
],
install_requires=['setuptools'],
zip_safe=True,
Expand All @@ -35,8 +40,8 @@
tests_require=['pytest'],
entry_points={
'console_scripts': [
'joy_teleop = scripts.joy_teleop:main',
'incrementer_server = scripts.incrementer_server:main',
'joy_teleop = joy_teleop.joy_teleop:main',
'incrementer_server = joy_teleop.incrementer_server:main',
],
},
)
File renamed without changes.
File renamed without changes.
Empty file added key_teleop/resource/key_teleop
Empty file.
13 changes: 9 additions & 4 deletions key_teleop/setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import os

from setuptools import find_packages
from setuptools import setup


package_name = 'key_teleop'
share_path = 'share/' + package_name
share_path = os.path.join('share', package_name)


setup(
name=package_name,
version='0.3.0',
packages=find_packages(exclude=['test']),
data_files=[
(share_path + '/', ['package.xml']),
(share_path + '/config/', ['config/' + package_name + '.yaml']),
(share_path, ['package.xml']),
(os.path.join(share_path, 'config'), [os.path.join('config', f'{package_name}.yaml')]),
(os.path.join('share', 'ament_index', 'resource_index', 'packages'), [os.path.join('resource', package_name)]),
],
install_requires=['setuptools'],
zip_safe=True,
Expand All @@ -34,7 +39,7 @@
tests_require=['pytest'],
entry_points={
'console_scripts': [
'key_teleop = scripts.key_teleop:main',
'key_teleop = key_teleop.key_teleop:main',
],
},
)
Empty file.
File renamed without changes.
1 change: 1 addition & 0 deletions mouse_teleop/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>python-numpy</exec_depend>
<exec-depend>python-tk</exec_depend>

<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
Expand Down
Empty file.
13 changes: 9 additions & 4 deletions mouse_teleop/setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import os

from setuptools import find_packages
from setuptools import setup


package_name = 'mouse_teleop'
share_path = 'share/' + package_name
share_path = os.path.join('share', package_name)


setup(
name=package_name,
version='0.3.0',
packages=find_packages(exclude=['test']),
data_files=[
(share_path, ['package.xml']),
(share_path + '/config/', ['config/mouse_teleop.yaml']),
(share_path + '/launch/', ['launch/mouse_teleop.launch.py']),
(os.path.join(share_path, 'config'), [os.path.join('config', f'{package_name}.yaml')]),
(os.path.join(share_path, 'launch'), [os.path.join('launch', f'{package_name}.launch.py')]),
(os.path.join('share', 'ament_index', 'resource_index', 'packages'), [os.path.join('resource', package_name)]),
],
install_requires=['setuptools'],
zip_safe=True,
Expand All @@ -35,7 +40,7 @@
tests_require=['pytest'],
entry_points={
'console_scripts': [
'mouse_teleop = scripts.mouse_teleop:main',
'mouse_teleop = mouse_teleop.mouse_teleop:main',
],
},
)

0 comments on commit 1ea3edd

Please sign in to comment.