Skip to content

Commit

Permalink
can publish image from srv
Browse files Browse the repository at this point in the history
  • Loading branch information
luceharris committed Dec 11, 2024
1 parent 177ab1a commit 924ee7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/image_consumer.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def consume_images(kafka_topic: str, kafka_server: str):

parser = argparse.ArgumentParser()

parser.add_argument("-t", "--topic", default="heron.sim-test.wrist-camera", help="Kafka topic name")
parser.add_argument("-t", "--topic", default="ugv.image.body", help="Kafka topic name")
parser.add_argument("-s", "--server", default="10.2.0.8:9092", help="Kafka bootstrap server")

args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion src/kafka_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


class KafkaPublisher:
# TODO need to make kafka topics!!
"""
takes a yaml file with:
- ros msg types
Expand Down Expand Up @@ -130,6 +129,7 @@ def create_kafka_topics(self, topics_dict: dict) -> None:
rospy.logerr("All kafka topics already exist.")

def image_callback(self, msg, kafka_topic: str) -> None:
### also log to Robotnik
try:
# convert ros image to compressed jpeg and base64 encode
cv_image = self.bridge.imgmsg_to_cv2(
Expand Down

0 comments on commit 924ee7b

Please sign in to comment.