Skip to content

Commit

Permalink
Support message conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Nov 10, 2023
1 parent 09f911d commit 92fd72d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ class AllowedCollisionMatrix
lookup_table_.insert(acm.getAllAllowedCollisions().begin(), acm.getAllAllowedCollisions().end());
}

/**
* @brief Reserve space for the internal data storage
* @param size The size to reserve
*/
void reserveAllowedCollisionMatrix(std::size_t size)
{
lookup_table_.reserve(size);
}

friend std::ostream& operator<<(std::ostream& os, const AllowedCollisionMatrix& acm)
{
for (const auto& pair : acm.getAllAllowedCollisions())
Expand Down
6 changes: 6 additions & 0 deletions tesseract_scene_graph/include/tesseract_scene_graph/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,12 @@ class SceneGraph
*/
JointLimits::ConstPtr getJointLimits(const std::string& name);

/**
* @brief Set the allowed collision matrix
* @param acm The allowed collision matrix to assign
*/
void setAllowedCollisionMatrix(tesseract_common::AllowedCollisionMatrix::Ptr acm);

/**
* @brief Disable collision between two collision objects
* @param link_name1 Collision object name
Expand Down
5 changes: 5 additions & 0 deletions tesseract_scene_graph/src/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,11 @@ JointLimits::ConstPtr SceneGraph::getJointLimits(const std::string& name)
return found->second.first->limits;
}

void SceneGraph::setAllowedCollisionMatrix(tesseract_common::AllowedCollisionMatrix::Ptr acm)
{
acm_ = std::move(acm);
}

void SceneGraph::addAllowedCollision(const std::string& link_name1,
const std::string& link_name2,
const std::string& reason)
Expand Down

1 comment on commit 92fd72d

@github-actions
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 92fd72d Previous: e4a0731 Ratio
BM_CHECK_TRAJ_CONTINUOUS_STATE_SOLVER-TRAJ1-LVS/real_time 118318.25983332086 us/iter 54821.69023076285 us/iter 2.16
BM_CHECK_TRAJ_DISCRETE_JOINT_GROUP-TRAJ3-LVS/real_time 49526.410142854205 us/iter 24667.034464284498 us/iter 2.01
BM_CHECK_TRAJ_DISCRETE_STATE_SOLVER-TRAJ4-LVS/real_time 105392.57785714134 us/iter 52592.57053846621 us/iter 2.00
BM_CHECK_TRAJ_DISCRETE_JOINT_GROUP-TRAJ4-LVS/real_time 60008.42216667478 us/iter 28830.169750004115 us/iter 2.08
BM_CHECK_TRAJ_DISCRETE_STATE_SOLVER-TRAJ5-LVS/real_time 124433.29416665468 us/iter 59281.035833331924 us/iter 2.10
BM_CHECK_TRAJ_DISCRETE_JOINT_GROUP-TRAJ5-LVS/real_time 67307.89470000219 us/iter 31451.03386363892 us/iter 2.14
BM_CHECK_TRAJ_DISCRETE_STATE_SOLVER-TRAJ1-LVS-Debug/real_time 137557.90180002805 us/iter 64272.902272725994 us/iter 2.14
BM_CHECK_TRAJ_DISCRETE_JOINT_GROUP-TRAJ1-LVS-Debug/real_time 140353.20240000146 us/iter 65966.5954999961 us/iter 2.13
BM_CHECK_TRAJ_DISCRETE_STATE_SOLVER-TRAJ2-LVS-Debug/real_time 148654.98080002906 us/iter 69752.49709998934 us/iter 2.13
BM_CHECK_TRAJ_DISCRETE_JOINT_GROUP-TRAJ2-LVS-Debug/real_time 76538.79011109489 us/iter 36082.542049996395 us/iter 2.12
BM_CHECK_TRAJ_DISCRETE_STATE_SOLVER-TRAJ3-LVS-Debug/real_time 156740.21275003726 us/iter 73656.83949999492 us/iter 2.13
BM_CHECK_TRAJ_DISCRETE_JOINT_GROUP-TRAJ3-LVS-Debug/real_time 82682.93344442808 us/iter 39947.92433333158 us/iter 2.07
BM_CHECK_TRAJ_DISCRETE_STATE_SOLVER-TRAJ4-LVS-Debug/real_time 165705.24450003175 us/iter 79292.13411110443 us/iter 2.09
BM_CHECK_TRAJ_DISCRETE_JOINT_GROUP-TRAJ4-LVS-Debug/real_time 88341.67562500284 us/iter 42262.38994117599 us/iter 2.09
BM_CHECK_TRAJ_DISCRETE_STATE_SOLVER-TRAJ5-LVS-Debug/real_time 174348.6329999655 us/iter 82583.10533334325 us/iter 2.11
BM_CHECK_TRAJ_DISCRETE_JOINT_GROUP-TRAJ5-LVS-Debug/real_time 91323.53625000178 us/iter 42844.61469230267 us/iter 2.13

This comment was automatically generated by workflow using github-action-benchmark.

CC: @Levi-Armstrong

Please sign in to comment.