Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 171

laser_assembler not giving output

$
0
0
Hi! I am trying to assemble point clouds (PointCloud2) received from a Kinect sensor mounted on a mobile robot, both of which are being simulated in Gazebo. I have been following these [steps](http://wiki.ros.org/laser_assembler). The tf tree is being set up fine. The laser assembler service node (name=Kinect_point_cloud_assembler) is set up and running. I have the following ros graph: ![image description](/upfiles/15524860485961519.png) I have the following tf tree: ![image description](/upfiles/15524863383032345.png) The client node I am using is as follows: #include #include #include #include #include using namespace laser_assembler; int main(int argc, char *argv[]) { ros::init(argc,argv,"point_cloud_assembler"); ros::NodeHandle nh; ros::service::waitForService("assemble_scans2"); ros::ServiceClient client = nh.serviceClient("assemble_scans2"); AssembleScans2 srv; srv.request.begin = ros::Time(0,0); srv.request.end = ros::Time::now(); if(client.call(srv)){ // printf("Got cloud with %u points\n", srv.response.cloud.points.size()); pcl::PointCloud::Ptr cloud_assembled(new pcl::PointCloud()); pcl::fromROSMsg(srv.response.cloud,*cloud_assembled); ROS_INFO("Number of Cloud Points =%d \n",cloud_assembled->width); } else{ printf("Service call failed\n"); } return 0; } When I run the client node for requesting the assembled point cloud I get the following output: [INFO] [1552485878.037815075]: Number of Cloud Points =0 I do not understand what I am doing wrong. Everything seems fine and there are no warnings nor error messages. Please help. This is the launch file I am using to launch point_cloud2_assembler:

Viewing all articles
Browse latest Browse all 171

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>