Class pose_sensor

Inheritance Relationships

Base Type

Class Documentation

class pose_sensor : public rs2::sensor

Public Functions

inline pose_sensor(sensor s)
inline bool import_localization_map(const std::vector<uint8_t> &lmap_buf) const

Load relocalization map onto device. Only one relocalization map can be imported at a time; any previously existing map will be overwritten. The imported map exists simultaneously with the map created during the most recent tracking session after start(), and they are merged after the imported map is relocalized. This operation must be done before start().

Parameters:

lmap_buf[in] map data as a binary blob

Returns:

true if success

inline std::vector<uint8_t> export_localization_map() const

Get relocalization map that is currently on device, created and updated during most recent tracking session. Can be called before or after stop().

Returns:

map data as a binary blob

inline bool set_static_node(const std::string &guid, const rs2_vector &pos, const rs2_quaternion &orient) const

Creates a named virtual landmark in the current map, known as static node. The static node’s pose is provided relative to the origin of current coordinate system of device poses. This function fails if the current tracker confidence is below 3 (high confidence).

Parameters:
  • guid[in] unique name of the static node (limited to 127 chars). If a static node with the same name already exists in the current map or the imported map, the static node is overwritten.

  • pos[in] position of the static node in the 3D space.

  • orient_quat[in] orientation of the static node in the 3D space, represented by a unit quaternion.

Returns:

true if success.

inline bool get_static_node(const std::string &guid, rs2_vector &pos, rs2_quaternion &orient) const

Gets the current pose of a static node that was created in the current map or in an imported map. Static nodes of imported maps are available after relocalizing the imported map. The static node’s pose is returned relative to the current origin of coordinates of device poses. Thus, poses of static nodes of an imported map are consistent with current device poses after relocalization. This function fails if the current tracker confidence is below 3 (high confidence).

Parameters:
  • guid[in] unique name of the static node (limited to 127 chars).

  • pos[out] position of the static node in the 3D space.

  • orient_quat[out] orientation of the static node in the 3D space, represented by a unit quaternion.

Returns:

true if success.

inline bool remove_static_node(const std::string &guid) const

Removes a static node from the current map.

Parameters:

guid[in] unique name of the static node (limited to 127 chars).

inline operator bool() const
inline explicit pose_sensor(std::shared_ptr<rs2_sensor> dev)