Re: [Ros-kinect] openni_camera crashes

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

Re: [Ros-kinect] openni_camera crashes

Radu B. Rusu
Administrator

On 01/17/2011 03:19 AM, Javier Correa Villanueva wrote:
> I finally manage to test it on the 32bit notebook and the kinect node and nodelet worked.
>
> PD: In my own code I had to change the boost:make_shared<...>(...) for cloud.makeShared()

Makes sense. Can you please add a note to the PCL and maybe the Eigen wiki about this? make_shared doesn't provide an
aligned allocator, so it's better to use the eigen macro EIGEN_MAKE_ALIGNED_OPERATOR_NEW and either cloud.makeShared ()
for pcl::PointCloud<T> or Object::Ptr foo (new Object ()); for general purpose objects that contain Eigen types.

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

>
> On Mon, Jan 17, 2011 at 4:41 AM, Radu Bogdan Rusu <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Michael,
>
>     On 01/16/2011 08:38 PM, Michael Ferguson wrote:
>      > Radu,
>      >
>      > The first update today (adding the eigen new macro) allowed it to run a bit longer than ever before, but it
>     eventually
>      > crashed with the same eigen issue. However, your latest update (getting rid of make_shared) appears to have fixed it
>      > completely.
>      >
>      > I don't want to jinx it -- but openni_camera has now been running for 10 minutes on my 32-bit system without the
>     eigen
>      > issue (previously, I never got more than 4-5 frames, and often only 1).
>
>     Glad it works!
>
>     Yeah, make_shared is evil, as it doesn't allow the use of a custom new allocator.
>
>     Our apologies for taking so long to fix this -- it's really hard to debug on 64bit systems. I couldn't replicate it in
>     neither -m32 mode or running in a 32bit 10.04 chroot. Luckily a colleague found a 32bit laptop so we were able to
>     test it.
>
>      > Thank you!
>
>     Anytime ;)
>
>     Cheers,
>     Radu.
>     _______________________________________________
>     Ros-kinect mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://code.ros.org/mailman/listinfo/ros-kinect
>
>
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] openni_camera crashes

Radu B. Rusu
Administrator
Michael,

It shouldn't. In trunk it looks like:

188       //inline Ptr makeShared () const { return (boost::make_shared<PointCloud<PointT> >) (*this); }
189       inline Ptr makeShared () const { return Ptr (new PointCloud<PointT> (*this)); }


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

On 01/17/2011 03:40 PM, Michael Ferguson wrote:

> Is there any downside/performance-hit to using the cloud.makeShared() form all the time? For instance, I've been walking
> through some of the pcl_tutorials code, and it makes signifigant use of boost::make_shared<..>, causing it to fail on my
> 32-bit system.
>
> -Fergs
>
> On Mon, Jan 17, 2011 at 12:06 PM, Radu Bogdan Rusu <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>     On 01/17/2011 03:19 AM, Javier Correa Villanueva wrote:
>      > I finally manage to test it on the 32bit notebook and the kinect node and nodelet worked.
>      >
>      > PD: In my own code I had to change the boost:make_shared<...>(...) for cloud.makeShared()
>
>     Makes sense. Can you please add a note to the PCL and maybe the Eigen wiki about this? make_shared doesn't provide an
>     aligned allocator, so it's better to use the eigen macro EIGEN_MAKE_ALIGNED_OPERATOR_NEW and either cloud.makeShared ()
>     for pcl::PointCloud<T> or Object::Ptr foo (new Object ()); for general purpose objects that contain Eigen types.
>
>     Cheers,
>     Radu.
>     --
>     http://pointclouds.org
>
>      >
>      > On Mon, Jan 17, 2011 at 4:41 AM, Radu Bogdan Rusu <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>      >
>      >     Michael,
>      >
>      >     On 01/16/2011 08:38 PM, Michael Ferguson wrote:
>      > > Radu,
>      > >
>      > > The first update today (adding the eigen new macro) allowed it to run a bit longer than ever before, but it
>      >     eventually
>      > > crashed with the same eigen issue. However, your latest update (getting rid of make_shared) appears to have
>     fixed it
>      > > completely.
>      > >
>      > > I don't want to jinx it -- but openni_camera has now been running for 10 minutes on my 32-bit system without the
>      >     eigen
>      > > issue (previously, I never got more than 4-5 frames, and often only 1).
>      >
>      >     Glad it works!
>      >
>      >     Yeah, make_shared is evil, as it doesn't allow the use of a custom new allocator.
>      >
>      >     Our apologies for taking so long to fix this -- it's really hard to debug on 64bit systems. I couldn't
>     replicate it in
>      >     neither -m32 mode or running in a 32bit 10.04 chroot. Luckily a colleague found a 32bit laptop so we were able to
>      >     test it.
>      >
>      > > Thank you!
>      >
>      >     Anytime ;)
>      >
>      >     Cheers,
>      >     Radu.
>      >     _______________________________________________
>      >     Ros-kinect mailing list
>      > [hidden email] <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>
>      > https://code.ros.org/mailman/listinfo/ros-kinect
>      >
>      >
>     _______________________________________________
>     Ros-kinect mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://code.ros.org/mailman/listinfo/ros-kinect
>
>
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] openni_camera crashes

Michael Ferguson
No, I wasn't saying that cloud.makeShared was causing trouble -- I was more asking about code that uses make_shared instead of cloud.makeShared -- for instance, things like line 66 of pcl_tutorials/src/filter_
statistical_outlier_removal.cpp:

64:   // Create the filtering object
65:   pcl::StatisticalOutlierRemoval<pcl::PointXYZ> sor;
66:   sor.setInputCloud (boost::make_shared<pcl::PointCloud<pcl::PointXYZ> >(cloud));

And I'm wondering what, if any, downside there is in this being changed to:

66:   sor.setInputCloud (cloud.makeShared());

-Fergs

On Mon, Jan 17, 2011 at 7:21 PM, Radu Bogdan Rusu <[hidden email]> wrote:
Michael,

It shouldn't. In trunk it looks like:

188       //inline Ptr makeShared () const { return (boost::make_shared<PointCloud<PointT> >) (*this); }
189       inline Ptr makeShared () const { return Ptr (new PointCloud<PointT> (*this)); }



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

On 01/17/2011 03:40 PM, Michael Ferguson wrote:
Is there any downside/performance-hit to using the cloud.makeShared() form all the time? For instance, I've been walking
through some of the pcl_tutorials code, and it makes signifigant use of boost::make_shared<..>, causing it to fail on my
32-bit system.

-Fergs

On Mon, Jan 17, 2011 at 12:06 PM, Radu Bogdan Rusu <[hidden email] <mailto:[hidden email]>> wrote:


   On 01/17/2011 03:19 AM, Javier Correa Villanueva wrote:
    > I finally manage to test it on the 32bit notebook and the kinect node and nodelet worked.
    >
    > PD: In my own code I had to change the boost:make_shared<...>(...) for cloud.makeShared()

   Makes sense. Can you please add a note to the PCL and maybe the Eigen wiki about this? make_shared doesn't provide an
   aligned allocator, so it's better to use the eigen macro EIGEN_MAKE_ALIGNED_OPERATOR_NEW and either cloud.makeShared ()
   for pcl::PointCloud<T> or Object::Ptr foo (new Object ()); for general purpose objects that contain Eigen types.

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

    >
    > On Mon, Jan 17, 2011 at 4:41 AM, Radu Bogdan Rusu <[hidden email] <mailto:[hidden email]>
   <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
    >
    >     Michael,
    >
    >     On 01/16/2011 08:38 PM, Michael Ferguson wrote:
    > > Radu,
    > >
    > > The first update today (adding the eigen new macro) allowed it to run a bit longer than ever before, but it
    >     eventually
    > > crashed with the same eigen issue. However, your latest update (getting rid of make_shared) appears to have
   fixed it
    > > completely.
    > >
    > > I don't want to jinx it -- but openni_camera has now been running for 10 minutes on my 32-bit system without the
    >     eigen
    > > issue (previously, I never got more than 4-5 frames, and often only 1).
    >
    >     Glad it works!
    >
    >     Yeah, make_shared is evil, as it doesn't allow the use of a custom new allocator.
    >
    >     Our apologies for taking so long to fix this -- it's really hard to debug on 64bit systems. I couldn't
   replicate it in
    >     neither -m32 mode or running in a 32bit 10.04 chroot. Luckily a colleague found a 32bit laptop so we were able to
    >     test it.
    >
    > > Thank you!
    >
    >     Anytime ;)
    >
    >     Cheers,
    >     Radu.
    >     _______________________________________________
    >     Ros-kinect mailing list
    > [hidden email] <mailto:[hidden email]> <mailto:[hidden email]

   <mailto:[hidden email]>>
    > https://code.ros.org/mailman/listinfo/ros-kinect
    >
    >
   _______________________________________________
   Ros-kinect mailing list
   [hidden email] <mailto:[hidden email]>
   https://code.ros.org/mailman/listinfo/ros-kinect




_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: [Ros-kinect] openni_camera crashes

Radu B. Rusu
Administrator


On 01/17/2011 04:39 PM, Michael Ferguson wrote:

> No, I wasn't saying that cloud.makeShared was causing trouble -- I was more asking about code that uses make_shared
> instead of cloud.makeShared -- for instance, things like line 66 of pcl_tutorials/src/filter_
> statistical_outlier_removal.cpp:
>
> 64:   // Create the filtering object
> 65:   pcl::StatisticalOutlierRemoval<pcl::PointXYZ> sor;
> 66:   sor.setInputCloud (boost::make_shared<pcl::PointCloud<pcl::PointXYZ> >(cloud));
>
> And I'm wondering what, if any, downside there is in this being changed to:
>
> 66:   sor.setInputCloud (cloud.makeShared());

Oh yeah. That's an oversight. We should fix this asap. :)

Commit rights? Do you have a username on code.ros.org?

Cheers,
Radu.
--
http://pointclouds.org
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users