GithubHelp home page GithubHelp logo

ecto_pcl's People

Contributors

bhaskara avatar dgossow avatar ethanrublee avatar jihoonl avatar mikeferguson avatar pgorczak avatar svenalbrecht avatar tcavallari avatar v4hn avatar vrabaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecto_pcl's Issues

Error message while linking

While compiling under 12.04 Hydro I get the following Error:

Linking CXX shared library /home/sp/hydro_catkin_ork_ws/devel/lib/python2.7/dist-packages/ecto_pcl.so
/usr/bin/ld: /usr/local/lib/libqhullstatic.a(global.c.o): relocation R_X86_64_32S against `qh_qh' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libqhullstatic.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [/home/sp/hydro_catkin_ork_ws/devel/lib/python2.7/dist-packages/ecto_pcl.so] Error 1
make[1]: *** [ecto_pcl/src/CMakeFiles/ecto_pcl_ectomodule.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

ecto::pcl::PclCellDualInputs does not allow unconnected input or EntangledPair

If an input of a PclCellDualInputs is not connected (or its output is connected to one of the inputs through an EntangledPair), the boost::shared_ptr gets default constructed (px=0) which results in an assertion failure when the cell gets executed:

$ gdb -q --args python test.py ~/ros/perception_pcl/pcl/build/pcl/test/table_scene_mug_stereo_textured.pcd
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python test.py /home/stwirth/ros/perception_pcl/pcl/build/pcl/test/table_scene_mug_stereo_textured.pcd
[Thread debugging using libthread_db enabled]
[New Thread 0xaf30eb70 (LWP 16724)]
python: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = ecto::pcl::PointCloud::holder_base]: Assertion `px != 0' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xaf30eb70 (LWP 16724)]
0xb7fdf424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fdf424 in __kernel_vsyscall ()
#1  0xb7c14c8f in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb7c182b5 in __GI_abort () at abort.c:92
#3  0xb7c0d826 in __GI___assert_fail (assertion=0xb5a813a7 "px != 0", file=0xb5a81848 "/usr/include/boost/smart_ptr/shared_ptr.hpp", line=418, 
    function=0xb5af0280 "T* boost::shared_ptr<T>::operator->() const [with T = ecto::pcl::PointCloud::holder_base]") at assert.c:81
#4  0xb5a1b7bc in operator-> (this=<optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:418
#5  make_variant (this=<optimized out>) at /home/stwirth/ecto_kitchen/ecto_pcl/include/ecto_pcl/ecto_pcl.hpp:97
#6  make_variant (this=<optimized out>) at /home/stwirth/ecto_kitchen/ecto_pcl/include/ecto_pcl/pcl_cell_dual_inputs.hpp:81
#7  ecto::pcl::PclCellDualInputs<ecto::pcl::MergeClouds>::process (this=0x8426998, inputs=..., outputs=...)
    at /home/stwirth/ecto_kitchen/ecto_pcl/include/ecto_pcl/pcl_cell_dual_inputs.hpp:83
#8  0xb5a1b8e5 in process (outputs=..., inputs=..., this=0x8425330) at /home/stwirth/ecto_kitchen/ecto/include/ecto/cell.hpp:410
#9  ecto::cell_<ecto::pcl::PclCellDualInputs<ecto::pcl::MergeClouds> >::dispatch_process (this=0x8425330, inputs=..., outputs=...)
    at /home/stwirth/ecto_kitchen/ecto/include/ecto/cell.hpp:415
#10 0xb711bf39 in ecto::cell::process (this=0x8425330) at /home/stwirth/ecto_kitchen/ecto/src/lib/cell.cpp:244

Here is the script I used:

#!/usr/bin/env python

import ecto, ecto_pcl
import sys
import time
import os

plasm = ecto.Plasm()
pcdfile = os.path.join(os.path.dirname(__file__),
                       'cloud.pcd')

if len(sys.argv) > 1:
    pcdfile = sys.argv[1]

reader = ecto_pcl.PCDReader("Reader",
                            filename=pcdfile)

viewer = ecto_pcl.CloudViewer("viewer",
                              window_name="PCD Viewer")

merger = ecto_pcl.MergeClouds("merger")

plasm.connect(reader[:] >> viewer[:],
              reader[:] >> merger["input"],
              )

if __name__=="__main__":
    sched = ecto.schedulers.Threadpool(plasm)
    sched.execute(niter=1)
    #sleep 2 seconds and exit.
    time.sleep(2)

I am trying to use an EntangledPair to connect the output of a PclCellDualInputs to its input but the default construction of the input for the first iteration rises the same error. Would it be possible to make unused inputs default construct pointers to empty point clouds instead of invalid pointers?

ConvexHull results in segmentation fault

This is using the latest Groovy Debians and Ubuntu 12.04.

The following plasm reliably and quickly results in a segmentation fault when subscribing to /camera/depth_registered/points:

    voxel_grid = VoxelGrid("voxel_grid", leaf_size=0.01)
    cropper = Cropper("cropper", x_min=-0.25, x_max=0.25, y_min=-0.25, y_max=0.25, z_min=0.0, z_max=1.0)
    convex_hull = ConvexHull("convex_hull")

    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[:] >> msg2cloud[:],
                  msg2cloud[:] >> voxel_grid[:],
                  voxel_grid[:] >> cropper[:],
                  cropper[:] >> convex_hull[:],
                  convex_hull[:] >> cloud2msg[:],
                  cloud2msg[:] >> cloud_pub[:])

    run_plasm(options, plasm, locals=vars())

The error output is as follows:

[ INFO] [1373582674.537769083]: Initialized ROS. node_name: /ecto_pcl_demo_1373582674529461494
[ INFO] [1373582674.545638026]: publishing to topic:/ecto_pcl/sample_output
[ INFO] [1373582674.548342277]: Subscribed to topic:/camera/depth_registered/points with queue size of 2
qhull input error: input is less than 3-dimensional since it has the same x coordinate

While executing: | qhull
Options selected for Qhull 2009.1 2009/06/14:
_pre-merge _zero-centrum _max-width -1.8e+308 Error-roundoff 0
_one-merge 0 _near-inside 0 Visible-distance 0 U-coplanar-distance 0
Width-outside 0 _wide-facet 0
[pcl::ConvexHull::performReconstrution3D] ERROR: qhull was unable to compute a convex hull for the given point cloud (40542)!
Segmentation fault (core dumped)

Plasm segfaults when no points visible

The following script will reliably segfault when there is no object within the cropper frame of view. My environment: Ubuntu 12.04, ROS Groovy Debs.

#!/usr/bin/env python

"""
This sample shows how to interact with ROS cloud subscribers and publishers.
"""

import sys
import ecto, ecto_ros, ecto_pcl_ros, ecto_pcl
import ecto_ros.ecto_sensor_msgs as ecto_sensor_msgs
from ecto.opts import scheduler_options, run_plasm
from ecto_pcl import *
import argparse

class EctoPlasm():
    def __init__(self):
        ecto_ros.init(sys.argv,"ecto_pcl_demo")

        parser = argparse.ArgumentParser(description='Ecto PCL Cropper Demo')

        scheduler_options(parser)
        options = parser.parse_args()

        plasm = ecto.Plasm()

        voxel_grid = VoxelGrid("voxel_grid", leaf_size=0.015)
        cropper = Cropper("cropper", x_min=-0.25, x_max=0.25, y_min=-0.25, y_max=0.25, z_min=0.0, z_max=1.0)
        extract_clusters = EuclideanClusterExtraction("extract_clusters", min_cluster_size=50, cluster_tolerance=0.02)
        extract_largest_cluster = ExtractLargestCluster("extract_largest_cluster")
        nan_filter = PassThrough("nan_removal")
        colorize = ColorizeClusters("colorize", max_clusters=100)

        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/cloud_filtered')

        plasm.connect(cloud_sub[:] >> msg2cloud[:],
                      msg2cloud[:] >> nan_filter[:],
                      nan_filter[:] >> voxel_grid[:],
                      voxel_grid[:] >> cropper[:],
                      cropper[:] >> extract_clusters[:],
                      extract_clusters[:] >> colorize["clusters"],
                      cropper[:] >> colorize["input"],
                      colorize[:] >> cloud2msg[:],
                      cloud2msg[:] >> cloud_pub[:])

        run_plasm(options, plasm, locals=vars())

if __name__ == "__main__":
    try:
        ecto_plasm = EctoPlasm()
    except KeyboardInterrupt:
        print "Shutting down Ecto demo."

enum wrapping

enum parameters should be typed as enums, and the enums wrapped via boost::python. This makes documentation informative and gives future guis the ability to display a list of readable valid values.

ecto_pcl does not compile with pcl from ros-electric-perception-pcl 1.0.2-s1331974020~oneiric

Since commit 38a82fe compiling ecto_pcl rises the following error:

/home/stwirth/ecto_kitchen/ecto_pcl/src/surface/ConvexHull.cpp:59:9: error: 'class pcl::ConvexHull<pcl::PointXYZRGBNormal>' has no member named 'setDimension'

I suppose that pcl::ConvexHull::setDimension() is introduced in a later version of pcl.
Will you fix that or is the pcl version shipped with ros-electric no longer supported by ecto_pcl?

StatisticalOutlierRemoval results in segmentation fault

This occurs using the latest Groovy Debs under Ubuntu 12.04. The plasm subscribes to the /camera/depth_registered/points topic. When run, the plasm script crashes with:

Segmentation fault (core dumped)

voxel_grid = VoxelGrid("voxel_grid", leaf_size=0.01)
cropper = Cropper("cropper", x_min=-0.25, x_max=0.25, y_min=-0.25, y_max=0.25, z_min=0.0, z_max=1.0)
sor = StatisticalOutlierRemoval("sor", mean_k=1)

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[:] >> msg2cloud[:],
              msg2cloud[:] >> voxel_grid[:],
              voxel_grid[:] >> cropper[:],
              cropper[:] >> sor[:],
              sor[:] >> cloud2msg[:],
              cloud2msg[:] >> cloud_pub[:])

run_plasm(options, plasm, locals=vars())

changing filter params doesn't work

no facility to change params to filters when user changes param via e.g. ipython

you can workaround by checking previous value of spore and storing a copy

[pcl::RadiusOutlierRemoval::applyFilter] No radius defined!

This happens when using the latest Groovy Debs under Ubuntu 12.04.

The following plasm yields a stream of error messages of the form:

[pcl::RadiusOutlierRemoval::applyFilter] No radius defined!

The plasm looks like this:

    voxel_grid = VoxelGrid("voxel_grid", leaf_size=0.01)
    cropper = Cropper("cropper", x_min=-0.25, x_max=0.25, y_min=-0.25, y_max=0.25, z_min=0.0, z_max=1.0)
    ror = RadiusOutlierRemoval("ror", min_neighbors=1, search_radius=1.0)

    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[:] >> msg2cloud[:],
                  msg2cloud[:] >> voxel_grid[:],
                  voxel_grid[:] >> cropper[:],
                  cropper[:] >> ror[:],
                  ror[:] >> cloud2msg[:],
                  cloud2msg[:] >> cloud_pub[:])

    run_plasm(options, plasm, locals=vars())

Cluster plasm fails to run under PCL 1.6

The script included at the bottom of this message fails under ROS Groovy (Debian install) and Ubuntu 12.04 with the output:

[ INFO] [1375144922.276052236]: Initialized ROS. node_name: /ecto_pcl_demo_1375144922268921767
[ INFO] [1375144922.280641993]: publishing to topic:/ecto_pcl/cloud_filtered
[ INFO] [1375144922.282631558]: Subscribed to topic:/camera/depth_registered/points with queue size of 2
python: /tmp/buildd/ros-groovy-pcl-1.6.0-30precise-20130721-2228/kdtree/include/pcl/kdtree/impl/kdtree_flann.hpp:119: int pcl::KdTreeFLANN<PointT, Dist>::radiusSearch(const PointT&, double, std::vector&, std::vector&, unsigned int) const [with PointT = pcl::PointXYZRGB, Dist = flann::L2_Simple]: Assertion `point_representation_->isValid (point) && "Invalid (NaN, Inf) point coordinates given to radiusSearch!"' failed.
Aborted (core dumped)

Here is the script:

#!/usr/bin/env python

"""
This sample shows how to interact with ROS cloud subscribers and publishers.
"""

import sys
import ecto, ecto_ros, ecto_pcl_ros, ecto_pcl
import ecto_ros.ecto_sensor_msgs as ecto_sensor_msgs
from ecto.opts import scheduler_options, run_plasm
from ecto_pcl import *
import argparse

class EctoPlasm():
    def __init__(self):
        ecto_ros.init(sys.argv,"ecto_pcl_demo")

        parser = argparse.ArgumentParser(description='Ecto Euclidean Clustering')

        scheduler_options(parser)
        options = parser.parse_args()

        plasm = ecto.Plasm()

        voxel_grid = VoxelGrid("voxel_grid", leaf_size=0.015)
        cropper = Cropper("cropper", x_min=-0.25, x_max=0.25, y_min=-0.25, y_max=0.25, z_min=0.3, z_max=1.0)
        passthru_z = PassThrough("passthru_z", filter_field_name="z", filter_limit_min=0.3, filter_limit_max=1.0)
        passthru_x = PassThrough("passthru_x", filter_field_name="x", filter_limit_min=-0.25, filter_limit_max=0.25)
        passthru_y = PassThrough("passthru_y", filter_field_name="y", filter_limit_min=-0.25, filter_limit_max=0.25)
        extract_clusters = EuclideanClusterExtraction("extract_clusters", min_cluster_size=50, cluster_tolerance=0.02)
        nan_filter = PassThrough("nan_removal")
        colorize = ColorizeClusters("colorize", max_clusters=100)

        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/cloud_filtered')

        plasm.connect(cloud_sub[:] >>  msg2cloud[:],
                      msg2cloud[:] >> nan_filter[:],
                      nan_filter[:] >> voxel_grid[:],
                      voxel_grid[:] >> cropper[:],
                      cropper[:] >> extract_clusters[:],
                      extract_clusters[:] >> colorize["clusters"],
                      cropper[:] >> colorize["input"],
                      colorize[:] >> cloud2msg[:],
                      cloud2msg[:] >> cloud_pub[:])

        run_plasm(options, plasm, locals=vars())

if __name__ == "__main__":
    try:
        ecto_plasm = EctoPlasm()
    except KeyboardInterrupt:
        print "Shutting down Ecto demo."

openni w/o ros openni

I installed the standalone openni dev package and ran some kinect-standalone scripts, I got the standard "cannot enumerate devices" errors that apparently indicate something like "permission denied". I played with it and dorked with udev... nothing. Then I installed the ros-electric-openni-kinect package and suddenly things worked. Can we figure out what the likely problem was and document it or (ideally) check for it and give a reasonable message other than "can't enumerate"?

crash in table top segmentation

python: /usr/include/boost/thread/pthread/mutex.hpp:50: void boost::mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.
Aborted

This happens intermittently, especially when the camera is moving rapidly.

big files in samples.

Big binary blobs in samples. Suggest permanent removal and a script in cmake that pulls them down.

Use of pcl::PointCloud::makeShared()

In many cells (16 by now) of ecto_pcl as well as in the doc, the output cloud is constructed on the stack and then copied to the heap using cloud.makeShared() to be used for the cell's output.
The documentation of pcl::PointCloud discurages the use of makeShared, as every point has to be copied.
Is there a special reason for the use of makeShared() or would it be better to construct the output cloud directly on the heap?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.