33 const Eigen::Affine3d& pose) {
38 const Eigen::Affine3d& pose,
39 const Eigen::Vector3d& global_to_local_offset,
56 float detection_center_x = obj_ptr->lidar_supplement.detections[0];
57 float detection_center_y = obj_ptr->lidar_supplement.detections[1];
58 float detection_center_z = obj_ptr->lidar_supplement.detections[2];
59 float detection_size_x = obj_ptr->lidar_supplement.detections[3];
60 float detection_size_y = obj_ptr->lidar_supplement.detections[4];
61 float detection_size_z = obj_ptr->lidar_supplement.detections[5];
62 float detection_theta = obj_ptr->lidar_supplement.detections[6];
63 Eigen::Vector3d model_center_lidar = Eigen::Vector3d(detection_center_x,
64 detection_center_y, detection_center_z);
68 Eigen::Matrix<float, 8, 1>
corners;
70 detection_center_x, detection_center_y, detection_center_z,
71 detection_size_x, detection_size_y, detection_size_z,
73 for (
size_t i = 0; i < 4; i++) {
74 Eigen::Vector3d detection_cor = Eigen::Vector3d(
75 static_cast<double>(
corners[2 * i]),
76 static_cast<double>(
corners[2 * i + 1]), detection_center_z);
80 Eigen::Matrix3d rotation = pose.rotation();
91 for (
size_t i = 0; i < cloud.
size(); ++i) {
92 Eigen::Vector3d pt(cloud[i].x, cloud[i].y, cloud[i].z);
93 Eigen::Vector3d pt_world = pose * pt;
94 cloud_world[i].x = pt_world(0);
95 cloud_world[i].y = pt_world(1);
96 cloud_world[i].z = pt_world(2);
97 cloud_world[i].intensity = cloud[i].intensity;
101 for (
size_t i = 0; i < cloud.
size(); ++i) {
133 for (
size_t i = 0; i < cloud.
size(); ++i) {
134 Eigen::Vector3d pt(cloud[i].x, cloud[i].y, cloud[i].z);
136 cloud_world[i].x = pt_world(0);
137 cloud_world[i].y = pt_world(1);
138 cloud_world[i].z = pt_world(2);
139 cloud_world[i].intensity = cloud[i].intensity;
142 sizeof(
float) * cloud.
size());
150 for (
int i = 0; i < 4; ++i) {
151 corners[i] = Eigen::Vector3d::Zero();
157 center = Eigen::Vector3d::Zero();
170 size = Eigen::Vector3d::Zero();
197 state = Eigen::Vector4d::Zero();
222 const Eigen::Vector3d& global_to_local_offset,
231 object_ptr = base::ObjectPool::Instance().Get();
272 obj->theta = std::atan2(obj->velocity[1], obj->velocity[0]);
274 obj->theta = std::atan2(obj->direction[1], obj->direction[0]);
287 std::ostringstream oos;
308 for (
size_t i = 0; i < feature_len; ++i) {
const std::vector< float > & points_height() const
void resize(const size_t size) override
void SetPointHeight(size_t i, size_t j, float height)
void ComputeHistogram(int bin_size, float *feature)
Eigen::Matrix< T, 3, 1 > CalculateCentroid(const base::AttributePointCloud< base::Point< T > > &cloud)
void CalculateCornersFromCenter(Type center_x, Type center_y, Type center_z, Type size_x, Type size_y, Type size_z, Type theta, Eigen::Matrix< Type, 8, 1 > *corners)
std::shared_ptr< Object > ObjectPtr
apollo::perception::base::PointCloud< PointF > PointFCloud
std::shared_ptr< TrackedObject > TrackedObjectPtr
Eigen::Matrix3d belief_velocity_online_covariance
Eigen::Vector3d global_local_offset
Eigen::Vector3d barycenter
base::ObjectPtr object_ptr
Eigen::Vector3d motion_score
int measured_big_velocity_age
Eigen::Vector3d belief_velocity_gain
double direction_convergence_confidence
size_t histogram_bin_size
Eigen::Vector3d output_size
void Reset()
Reset all data
Eigen::Vector3d anchor_point
void AttachObject(base::ObjectPtr obj_ptr, const Eigen::Affine3d &pose, const Eigen::Vector3d &global_to_local_offset=Eigen::Vector3d::Zero(), const base::SensorInfo &sensor=base::SensorInfo(), double timestamp=0.0)
Attach object
Eigen::Vector3d lane_direction
Eigen::Vector3d output_angular
Eigen::Vector3d measured_barycenter_velocity
Eigen::Vector3d belief_anchor_point
Eigen::Affine3d sensor_to_local_pose
std::vector< float > type_probs
Eigen::Vector3d direction_state
std::string ToString() const
Transform tracked data state to string
base::SensorInfo sensor_info
Eigen::Vector3d measured_detection_history_corners_velocity[4]
Eigen::Vector3d measured_corners_velocity[4]
float GetVelThreshold(base::ObjectPtr obj) const
Get vehicle threshold
void ToObject(base::ObjectPtr obj_ptr) const
Convert tracked object to base object
std::vector< float > shape_features_full
Eigen::Matrix4d state_covariance
Eigen::Matrix3d output_velocity_uncertainty
Eigen::Vector3d measured_center_velocity
Eigen::Matrix3d velocity_covariance
Eigen::Matrix4d measurement_covariance
Eigen::Vector3d selected_measured_velocity
Eigen::Vector3d corners[4]
Eigen::Vector3d selected_measured_acceleration
Eigen::Vector3d detection_corners[4]
Eigen::Vector3d output_direction
std::vector< float > shape_features
Eigen::Vector3d measured_history_corners_velocity[4]
void ComputeShapeFeatures()
Compute shape features
Eigen::Vector3d detection_center
void TransformObjectCloudToWorld()
Transform object cloud to world
Eigen::Vector3d measured_nearest_corner_velocity
Eigen::Vector3d direction
Eigen::Vector3d output_center
float convergence_confidence
Eigen::Vector3d measured_history_center_velocity
Eigen::Vector3d measured_detection_history_center_velocity
Eigen::Vector3d output_velocity
Eigen::Vector3d belief_velocity
Eigen::Vector3d belief_acceleration
int boostup_need_history_size
Eigen::Matrix3d direction_state_covariance
double direction_converged
void CopyFrom(std::shared_ptr< TrackedObject > rhs, bool is_deep)
Copy from tracked object
Eigen::Vector3d measured_detection_center_velocity