0
$\begingroup$

Rosanswers logo

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?


Originally posted by Chaos on ROS Answers with karma: 396 on 2015-07-02

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Chaos with karma: 396 on 2015-07-02

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.