Rename 'tranform' to 'landmark_to_tracking_transform'. (#836)
parent
6d4649857a
commit
986ac28ff8
|
@ -27,7 +27,8 @@ proto::LandmarkData ToProto(const LandmarkData& landmark_data) {
|
||||||
for (const Landmark& landmark : landmark_data.landmarks) {
|
for (const Landmark& landmark : landmark_data.landmarks) {
|
||||||
auto* item = proto.add_landmarks();
|
auto* item = proto.add_landmarks();
|
||||||
item->set_id(landmark.id);
|
item->set_id(landmark.id);
|
||||||
*item->mutable_transform() = transform::ToProto(landmark.transform);
|
*item->mutable_landmark_to_tracking_transform() =
|
||||||
|
transform::ToProto(landmark.landmark_to_tracking_transform);
|
||||||
item->set_translation_weight(landmark.translation_weight);
|
item->set_translation_weight(landmark.translation_weight);
|
||||||
item->set_rotation_weight(landmark.rotation_weight);
|
item->set_rotation_weight(landmark.rotation_weight);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +41,7 @@ LandmarkData FromProto(const proto::LandmarkData& proto) {
|
||||||
for (const auto& item : proto.landmarks()) {
|
for (const auto& item : proto.landmarks()) {
|
||||||
landmark_data.landmarks.push_back({
|
landmark_data.landmarks.push_back({
|
||||||
item.id(),
|
item.id(),
|
||||||
transform::ToRigid3(item.transform()),
|
transform::ToRigid3(item.landmark_to_tracking_transform()),
|
||||||
item.translation_weight(),
|
item.translation_weight(),
|
||||||
item.rotation_weight(),
|
item.rotation_weight(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace sensor {
|
||||||
|
|
||||||
struct Landmark {
|
struct Landmark {
|
||||||
std::string id;
|
std::string id;
|
||||||
transform::Rigid3d transform;
|
transform::Rigid3d landmark_to_tracking_transform;
|
||||||
double translation_weight;
|
double translation_weight;
|
||||||
double rotation_weight;
|
double rotation_weight;
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,9 +31,10 @@ using ::testing::DoubleNear;
|
||||||
using ::testing::Field;
|
using ::testing::Field;
|
||||||
|
|
||||||
::testing::Matcher<const Landmark&> EqualsLandmark(const Landmark& expected) {
|
::testing::Matcher<const Landmark&> EqualsLandmark(const Landmark& expected) {
|
||||||
return ::testing::AllOf(Field(&Landmark::id, expected.id),
|
return ::testing::AllOf(
|
||||||
Field(&Landmark::transform,
|
Field(&Landmark::id, expected.id),
|
||||||
transform::IsNearly(expected.transform, 1e-2)),
|
Field(&Landmark::landmark_to_tracking_transform,
|
||||||
|
transform::IsNearly(expected.landmark_to_tracking_transform, 1e-2)),
|
||||||
Field(&Landmark::translation_weight,
|
Field(&Landmark::translation_weight,
|
||||||
DoubleNear(expected.translation_weight, 0.01)),
|
DoubleNear(expected.translation_weight, 0.01)),
|
||||||
Field(&Landmark::rotation_weight,
|
Field(&Landmark::rotation_weight,
|
||||||
|
|
|
@ -63,7 +63,7 @@ message FixedFramePoseData {
|
||||||
message LandmarkData {
|
message LandmarkData {
|
||||||
message Landmark {
|
message Landmark {
|
||||||
bytes id = 1;
|
bytes id = 1;
|
||||||
transform.proto.Rigid3d transform = 2;
|
transform.proto.Rigid3d landmark_to_tracking_transform = 2;
|
||||||
double translation_weight = 3;
|
double translation_weight = 3;
|
||||||
double rotation_weight = 4;
|
double rotation_weight = 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue