0
$\begingroup$

Rosanswers logo

Following, Felix's answer for this question(http://answers.ros.org/question/12995/2d-map-from-octomap/), I tried to generate a 2d map from octomap for localization.

As explained in that answer, I wrote a node to listen the output of the node 'rgbdslam'. This node uses the passthrough filter from pcl library to take a slice of the 3d point cloud. I used the same parameters in the launch file octomap_server.launch from rgbdslam package. I can view the required point clouds in pcd viewer, i.e) thin slice of the 3d octomap. While, I try to save it as a map using nodes octomap_server and saver, it shows only single point as a map.

While trying to find the problem, I note that the point cloud which is send as input to the octomap_server is an unorganized point cloud. I think this might be a problem.

If so, Is there any idea to convert unorganized point cloud to orgainized point cloud or any other solution for this problem?

Thanks in advance for your suggesstions.


UPDATED: While, running the normal rgbdslam algorithm as described in (http://www.ros.org/wiki/rgbdslam). After doing $roslaunch rgbdslam octomap_server.launch, I opened rviz and viewed the topic '/octomap_point_cloud_centers'. In rviz, I could view the complete point cloud whatever I see in the rgbdslam GUI. But, While try to view those point clouds after the 'new_node' (node which I wrote), I could able to view only the initial sliced part of the point cloud. I think this is due to the high frequency publishing of a topic 'rgbdslam/batch_clouds'.

Any solutions for this problem?


Originally posted by Sudhan on ROS Answers with karma: 171 on 2012-10-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi Sudhan,

Edit: I found a bug, where the tf frames of the old openni_camera driver are hardcoded. Because of this, octomap_server will not find a transformation between /map and the point cloud frame when using openni_launch. I'll try to release a fix soon.

in general, rgbdslam does not alter the received point cloud. Therefore they are sent out as structured (check width and height values are both > 1). Maybe you are wondering about the "is_dense" property, which is defined as "does not contain NaN values" and is set by the openni driver. Anyway structured or not, dense or not, this should not be the problem.


Originally posted by Felix Endres with karma: 6468 on 2012-10-23

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Sudhan on 2012-10-24:
I use '/tf' from 'rgbdslam' and 'sliced_batch_clouds' from the 'new_node' as input for 'octomap_server' node using 'octomap_server.launch'. The property of 'sliced_batch_cloud'

  1. height is 1

  2. is_dense is true

If I do $ rostopic echo sliced_batch_clouds, I can see some numbers. (contd..)

Comment by Sudhan on 2012-10-24:
..(contd..).. I tried writing the point cloud as '.pcd' file before publishing it to a rostopic. There I see a sliced piece of point cloud.

Note: The 'new_node' just subscribes and edit the topic 'rgbdslam/batch_clous' and publishes 'sliced_batch_clouds' using passthrough filter.

Comment by Felix Endres on 2012-10-24:
Well, in that case it is the passthrough filter that destroys the structuredness. And hence there is no point in keeping the NaN values anymore, so it probably makes it dense as well.

Comment by Sudhan on 2012-10-24:
If I view the topics '/map' and '/octomap_point_cloud_centers' from 'octomap_server' using 'rviz', I could see the required map and point clouds repsectively. I think so, this might be helpful for you in fixing bugs.

Comment by Felix Endres on 2012-10-25:
Could you update and let me know whether it works?

Comment by Sudhan on 2012-10-25:
I didn't understand that what should I update?

Comment by Felix Endres on 2012-10-25:
Your copy of rgbdslam with "svn up"

Comment by Sudhan on 2012-10-29:
I would like to know, where you publish the topic "rgbdslam/batch_clouds"? I can find something about it in file "parameter_server.cpp". But I would like to change the queue size of publishing data, there is no option for that in this file. So, where to change the queue size of the publishing data?

Comment by Felix Endres on 2012-10-29:
Queue size is set in the constructor in graph_manager.cpp but there is also the parameter "publisher_queue_size" that will be used for all publishers. The actual publication is done in node.cpp Node:publish(...).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.