Ask Your Question
0

how to set depth mode for ASUS xTion Pro Live

asked 2015-07-02 05:45:54 -0600

Chaos gravatar image

updated 2015-07-02 05:51:28 -0600

Hi everyone. I'm trying to set the depth video mode on an ASUS xTion Pro Live. As suggested in the code API, I'm setting the video mode this way:

depthMode_ = depthStream_.getSensorInfo().getSupportedVideoModes()[4];
  ROS_INFO("The wished depth mode is %d x %d at %d FPS. Pixel format %d", depthMode_.getResolutionX(),
           depthMode_.getResolutionY(), depthMode_.getFps(), depthMode_.getPixelFormat());
  if (depthStream_.setVideoMode(depthMode_) != openni::STATUS_OK)
  {
    ROS_ERROR("Can't apply depth-videomode");
    depthMode_ = depthStream_.getVideoMode();
    ROS_INFO("The depth mode is set to %d x %d at %d FPS. Pixel format %d", depthMode_.getResolutionX(),
             depthMode_.getResolutionY(), depthMode_.getFps(), depthMode_.getPixelFormat());
  }

unfortunately, even if the mode (RES=640x420, FPS=30 PF=100) is supported, this operation fails.

The full node can be found here

Did anyone manage to set the resolution for the depth mode?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-02 07:58:40 -0600

Chaos gravatar image

I solved! I moved the skeleton tracker initializer:

niteRc_ = userTracker_.create();
if (niteRc_ != nite::STATUS_OK)
{
  ROS_FATAL("Couldn't create user tracker");
  ros::shutdown();
  return;
}

after setting the RGB and the DEPTH modes. If you are interested, the code is available here. The node is an extension for the openni2_tracker. The node tracks the skeleton and publishes rgb stream, depth stream and point cloud. Furthermore the node publishes a topic with the IDs of the tracked users.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-02 05:45:54 -0600

Seen: 625 times

Last updated: Jul 02 '15