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

pointcloud_to_laserscan returns inf in ROS indigo.

$
0
0
Hi, I am using ROS indigo under UBUNTU 14.04. I am also simulating a turtlebot equipped with kinect camera in v-rep and would like to run gmapping through ROS. Since gmapping requires laserscan data, and I can only publish pointcloud data to ROS from v-rep, I need to use pointcloud_to_laserscan package. However I haven't been successful so far, and this is what I've done so far: I can publish the simulated kinect data to ROS as sensor_msgs/PointCloud2 type on a topic called /cloud_in. This pointcloud data is being published with respect to frame_id of base_scan. I also publish some frames in my tf tree including world, base_link (the robot frame), and base_scan (the kinect frame) with the following hierarchy: world -> base_link -> base_scan Then, when I run my pointcloud_to_laserscan launch file, the laserscan data is supposed to be published on /scan topic. However, depending on what I set for the target_frame parameter in my launch file, I run into different issues. Here are the different cases: 1- If "target_frame" is not set in the launch file, then it will publish laserscan data on /scan topic with respect to the same frame_id of base_scan. If I echo the pointcloud data from /cloud_in topic, I see the frame_id to be /base_scan. If I also echo the /scan topic, its frame_id is also /base_scan. The problem in this setting is that /scan topic returns manly inf values, which is incorrect given my simulated environment. In addition, I do not get anything by running the following command: $ rosparam get /pointcloud_to_laserscan/target_frame From my understanding of similar posts on the web, this is apparently because of incorrect frame setting and transformation, so I did the following next. 2- If "target_frame" is set to base_link or world in the launch file, then nothing gets published on /scan topic. By running rqt_console, I see the following error: Transform failure: Invalid argument "/base_scan" passed to lookupTransform argument source_frame in tf2 frame_ids cannot start with a '/' like: Location:~/v-rep_ws/src/pointcloud_to_laserscan/src/pointcloud_to_laserscan_ nodelet.cpp:PointCloudToLaserScanNodelet::cloudCb:185 In this case the following command returns base_link or world depending on the launch file parameter. $ rosparam get /pointcloud_to_laserscan/target_frame 3- If "target_frame" is set to /base_link or /world in the launch file, then nothing gets published on /scan topic again. By running rqt_console, I see the following error: Transform failure: Invalid argument "/base_link" passed to lookupTransform argument target_frame in tf2 frame_ids cannot start with a '/' like: Location:~/v-rep_ws/src/pointcloud_to_laserscan/src/pointcloud_to_laserscan_ nodelet.cpp:PointCloudToLaserScanNodelet::cloudCb:185 In this case the following command returns /base_link or /world depending on the launch file parameter. $ rosparam get /pointcloud_to_laserscan/target_frame I would really appreciate any hint or help on these issues.

Viewing all articles
Browse latest Browse all 171

Trending Articles



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