Class Node

Class Documentation

class Node

Represents a trajectory node, including its pose and downsampled point cloud.

Public Functions

Node(uint64_t timestamp, const Eigen::Matrix4d &pose)

Constructor for a trajectory node.

Parameters:
  • timestamp[in] – Timestamp of the node.

  • pose[in] – Homogeneous pose of the node.

Node(uint64_t timestamp, const Eigen::Quaterniond &rotation, const Eigen::Vector3d &position)

Constructor for a trajectory node.

Parameters:
  • timestamp[in] – Timestamp of the node.

  • rotation[in] – Rotational component of the pose.

  • position[in] – Translational component of the pose.

void update_pose()

Updates the pose of the node.

This function updates the homogeneous pose matrix of the node based on the quaternion and position vector, which are refined by the pose optimization iteration.

const Eigen::Matrix4d &get_pose() const

Retrieves the pose of the node.

Returns:

The homogeneous pose of the node as 4x4 matrix.

bool operator<(const Node &other) const

Compares nodes by their timestamps.

Parameters:

other[in] – The other node to compare with.

Returns:

True if this node’s timestamp is less than the other node’s timestamp, false otherwise.

Public Members

EIGEN_MAKE_ALIGNED_OPERATOR_NEW uint64_t ts

Timestamp of the node (nanoseconds).

Eigen::ArrayX3d downsampled_pts

Downsampled point cloud for pose-to-pose constraints.

Eigen::ArrayX3d ptp_constraint_pt

Selected point for point-to-point constraints (size 1 or empty).

int ptp_row = -1

Row index of the selected point for point-to-point constraints.

int ptp_col = -1

Column index of the selected point for point-to-point constraints.

int ptp_return = -1

Return index of the selected point for point-to-point constraints.

Eigen::ArrayX3d ap_constraint_pt

Selected point for absolute point constraints (size 1 or empty).

int ap_row = -1

Row index of the selected point for absolute point constraints.

int ap_col = -1

Column index of the selected point for absolute point constraints.

int ap_return = -1

Return index of the selected point for absolute point constraints.

Eigen::Quaterniond rotation

Rotational component of the node’s pose (quaternion).

Eigen::Vector3d position

Translational component of the node’s pose (x,y,z).