Skip to content

Commit

Permalink
Improve log messages (#206)
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Lamprianidis <[email protected]>
  • Loading branch information
nlamprian authored May 25, 2023
1 parent 678a0ef commit ed51b1a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/robot_state_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void RobotStatePublisher::setupURDF(const std::string & urdf_xml)

KDL::SegmentMap segments_map = tree.getSegments();
for (const std::pair<const std::string, KDL::TreeElement> & segment : segments_map) {
RCLCPP_INFO(get_logger(), "got segment %s", segment.first.c_str());
RCLCPP_DEBUG(get_logger(), "Got segment %s", segment.first.c_str());
}

// walk the tree and add segments to segments_
Expand All @@ -205,6 +205,8 @@ void RobotStatePublisher::setupURDF(const std::string & urdf_xml)

// Publish the robot description
description_pub_->publish(std::move(msg));

RCLCPP_INFO(get_logger(), "Robot initialized");
}

// add children to correct maps
Expand All @@ -222,8 +224,8 @@ void RobotStatePublisher::addChildren(
if (model.getJoint(child.getJoint().getName()) &&
model.getJoint(child.getJoint().getName())->type == urdf::Joint::FLOATING)
{
RCLCPP_INFO(
get_logger(), "Floating joint. Not adding segment from %s to %s.",
RCLCPP_DEBUG(
get_logger(), "Floating joint is not supported; skipping segment from %s to %s.",
root.c_str(), child.getName().c_str());
} else {
segments_fixed_.insert(make_pair(child.getJoint().getName(), s));
Expand Down

0 comments on commit ed51b1a

Please sign in to comment.