-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Efficiency improvements and customizable occupancy 2D map projection. #9
base: master
Are you sure you want to change the base?
Conversation
+ Efficiency improvements: | avoid transforming clouds already in map frame (added additional parameter to specify sensor frame_id for calculating sensor pose) | create occupancy cloud directly as ros message instead of pcl cloud (avoids conversion) + Projection of nav_msgs::OccupancyGrid with customizable height and initialization as free or unknown. + Increased tf listener buffer to 30 sec.
Thanks for your contribution! Is this meant for hydro or indigo? Best send the pull request against the right ...-devel branch then in the future (master tracks the latest stable releases). More comments in the code. |
size_t numberReservedPoints = m_octree->size(); | ||
float* pointcloudDataPosition = NULL; | ||
if (publishPointCloud) { | ||
cloud->header.seq = m_numberCloudsPublished++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line (and the variable m_numberCloudsPublished
) is not needed, the publisher should automatically increase .seq
in the header.
of sensor frame id. - Line 310 of OctomapServer.cpp was doing an unnecessary internal copy (pc_nonground = pc), that can be avoided by using shared pointers. - Improved assembly of pointcloud from octree by using vector reserve instead of resize. - Improved parametrization of sensor frame id. This way the input cloud can be sent in any frame id (map, sensor, other), and the parameter sensor_frame_id can be used to specify which is the sensor frame to compute the origin for the raytracing algorithms (used to integrate the pointcloud into the octree).
Latest commit addressed the suggestions made during the pull request discussion. P.S. |
and regulate how often the 2D projection map is published.
Can I ask why this PR hasn't been merged? |
To be true, I haven't had a chance to test it thoroughly since the changes are rather fundamental with potential to change / break existing behavior. There are also multiple features & improvements mixed in one PR, which makes it hard to track the individual influence (as opposed to quickly merging a more atomic PR). |
I see and I completely understand :) I was just curious, as efficiency improvements are always wanted. |
|- avoid transforming clouds already in map frame (added additional
parameter to specify sensor frame_id for calculating sensor pose)
|- create occupancy cloud directly as ros message instead of pcl cloud
(avoids conversion)
initialization as free or unknown.