change topic and msg depth camera
This commit is contained in:
@@ -232,6 +232,22 @@ void ObstacleLayer::handleImpl(const void* data,
|
||||
{
|
||||
if(!stop_receiving_data_)
|
||||
{
|
||||
if (type == typeid(robot_sensor_msgs::DepthCameraData) &&
|
||||
(depth_camera_topic_.empty() || topic == depth_camera_topic_))
|
||||
{
|
||||
const robot_sensor_msgs::DepthCameraData& depth_camera_data =
|
||||
*static_cast<const robot_sensor_msgs::DepthCameraData*>(data);
|
||||
if (depth_camera_data.camera_info.K[0] <= 0.0 || depth_camera_data.camera_info.K[4] <= 0.0)
|
||||
{
|
||||
robot::log_error("ObstacleLayer received invalid camera intrinsics for depth clearing\n");
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(depth_camera_mutex_);
|
||||
latest_depth_camera_data_ = depth_camera_data;
|
||||
have_depth_camera_data_ = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if(observation_buffers_.empty() || callback_infos_.empty()) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user