circle segmentation seg faulting

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

circle segmentation seg faulting

Dejan Pangercic
Hi there,

I have written a following program that shall detect circles in 3D point clouds:
http://code.in.tum.de/indefero/index.php//p/mapping/source/tree/master/pcl_cloud_tools/src/detect_circle.cpp

Upon running it I get a very weird error:
detect_circle_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:418:
T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const
[with T = pcl::SampleConsensusModel<pcl::PointXYZ>]: Assertion `px !=
0' failed.

Here I have a full backtrace:
http://pastie.org/1529444

The cloud I am using is available here:
http://ias.cs.tum.edu/~pangerci/plate.pcd.

Would anyone see anything really obvious that I am doing wrong?
@Radu: Which model is actually suitable here SACMODEL_CIRCLE2D or
SACMODEL_CIRCLE3D?

thx and best, D.
--
MSc. Dejan Pangercic
PhD Student/Researcher
Intelligent Autonomous Systems Group
Technische Universität München
Telephone: +49 (89) 289-26908
E-Mail: [hidden email]
WWW: http://ias.cs.tum.edu/people/pangercic
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: circle segmentation seg faulting

Radu B. Rusu
Administrator
Dejan,

A few notes:

  * you can subscribe directly to pcl::PointCloud<T> using the standard ROS subscribers. Just make sure you include
pcl_ros/point_cloud.h into your code.

  * the error in your code happens because you're trying to use a pcl::SACSegmentationFromNormals with a model that
doesn't use normals. This can be fixed by changing from pcl::SACSegmentationFromNormals to pcl::SACSegmentation. If you
ticket me, I'll try to fix this in time for 0.9... meaning that I'll improve the error message.

Cheers,
Radu.
--
http://pointclouds.org

On 02/04/2011 01:01 PM, Dejan Pangercic wrote:

> Hi there,
>
> I have written a following program that shall detect circles in 3D point clouds:
> http://code.in.tum.de/indefero/index.php//p/mapping/source/tree/master/pcl_cloud_tools/src/detect_circle.cpp
>
> Upon running it I get a very weird error:
> detect_circle_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:418:
> T* boost::shared_ptr<  <template-parameter-1-1>  >::operator->() const
> [with T = pcl::SampleConsensusModel<pcl::PointXYZ>]: Assertion `px !=
> 0' failed.
>
> Here I have a full backtrace:
> http://pastie.org/1529444
>
> The cloud I am using is available here:
> http://ias.cs.tum.edu/~pangerci/plate.pcd.
>
> Would anyone see anything really obvious that I am doing wrong?
> @Radu: Which model is actually suitable here SACMODEL_CIRCLE2D or
> SACMODEL_CIRCLE3D?
>
> thx and best, D.
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: circle segmentation seg faulting

Radu B. Rusu
Administrator
Actually, the fix was trivial, so I already pushed it in trunk (35792).

Cheers,
Radu.
--
http://pointclouds.org

On 02/05/2011 01:42 PM, Radu Bogdan Rusu wrote:

> Dejan,
>
> A few notes:
>
> * you can subscribe directly to pcl::PointCloud<T> using the standard ROS subscribers. Just make sure you include
> pcl_ros/point_cloud.h into your code.
>
> * the error in your code happens because you're trying to use a pcl::SACSegmentationFromNormals with a model that
> doesn't use normals. This can be fixed by changing from pcl::SACSegmentationFromNormals to pcl::SACSegmentation. If you
> ticket me, I'll try to fix this in time for 0.9... meaning that I'll improve the error message.
>
> Cheers,
> Radu.
> --
> http://pointclouds.org
>
> On 02/04/2011 01:01 PM, Dejan Pangercic wrote:
>> Hi there,
>>
>> I have written a following program that shall detect circles in 3D point clouds:
>> http://code.in.tum.de/indefero/index.php//p/mapping/source/tree/master/pcl_cloud_tools/src/detect_circle.cpp
>>
>> Upon running it I get a very weird error:
>> detect_circle_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:418:
>> T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const
>> [with T = pcl::SampleConsensusModel<pcl::PointXYZ>]: Assertion `px !=
>> 0' failed.
>>
>> Here I have a full backtrace:
>> http://pastie.org/1529444
>>
>> The cloud I am using is available here:
>> http://ias.cs.tum.edu/~pangerci/plate.pcd.
>>
>> Would anyone see anything really obvious that I am doing wrong?
>> @Radu: Which model is actually suitable here SACMODEL_CIRCLE2D or
>> SACMODEL_CIRCLE3D?
>>
>> thx and best, D.
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: circle segmentation seg faulting

Dejan Pangercic
ok, I was about to press "Create Ticket" button, thx.
D.

On Sat, Feb 5, 2011 at 10:52 PM, Radu Bogdan Rusu <[hidden email]> wrote:

> Actually, the fix was trivial, so I already pushed it in trunk (35792).
>
> Cheers,
> Radu.
> --
> http://pointclouds.org
>
> On 02/05/2011 01:42 PM, Radu Bogdan Rusu wrote:
>> Dejan,
>>
>> A few notes:
>>
>> * you can subscribe directly to pcl::PointCloud<T> using the standard ROS subscribers. Just make sure you include
>> pcl_ros/point_cloud.h into your code.
>>
>> * the error in your code happens because you're trying to use a pcl::SACSegmentationFromNormals with a model that
>> doesn't use normals. This can be fixed by changing from pcl::SACSegmentationFromNormals to pcl::SACSegmentation. If you
>> ticket me, I'll try to fix this in time for 0.9... meaning that I'll improve the error message.
>>
>> Cheers,
>> Radu.
>> --
>> http://pointclouds.org
>>
>> On 02/04/2011 01:01 PM, Dejan Pangercic wrote:
>>> Hi there,
>>>
>>> I have written a following program that shall detect circles in 3D point clouds:
>>> http://code.in.tum.de/indefero/index.php//p/mapping/source/tree/master/pcl_cloud_tools/src/detect_circle.cpp
>>>
>>> Upon running it I get a very weird error:
>>> detect_circle_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:418:
>>> T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const
>>> [with T = pcl::SampleConsensusModel<pcl::PointXYZ>]: Assertion `px !=
>>> 0' failed.
>>>
>>> Here I have a full backtrace:
>>> http://pastie.org/1529444
>>>
>>> The cloud I am using is available here:
>>> http://ias.cs.tum.edu/~pangerci/plate.pcd.
>>>
>>> Would anyone see anything really obvious that I am doing wrong?
>>> @Radu: Which model is actually suitable here SACMODEL_CIRCLE2D or
>>> SACMODEL_CIRCLE3D?
>>>
>>> thx and best, D.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users
>



--
MSc. Dejan Pangercic
PhD Student/Researcher
Intelligent Autonomous Systems Group
Technische Universität München
Telephone: +49 (89) 289-26908
E-Mail: [hidden email]
WWW: http://ias.cs.tum.edu/people/pangercic
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: circle segmentation seg faulting

Dejan Pangercic
In reply to this post by Radu B. Rusu
Hi Radu,
>  * the error in your code happens because you're trying to use a
> pcl::SACSegmentationFromNormals with a model that doesn't use normals. This
> can be fixed by changing from pcl::SACSegmentationFromNormals to
> pcl::SACSegmentation. If you ticket me, I'll try to fix this in time for
> 0.9... meaning that I'll improve the error message.
This worked, though, I also found out that the implementation for
SACMODEL_CIRCLE3D is not there yet.
Then I tried with the SACMODEL_CIRCLE2D but I got a rather unusual result:
http://ias.cs.tum.edu/~pangerci/circle.png
http://ias.cs.tum.edu/~pangerci/circle1.png
Is my understanding of the code correct in that only x and y
coordinates of the points are being accounted for during model
computation (Note that the cloud was captured in openni_depth frame
and NOT axis aligned)?

Furthermore there seems to be also a problem with the model
validation, I namely set radius_[min|max] to be between 0.0 and 0.1
but get the following circle coefficients back:
  values[0]: -0.007339
  values[1]: 0.0820497
  values[2]: 0.530745
According to my understanding values[2] shall not pass lines 400-403
in pcl/include/pcl/sample_consensus/impl/sac_model_circle.hpp, right?

best, D.

>
> Cheers,
> Radu.
> --
> http://pointclouds.org
>
> On 02/04/2011 01:01 PM, Dejan Pangercic wrote:
>>
>> Hi there,
>>
>> I have written a following program that shall detect circles in 3D point
>> clouds:
>>
>> http://code.in.tum.de/indefero/index.php//p/mapping/source/tree/master/pcl_cloud_tools/src/detect_circle.cpp
>>
>> Upon running it I get a very weird error:
>> detect_circle_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:418:
>> T* boost::shared_ptr<  <template-parameter-1-1>  >::operator->() const
>> [with T = pcl::SampleConsensusModel<pcl::PointXYZ>]: Assertion `px !=
>> 0' failed.
>>
>> Here I have a full backtrace:
>> http://pastie.org/1529444
>>
>> The cloud I am using is available here:
>> http://ias.cs.tum.edu/~pangerci/plate.pcd.
>>
>> Would anyone see anything really obvious that I am doing wrong?
>> @Radu: Which model is actually suitable here SACMODEL_CIRCLE2D or
>> SACMODEL_CIRCLE3D?
>>
>> thx and best, D.
>



--
MSc. Dejan Pangercic
PhD Student/Researcher
Intelligent Autonomous Systems Group
Technische Universität München
Telephone: +49 (89) 289-26908
E-Mail: [hidden email]
WWW: http://ias.cs.tum.edu/people/pangercic
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: circle segmentation seg faulting

Radu B. Rusu
Administrator
Fixed in trunk (r35793).

Cheers,
Radu.
--
http://pointclouds.org

On 02/05/2011 03:44 PM, Dejan Pangercic wrote:

> Hi Radu,
>>   * the error in your code happens because you're trying to use a
>> pcl::SACSegmentationFromNormals with a model that doesn't use normals. This
>> can be fixed by changing from pcl::SACSegmentationFromNormals to
>> pcl::SACSegmentation. If you ticket me, I'll try to fix this in time for
>> 0.9... meaning that I'll improve the error message.
> This worked, though, I also found out that the implementation for
> SACMODEL_CIRCLE3D is not there yet.
> Then I tried with the SACMODEL_CIRCLE2D but I got a rather unusual result:
> http://ias.cs.tum.edu/~pangerci/circle.png
> http://ias.cs.tum.edu/~pangerci/circle1.png
> Is my understanding of the code correct in that only x and y
> coordinates of the points are being accounted for during model
> computation (Note that the cloud was captured in openni_depth frame
> and NOT axis aligned)?
>
> Furthermore there seems to be also a problem with the model
> validation, I namely set radius_[min|max] to be between 0.0 and 0.1
> but get the following circle coefficients back:
>    values[0]: -0.007339
>    values[1]: 0.0820497
>    values[2]: 0.530745
> According to my understanding values[2] shall not pass lines 400-403
> in pcl/include/pcl/sample_consensus/impl/sac_model_circle.hpp, right?
>
> best, D.
>
>>
>> Cheers,
>> Radu.
>> --
>> http://pointclouds.org
>>
>> On 02/04/2011 01:01 PM, Dejan Pangercic wrote:
>>>
>>> Hi there,
>>>
>>> I have written a following program that shall detect circles in 3D point
>>> clouds:
>>>
>>> http://code.in.tum.de/indefero/index.php//p/mapping/source/tree/master/pcl_cloud_tools/src/detect_circle.cpp
>>>
>>> Upon running it I get a very weird error:
>>> detect_circle_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:418:
>>> T* boost::shared_ptr<    <template-parameter-1-1>    >::operator->() const
>>> [with T = pcl::SampleConsensusModel<pcl::PointXYZ>]: Assertion `px !=
>>> 0' failed.
>>>
>>> Here I have a full backtrace:
>>> http://pastie.org/1529444
>>>
>>> The cloud I am using is available here:
>>> http://ias.cs.tum.edu/~pangerci/plate.pcd.
>>>
>>> Would anyone see anything really obvious that I am doing wrong?
>>> @Radu: Which model is actually suitable here SACMODEL_CIRCLE2D or
>>> SACMODEL_CIRCLE3D?
>>>
>>> thx and best, D.
>>
>
>
>
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users