freertos_apps icon indicating copy to clipboard operation
freertos_apps copied to clipboard

esp32-camera

Open DorBenHarush opened this issue 5 years ago • 7 comments

  • Example app for publishing information from camera

  • add camera option to menuconfig and allowing it.

Signed-off-by: Dor Ben Harush [email protected]

DorBenHarush avatar Aug 11 '20 18:08 DorBenHarush

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.

ralph-lange avatar Aug 11 '20 18:08 ralph-lange

Don't forget the sign-off tag, please, which requires a force push (git push -f) as you changed the commit messages.

ralph-lange avatar Aug 11 '20 19:08 ralph-lange

relates to micro-ROS/micro_ros_setup/pull/176

donRaphaco avatar Aug 12 '20 10:08 donRaphaco

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.

DorBenHarush avatar Sep 01 '20 16:09 DorBenHarush

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.

pablogs9 avatar Sep 21 '20 05:09 pablogs9

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.

DorBenHarush avatar Sep 21 '20 10:09 DorBenHarush

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()`

DorBenHarush avatar Oct 28 '20 20:10 DorBenHarush