PCL people detector problem [closed]

asked 2013-04-26 05:07:54 -0500

CarolineQ gravatar image

Hi,

I am trying to use the people detector of this link with ROS : http://pointclouds.org/documentation/tutorials/ground_based_rgbd_people_detection.php#ground-based-rgbd-people-detection

I managed to use it, but I still have a problem. I would like to use QQVGA for the Kinect resolution, as they did in the paper at the beginning of the tutorial. But when I switch the resolution of the Kinect to QQVGA mode I get a Segmentation Fault at the line :

pcl::people::GroundBasedPeopleDetectionApp<PointT> people_detector; 
people_detector.compute(clusters);   // perform people detection

Whereas when I use the VGA mode I don't get this error. Does anyone know why I get this error ?

Thanks, Caroline

edit retag flag offensive reopen merge delete

Closed for the following reason PCL Question: The PCL community prefers to answer questions at http://www.pcl-users.org/ by tfoote
close date 2014-11-23 03:26:13.500390

Comments

@CarolineQ Im using the same program and im trying to send the information of the distance of the person detected to another node but im unable to do it. Do you have any idea how to put a publisher in the code and make it work? I would really appreciate some help, thanks

ctguell gravatar image ctguell  ( 2013-10-04 07:12:16 -0500 )edit

You need a loop in your node and a spinOnce in this loop. I added a publisher in the same way that in other nodes. I publish the information about the user just after this for loop : for(std::vector<pcl::people::personcluster<pointt> >::iterator it = clusters.begin(); it != clusters.end(); ++it)

CarolineQ gravatar image CarolineQ  ( 2013-10-06 21:25:41 -0500 )edit

@CarolineQ thanks a lot, could you please post the part of the code where you created the publisher, that im having trouble making it work. Also to compile this detector it takes very long so every time y try to change something and test it, it takes a long time is this normal?? one again thanks

ctguell gravatar image ctguell  ( 2013-10-07 09:06:07 -0500 )edit

I create the publisher as any other publishers : ros::Publisher _userInfoPub = _node.advertise<msgtype>( "/path_to_topic", 1); What are your problems exactly ? Concerning the time to compile it I don't have problems, it depends also of your computer...

CarolineQ gravatar image CarolineQ  ( 2013-10-07 21:24:38 -0500 )edit

@CarolineQ i have two problems fist one is that i cant make it work with the link you gave, because when i run cmake it does not creat the exe do you know why? So i downloades from ros in a package called fuerte-unstable-devel. In the code main_ground_based_people_detection.cpp after the loop you said ros::init(argc, argv, "detectCG"); ros::NodeHandle n; ros::Publisher cg_pub = n.advertise<std_msgs::string>("my_string", 1000); std_msgs::StringPtr str(new std_msgs::String); str->data = "hello world"; cg_pub.publish(str); ros::Rate loop_rate(10); but it does not work do you see a problem?? also i did not understand the loop you said i needed how is it done? once again i really appreciate your help

ctguell gravatar image ctguell  ( 2013-10-08 05:22:46 -0500 )edit

When I spoke about a loop it was sth like : while (ros::ok()). Have you ever try writing simple publishers in ROS before doing this ? http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29 I have no idea which version you are using. For my part, I took the code from the link and did some modifications to adapt it to ROS and to my project.

CarolineQ gravatar image CarolineQ  ( 2013-10-08 21:33:55 -0500 )edit

@CarolineQ thanks, i have done some subscribers and publishers and they have worked fine. The thing is that ive been unable to make the code create me the exe file. When i do cmake on the file it does not give an exe. do you now why this might happen? As a backup i installed the pcl17 and pcl17_ros wich also included the same code and this did bring the exe but im unable to modify the code to add the publisher. Did you need this packages to make your program work?? Last when i do the cmake i get this weird looking thing

ctguell gravatar image ctguell  ( 2013-10-10 04:07:56 -0500 )edit

-- looking for PCL_TRACKING -- Found PCL: /usr/lib/libboost_system-mt.so;/usr/lib/libboost_filesystem-mt.so;/usr/lib/libboost_thread-mt.so;/usr/lib/libboost_date_time-mt.so;/usr/lib/libboost_iostreams-mt.so;/usr/lib/libboost_mpi-mt.so;/usr/lib/libboost_serialization-mt.so;optimized;/usr/local/lib/libpcl_common.so;debug;/usr/local/lib/libpcl_common.so;optimized;/opt/ros/fuerte/lib/libflann_cpp_s.a;debug;/opt/ros/fuerte/lib/libflann_cpp_s-gd.a;optimized;/usr/local/lib/libpcl_kdtree.so;debug;/usr/local/lib/libpcl_kdtree.so;optimized;/usr/local/lib/libpcl_octree.so;debug;/usr/local/lib/libpcl_octree.so;optimized;/usr/local/lib/libpcl_search.so;debug;/usr/local/lib/libpcl_search.so;optimized;/usr/local/lib/libpcl_sample_consensus.so;debug;/usr/local/lib/libpcl_sample_consensus.so;optimized;/usr/local/lib/libpcl_filters.so;debug;/usr/local ----Also when i try to compile it with pcl17 i get "undefined reference to `ros::init"

ctguell gravatar image ctguell  ( 2013-10-10 04:09:33 -0500 )edit