MCPcopy Create free account
hub / github.com/PickNikRobotics/rviz_visual_tools / TFVisualTools

Method TFVisualTools

src/tf_visual_tools.cpp:49–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47namespace rviz_visual_tools
48{
49TFVisualTools::TFVisualTools(const rclcpp::Node::SharedPtr& node, double loop_hz)
50 : node_base_interface_(node->get_node_base_interface())
51 , timers_interface_(node->get_node_timers_interface())
52 , clock_interface_(node->get_node_clock_interface())
53 , logger_(node->get_node_logging_interface()->get_logger().get_child("tf_visual_tools"))
54{
55 rclcpp::Duration update_period = rclcpp::Duration::from_seconds(1.0 / loop_hz);
56
57 // non_realtime_loop_ = nh_.createTimer(update_freq, &TFVisualTools::publishAllTransforms, this);
58 non_realtime_loop_ =
59 rclcpp::create_timer(node_base_interface_, timers_interface_, clock_interface_->get_clock(),
60 update_period, std::bind(&TFVisualTools::publishAllTransforms, this));
61 // , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
62
63 tf_broadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(node);
64
65 RCLCPP_INFO(logger_, "TFVisualTools Ready.");
66}
67
68bool TFVisualTools::publishTransform(const Eigen::Isometry3d& transform,
69 const std::string& from_frame, const std::string& to_frame)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected