ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ECTO + Kinect Issue

asked 2013-04-04 06:58:41 -0600

updated 2013-04-07 19:52:14 -0600

When trying to run a VERY basic ECTO cell before I integrate in any of my own functionality I am getting the following error:

Connecting to device.
 attempting to turn on registration...
Failed to start generating.Bad Parameter sent to the device!

Connected to device.
Failed to update all contexts.A timeout has occurred when waiting for new data!

Segmentation fault (core dumped)

I am not sure what is causing this as I am simply using ECTO to access the Kinect and to display the point cloud. I have attached the source for the file below:

#!/usr/bin/env python

import ecto
import ecto_openni
import ecto_pcl

plasm = ecto.Plasm()

# capture from kinect and downsample
device = ecto_openni.Capture( 'device' )
cloud_generator = ecto_pcl.NiConverter('cloud_generator')
viewer = ecto_pcl.CloudViewer( "viewer", window_name="Clouds!" )

graph = [ device[:] >> cloud_generator[:],
          cloud_generator[:] >> viewer[:]

plasm.connect( graph )

if __name__ == "__main__":
    from ecto.opts import doit
    doit(plasm, description='test.')

Above this line has been resolved.

I have updated my python code to include the following:

#!/usr/bin/env python

import ecto, ecto_pcl, ecto_ros, ecto_pcl_ros

from ecto_openni import Capture

plasm = ecto.Plasm()

# capture from kinect and downsample
cloud_sub = ecto_sensor_msgs.Subscriber_PointCloud2("cloud_sub", topic_name='/camera/depth_registered/points')
msg2cloud = ecto_pcl_ros.Message2PointCloud("msg2cloud", format=ecto_pcl.XYZRGB)

cloud2msg = ecto_pcl_ros.PointCloud2Message("cloud2msg")
cloud_pub = ecto_sensor_msgs.Publisher_PointCloud2("cloud_pub",topic_name='/ecto_pcl/sample_output')

plasm.connect( cloud_sub['output'] >> msg2cloud[:],
               msg2cloud[:] >> cloud2msg[:],
               cloud2msg[:] >> cloud_pub[:] )

ecto_ros.init(sys.argv, "get_point_cloud")

if __name__ == "__main__":
    from ecto.opts import doit
    doit(plasm, description='Read a pcd through ROS.')

When I run this code I get following error:

Traceback (most recent call last):
  File "", line 10, in <module>
    cloud_sub = ecto_sensor_msgs.Subscriber_PointCloud2("cloud_sub", topic_name='/camera/depth_registered/points')
NameError: name 'ecto_sensor_msgs' is not defined

I am also not sure if I am performing the call to ecto_ros.init() properly.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-06 05:28:47 -0600

Vincent Rabaud gravatar image

updated 2013-04-06 23:15:01 -0600

Your first case seems to be a bug, please file one on to keep track of it (I am also looking into it at the same time).

We usually do not use the raw openni wrapper but create_source ("from import create_source") but that would not work with PCL indeed.

The second is incomplete code, you forgot a "from ecto_ros import ecto_sensor_msgs" and you also need to call "ecto_ros.init(sys.argv, "Whatever")" at first as mentioned on the docs here:

That second code works for me. Please file a bug if that is not the case for you.

UPDATE: ok, to answer one of the comments, ecto is definitely maintained, not necessarily developed (I will update the docs for that):

  • ecto had specs that were met and we have not found a core bug in two years (yeah, crazy ...)
  • ecto_ros is mostly autogenerated publishers/subscribers/bad tools around ROS msgs. So nothing to really add (if you think so, please file a bug report)
  • ecto_pcl is not really used anywhere but we can definitely wrap more functionalities.
  • ecto_openni is a wrapper around the OpenNI driver which has been stable for a while, except we usually use the OpenNICapture (bad naming) which works with OpenCV
  • ecto_opencv wraps old or upcoming OpenCV functionalities so we update it once in a while
  • ecto_image_pipeline is a re-write of image_pipeline in ecto and we should probably simply merge it upstream

So, on the ecto side, it's pretty stable and all the nodelets from image_common, image_pipeline, pcl_ros vision_opencv should use it for stability increase (ecto is basically ROS-agnostic Python/C++ stable nodelets with a scheduler). We're kindof waiting on when they'll ask the community about what ROS 2.0 should have before changing everything.

edit flag offensive delete link more


I have opened an issue for the first one here: and I will try to fix the second and let you know if that solves it in the next little bit.

BadRobot gravatar image BadRobot  ( 2013-04-06 07:42:55 -0600 )edit

Is ecto still under active development? When I look at the GitHub pages for PCL, OpenNI and ROS there doesn't seem to have been any work on them in the last month or so I am just curious as we just want to ensure it is still something under active development and use :)

BadRobot gravatar image BadRobot  ( 2013-04-06 07:44:03 -0600 )edit

Question Tools


Asked: 2013-04-04 06:58:41 -0600

Seen: 710 times

Last updated: Apr 07 '13