Skip to content

Constant publish rate?  #19

@zfanCode

Description

@zfanCode

Hi,

I am trying to get a constant publish frequency for Fovis using a Kinect Odometer. Fovis is currently using a changing publish frequency, but in our application we somehow need to make the publish frequency a constant (or approximately constant).

Is it a way to do it? I tried to read the code, but it seems the publishing routine is a callback, which is assigned to xxxxx, and I don't quite understand how it works.

Here is my currently understanding:

  1. In odometer_base.hpp, the function process() is a routine to process messages and publish them.
  2. In mono_depth_odometer.cpp, the function imageCallbak() calls process() above; then imageCallback() is called by dataCb().
  3. Then, dataCb() is registered as a callback in mono_depth_odometer.hpp, with the following lines:
    if (approx)
    {
      approximate_sync_.reset(new ApproximateSync(ApproximatePolicy(queue_size_),
                                                  image_sub_, depth_sub_, image_info_sub_, depth_info_sub_) );
      approximate_sync_->registerCallback(boost::bind(&MonoDepthProcessor::dataCb, this, _1, _2, _3, _4));
    }
    else
    {
      exact_sync_.reset(new ExactSync(ExactPolicy(queue_size_),
                                      image_sub_, depth_sub_, image_info_sub_, depth_info_sub_) );
      exact_sync_->registerCallback(boost::bind(&MonoDepthProcessor::dataCb, this, _1, _2, _3, _4));
    }

Is there a way a way to have a constant publish rate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions