Skip to content

Commit

Permalink
document solution in ROS_ERROR on failed self-filtering (moveit#2627)
Browse files Browse the repository at this point in the history
Also move the log command to the base class (which even uses the same logname...)
  • Loading branch information
v4hn authored and rhaschke committed May 23, 2021
1 parent 2e69e47 commit 3e3f449
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 9 additions & 1 deletion moveit_ros/occupancy_map_monitor/src/occupancy_map_updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ bool OccupancyMapUpdater::updateTransformCache(const std::string& target_frame,
{
transform_cache_.clear();
if (transform_provider_callback_)
return transform_provider_callback_(target_frame, target_time, transform_cache_);
{
bool success = transform_provider_callback_(target_frame, target_time, transform_cache_);
if (!success)
ROS_ERROR_THROTTLE(
1,
"Transform cache was not updated. Self-filtering may fail. If transforms were not available yet, consider "
"setting robot_description_planning/shape_transform_cache_lookup_wait_time to wait longer for transforms");
return success;
}
else
{
ROS_WARN_THROTTLE(1, "No callback provided for updating the transform cache for octomap updaters");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,7 @@ void DepthImageOctomapUpdater::depthImageCallback(const sensor_msgs::ImageConstP
}

if (!updateTransformCache(depth_msg->header.frame_id, depth_msg->header.stamp))
{
ROS_ERROR_THROTTLE(1, "Transform cache was not updated. Self-filtering may fail.");
return;
}

if (depth_msg->is_bigendian && !HOST_IS_BIG_ENDIAN)
ROS_ERROR_THROTTLE(1, "endian problem: received image data does not match host");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ void PointCloudOctomapUpdater::cloudMsgCallback(const sensor_msgs::PointCloud2::
Eigen::Vector3d sensor_origin_eigen(sensor_origin_tf.getX(), sensor_origin_tf.getY(), sensor_origin_tf.getZ());

if (!updateTransformCache(cloud_msg->header.frame_id, cloud_msg->header.stamp))
{
ROS_ERROR_THROTTLE(1, "Transform cache was not updated. Self-filtering may fail.");
return;
}

/* mask out points on the robot */
shape_mask_->maskContainment(*cloud_msg, sensor_origin_eigen, 0.0, max_range_, mask_);
Expand Down

0 comments on commit 3e3f449

Please sign in to comment.