Browse Source

Rotate and comment the sleep part

pull/65/head
trivediana 2 years ago
parent
commit
d74ee23044
2 changed files with 14 additions and 4 deletions
  1. +7
    -2
      vz_ros_wrappers/scripts/grab_D435i.py
  2. +7
    -2
      vz_ros_wrappers/scripts/grab_thermal.py

+ 7
- 2
vz_ros_wrappers/scripts/grab_D435i.py View File

@ -74,10 +74,15 @@ class D435i:
def run(self):
while not rospy.is_shutdown():
ret, self.D435i_image = self.D435i_cap.read()
##### NOTE: Change rotation based on what you see ########
self.D435i_image = cv2.rotate(self.D435i_image,cv2.ROTATE_90_CLOCKWISE)
################################################################
# Note : To read the input at the same frame rate as the recorded video, when using
# locally recorded video, uncomment the following and replace with (1/frame rate of video)
video_frame_rate_to_freq = 1/9
time.sleep(video_frame_rate_to_freq)
# video_frame_rate_to_freq = 1/9
# time.sleep(video_frame_rate_to_freq)
if __name__ == '__main__':
try:

+ 7
- 2
vz_ros_wrappers/scripts/grab_thermal.py View File

@ -80,11 +80,16 @@ class FLIR_LEPTON:
def run(self):
while not rospy.is_shutdown():
ret, self.thermal_image = self.thermal_cap.read()
##### NOTE: Change rotation based on what you see ########
self.thermal_image = cv2.rotate(self.thermal_image,cv2.ROTATE_180)
################################################################
# Note : To read the input at the same frame rate as the recorded video, when using
# locally recorded video, uncomment the following and replace with (1/frame rate of video)
# Comment the following two lines when running on the robot
video_frame_rate_to_freq = 1/7
time.sleep(video_frame_rate_to_freq)
# video_frame_rate_to_freq = 1/7
# time.sleep(video_frame_rate_to_freq)
if __name__ == '__main__':
try:

Loading…
Cancel
Save