Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execute_async() not working as expected #240

Open
pirobot opened this issue Jul 5, 2013 · 1 comment
Open

execute_async() not working as expected #240

pirobot opened this issue Jul 5, 2013 · 1 comment

Comments

@pirobot
Copy link

pirobot commented Jul 5, 2013

My set up is Ubuntu 12.04, ROS Groovy and the Debian Ecto packages.

I expected the following code to run the Canny edge detection for 5 seconds and then quit. However, the video window never appears and the program simply exists after 5 seconds. If I use sched.execute() instead of sched.execute_async(), the video and edge processing displays properly but of course never exits.

!/usr/bin/env python

import sys
import time
import ecto
from ecto_opencv.highgui import VideoCapture, imshow, FPSDrawer
from ecto_opencv.imgproc import Canny

video_cap = VideoCapture(video_device=0, width=320, height=240)
fps = FPSDrawer()
edges = Canny(threshold1=100.0, threshold2 = 50.0)

plasm = ecto.Plasm()
plasm.connect(video_cap['image'] >> fps['image'],
fps['image'] >> edges[:],
edges[:] >> imshow(name='video_cap')['image'],
)

sched = ecto.Scheduler(plasm)
sched.execute()

time.sleep(5)

sched.stop()

@vrabaud
Copy link
Member

vrabaud commented Aug 11, 2013

I tried with cells that write stuff and it's the same behavior. @ethanrublee , any idea ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants