Skip to content
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

Avoid push_back within getAttachedBodyObjects #2732

Merged
merged 1 commit into from Jun 22, 2021

Conversation

AndyZe
Copy link
Contributor

@AndyZe AndyZe commented Jun 22, 2021

This is a pretty small optimization but I don't like to see push_back() called within a function that should be performant. This should be faster if there are multiple attached collision bodies.

@AndyZe AndyZe force-pushed the andyz/small_collision_optimization branch 2 times, most recently from 9c185a2 to f3c677f Compare June 22, 2021 19:02
@AndyZe AndyZe force-pushed the andyz/small_collision_optimization branch from f3c677f to 8f33cac Compare June 22, 2021 19:32
@codecov
Copy link

codecov bot commented Jun 22, 2021

Codecov Report

Merging #2732 (8f33cac) into master (e414de8) will increase coverage by 0.30%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2732      +/-   ##
==========================================
+ Coverage   60.42%   60.72%   +0.30%     
==========================================
  Files         402      402              
  Lines       29633    29635       +2     
==========================================
+ Hits        17904    17994      +90     
+ Misses      11729    11641      -88     
Impacted Files Coverage Δ
.../collision_detection_fcl/src/collision_env_fcl.cpp 89.75% <100.00%> (+0.11%) ⬆️
...meterization/work_space/pose_model_state_space.cpp 82.06% <0.00%> (-0.64%) ⬇️
...e/collision_detection_fcl/src/collision_common.cpp 78.18% <0.00%> (+0.26%) ⬆️
...raint_samplers/src/default_constraint_samplers.cpp 84.22% <0.00%> (+0.33%) ⬆️
...dl_kinematics_plugin/src/kdl_kinematics_plugin.cpp 81.41% <0.00%> (+0.42%) ⬆️
...on/pick_place/src/approach_and_translate_stage.cpp 73.95% <0.00%> (+0.71%) ⬆️
...ipulation/pick_place/src/manipulation_pipeline.cpp 73.79% <0.00%> (+1.95%) ⬆️
.../move_group_interface/src/move_group_interface.cpp 47.32% <0.00%> (+3.39%) ⬆️
...s/include/moveit/py_bindings_tools/serialize_msg.h 95.00% <0.00%> (+5.00%) ⬆️
...ove_group_interface/src/wrap_python_move_group.cpp 37.82% <0.00%> (+10.95%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e414de8...8f33cac. Read the comment docs.

Copy link
Contributor

@v4hn v4hn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be that fewer elements are needed than reserved (if createCollisionGeometry returns nullptr), but yes, reserving is much better. 👍

@v4hn v4hn merged commit f53f469 into moveit:master Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants