Skip to content

Commit

Permalink
Renamed traffic_light_spawner to image_roi_publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
smtobin committed Jan 1, 2023
1 parent 9badab8 commit 12051e5
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ def generate_launch_description():

return LaunchDescription([
Node(
package='traffic_light_spawner',
namespace='traffic_light_spawner',
executable='traffic_light_spawner_node',
name='traffic_light_spawner',
package='image_roi_publisher',
namespace='image_roi_publisher',
executable='image_roi_publisher_node',
name='image_roi_publisher',
output='screen',
emulate_tty=True,
parameters=[
{"package_path": "/home/ros_sandbox/ros_sandbox/workspace/src/traffic_light_spawner",
"image_path": "data/sample_many.jpg",
"roi_path": "data/sample_many.txt"}
{"package_path": "/home/ros_sandbox/ros_sandbox/workspace/src/image_roi_publisher",
"image_path": "data/traffic_lights/sample_many.jpg",
"roi_path": "data/traffic_lights/sample_many.txt"}
],
# remappings=[
# ("~/output/image")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
import cv2
import numpy as np

class TrafficLightSpawner(Node):
class ImageROIPublisher(Node):

def __init__(self):
super().__init__('traffic_light_spawner')
super().__init__('image_roi_publisher')
self.image_publisher = self.create_publisher(Image, "~/output/image", 1)
self.roi_publisher = self.create_publisher(RoiArray, "~/output/rois", 1)
self.bridge = CvBridge()
Expand Down Expand Up @@ -82,14 +82,14 @@ def get_time_msg(self):
def main(args=None):
rclpy.init(args=args)

traffic_light_spawner = TrafficLightSpawner()
image_roi_publisher = ImageROIPublisher()

rclpy.spin(traffic_light_spawner)
rclpy.spin(image_roi_publisher)

# Destroy the node explicitly
# (optional - otherwise it will be done automatically
# when the garbage collector destroys the node object)
traffic_light_spawner.destroy_node()
image_roi_publisher.destroy_node()
rclpy.shutdown()


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>traffic_light_spawner</name>
<name>image_roi_publisher</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="[email protected]">ros_sandbox</maintainer>
Expand Down
4 changes: 4 additions & 0 deletions workspace/src/image_roi_publisher/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[develop]
script_dir=$base/lib/image_roi_publisher
[install]
install_scripts=$base/lib/image_roi_publisher
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup

package_name = 'traffic_light_spawner'
package_name = 'image_roi_publisher'

setup(
name=package_name,
Expand All @@ -20,7 +20,7 @@
tests_require=['pytest'],
entry_points={
'console_scripts': [
'traffic_light_spawner_node = traffic_light_spawner.traffic_light_spawner_node:main'
'image_roi_publisher_node = image_roi_publisher.image_roi_publisher_node:main'
],
},
)
4 changes: 0 additions & 4 deletions workspace/src/traffic_light_spawner/setup.cfg

This file was deleted.

0 comments on commit 12051e5

Please sign in to comment.