Conversation
| @@ -0,0 +1,104 @@ | |||
| actionlib==1.12.1 | |||
There was a problem hiding this comment.
Please remove all the ROS specific stuff from here and include only what is required for the imports in the files you created. You can add to the README that ROS version XYZ is required
| # robot_vision_base | ||
|
|
||
| This repo contains the ROS implementation of YOLOv3. The output of the algorithm is a bounding box around the detected object. | ||
| This repository contains the classes for an image publisher and an image subscriber. |
There was a problem hiding this comment.
Please include the ROS and python versions required for using this repository. Correct me if I'm wrong, but I think it's:
ROS Noetic (Ubuntu 20.04)
Python 3.8+
| def __init__(self, cameraport, topic='image_topic', publishrate=0): | ||
| self.publishrate = publishrate | ||
| rospy.init_node('image_publisher_node', anonymous=True) # init rosnode | ||
| self.publisher = rospy.Publisher(topic, Image, queue_size=10) # init topic to publish to |
There was a problem hiding this comment.
The message type (Image) an init parameter, can be defaulted to Image
| self.bridge = CvBridge() # convert opencv image to ros image msg | ||
| self.cam_feed = cv2.VideoCapture(cameraport) # init device we capture from | ||
|
|
||
| def publish_image(self): |
There was a problem hiding this comment.
To support Abdoulaye, we can probably split the publishing process into two function:
- A function that reads an image from the camera and returns that image as an array and the ret value (maybe def read(self))
- A function that takes in an image array, converts it to a ROS Image, and publishes it (maybe def publish(self, data). Abdoulaye can override this method to do his image processing
| # cv2.imshow("publisher",img) - testing, making sure the image is being recieved by the camera | ||
| # Rerun the publish image method | ||
| if (self.publishrate == 0): # publish images as fast as possible | ||
| rospy.spin() |
There was a problem hiding this comment.
I think you can probably remove the if--spin--else and replace with rospy.sleep(self.publishrate). rospy.spin() is a blocking call.
Merge base_image image class to master branch