Skip to content

Commit

Permalink
Disable separate TransformListener thread in OccupancyMapServer (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
henningkayser authored Apr 21, 2022
1 parent 6b985cc commit cd39fc2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int main(int argc, char** argv)
node->create_publisher<octomap_msgs::msg::Octomap>("octomap_binary", RMW_QOS_POLICY_HISTORY_KEEP_LAST);
auto clock_ptr = std::make_shared<rclcpp::Clock>(RCL_ROS_TIME);
std::shared_ptr<tf2_ros::Buffer> buffer = std::make_shared<tf2_ros::Buffer>(clock_ptr, tf2::durationFromSec(5.0));
std::shared_ptr<tf2_ros::TransformListener> listener = std::make_shared<tf2_ros::TransformListener>(*buffer, node);
tf2_ros::TransformListener listener(*buffer, node, false /* spin_thread - disables executor */);
occupancy_map_monitor::OccupancyMapMonitor server(node, buffer);
server.setUpdateCallback(std::bind(&publishOctomap, octree_binary_pub, &server));
server.startMonitor();
Expand Down

0 comments on commit cd39fc2

Please sign in to comment.