orbbec / ros_astra_camera

ROS wrapper for Astra camera
Apache License 2.0
68 stars 28 forks source link

Issue with astra.launch file #166

Closed PhilipAmadasun closed 1 year ago

PhilipAmadasun commented 2 years ago

When I try the astra.launch file. I get: [ WARN] [1667893867.022140838]: No color sensor found, depth align will be disabled [ INFO] [1667893867.035417090]: Stream color is disabled [ INFO] [1667893867.046151629]: set depth video mode Resolution :640x480@30Hz format PIXEL_FORMAT_DEPTH_1_MM [ INFO] [1667893867.047583431]: set ir video mode Resolution :640x480@30Hz format PIXEL_FORMAT_GRAY16 [ WARN] [1667893867.048326095]: Publishing dynamic camera transforms (/tf) at 10 Hz [ERROR] [1667893867.049806709]: Tried to advertise a service that is already advertised in this node [/camera/camera/set_camera_info]

Do I need to calibrate the camera to fix the issue?

jian-dong commented 1 year ago

Hi, thank you for raising this issue, I fix this error msg by changing the camera_info_manager init

 ir_info_manager_ = std::make_unique<camera_info_manager::CameraInfoManager>(
      nh_private_, "ir_camera", ir_info_uri_);
  if(device_->hasSensor(openni::SENSOR_COLOR)) {
    color_info_manager_ = std::make_unique<camera_info_manager::CameraInfoManager>(
        nh_, "rgb_camera", color_info_uri_);
  }

instead of

ir_info_manager_ = std::make_unique<camera_info_manager::CameraInfoManager>(
      nh_private_, "ir_camera", ir_info_uri_);
  color_info_manager_ = std::make_unique<camera_info_manager::CameraInfoManager>(
      nh_private_, "rgb_camera", color_info_uri_);

This error is gone.