Drake
Drake C++ Documentation
ImageTraits< PixelType > Struct Template Reference

Detailed Description

template<PixelType>
struct drake::systems::sensors::ImageTraits< PixelType >

Traits class for Image, specialized by PixelType.

All traits specialization should offer at least these two constants:

  • kNumChannels: The number of channels.
  • kPixelFormat: The meaning and/or layout of the channels.

Specializations for kDepth... should also provide the following constants:

  • kTooClose: The depth value when the min sensing range is exceeded.
  • kTooFar: The depth value when the max sensing range is exceeded.

The kTooClose values differ from ROS, which uses negative infinity in this scenario. Drake uses zero because it results in less devastating bugs when users fail to check for the lower limit being hit, because using negative infinity does not prevent users from writing bad code, because uint16_t does not offer negative infinity and using 65535 for "too near" could be confusing, and because several cameras natively use zero for this case.

#include <drake/systems/sensors/pixel_types.h>


The documentation for this struct was generated from the following file: