esp32-camera
-
Example app for publishing information from camera
-
add camera option to menuconfig and allowing it.
Signed-off-by: Dor Ben Harush [email protected]
Thank you very much for your contribution, @DorBenHarush. In order for this pull request to be merged, please sign-off your commit (git commit --amend --signoff) and add another commit in which you add your name to the NOTICE file in the root of the repository. Please also pay attention to the notes in NOTICE and CONTRIBUTING.md regarding the ownership of the code you are contributing.
Don't forget the sign-off tag, please, which requires a force push (git push -f) as you changed the commit messages.
relates to micro-ROS/micro_ros_setup/pull/176
Now, after this issue is solved i intend to create a new rclc_demo for the esp32camera. I'll change the program here to an image publisher instead of image_size and the rclc_demo will receive the images. I'll commit the changes in a few days.
suggestions and advices are welcomed.
Hello @DorBenHarush this the last commit solves https://github.com/micro-ROS/micro_ros_setup/issues/187?
Please be aware that RMW_UXRCE_STREAM_HISTORY is related to the size of the middleware buffer and RMW_UXRCE_MAX_HISTORY only sets the available slots of the RMW incoming buffers.
Hi @pablogs9, No this coomit raises the issue. I have noticed that RMW_UXRCE_MAX_HISTORY matchs with the value inside colcon.meta while UXR_CONFIG_UDP_TRANSPORT_MTU doesnt.
I have decided to change the pixel_format to jpeg to increase the resulution. In order to view the images I created a cv_bridge. bridge:
#!/usr/bin/env python3
import rclpy
from rclpy.node import Node
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import CompressedImage
import cv2
import numpy as np
class MinimalSubscriber(Node):
def __init__(self, ):
super().__init__('minimal_subscriber')
self.subscription = self.create_subscription(CompressedImage, 'freertos_picture_publisher', self.listener_callback, 10)
self.subscription # prevent unused variable warning
self.bridge = CvBridge()
def listener_callback(self, image_message):
self.get_logger().info('recieved an image')
#recieve image and co nvert to cv2 image
cv2.imshow('esp32_image', self.cv_image)
cv2.waitKey(3)
def main(args=None):
rclpy.init(args=args)
minimal_subscriber = MinimalSubscriber()
rclpy.spin(minimal_subscriber)
minimal_subscriber.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()`