-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
Description
I am trying to apply image processing techniques on image stream received from simGetImage API. I want an image stream of 30 fps. But the image stream I get from simGetImage gives an fps of 10-12. The simulation fps (50 fps) is good when simGetImage API is not used.
My code (ROS wrapper):
self.image_publisher_rate = 0.01
rospy.Timer(rospy.Duration(self.image_publisher_rate), self.image_publisher_cb)
def image_publisher_cb(self, timer):
image_data = self.get_camera_data()
self.image_pub.publish(self.bridge.cv2_to_imgmsg(image_data, encoding='bgr8'))
def get_camera_data(self):
rawImage = self.image_client.simGetImage(self.camera_name, airsim.ImageType.Scene)
if rawImage is not None:
frame = cv2.imdecode(airsim.string_to_uint8_array(rawImage), cv2.IMREAD_UNCHANGED)
return frame
OS : Ubuntu 18.04
Game Engine : Unity 2020.1.4f1
Other answers I saw were mostly related to projects depending on Unreal Engine (as opposed to mine)
I want my camera fps to be equal to or more than 30 fps. How do I achieve this?
nightduck