cartographer
sensor
odometry_data.cc
Go to the documentation of this file.
1
/*
2
* Copyright 2017 The Cartographer Authors
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#include "
cartographer/sensor/odometry_data.h
"
18
19
#include "
cartographer/transform/transform.h
"
20
21
namespace
cartographer
{
22
namespace
sensor {
23
24
proto::OdometryData
ToProto
(
const
OdometryData
& odometry_data) {
25
proto::OdometryData proto;
26
proto.set_timestamp(
common::ToUniversal
(odometry_data.
time
));
27
*proto.mutable_pose() =
transform::ToProto
(odometry_data.
pose
);
28
return
proto;
29
}
30
31
OdometryData
FromProto
(
const
proto::OdometryData& proto) {
32
return
OdometryData
{
common::FromUniversal
(proto.timestamp()),
33
transform::ToRigid3
(proto.pose())};
34
}
35
36
}
// namespace sensor
37
}
// namespace cartographer
cartographer::sensor::OdometryData::pose
transform::Rigid3d pose
Definition:
odometry_data.h:29
cartographer::sensor::OdometryData
Definition:
odometry_data.h:27
cartographer::sensor::ToProto
proto::FixedFramePoseData ToProto(const FixedFramePoseData &pose_data)
Definition:
fixed_frame_pose_data.cc:25
odometry_data.h
cartographer::sensor::FromProto
FixedFramePoseData FromProto(const proto::FixedFramePoseData &proto)
Definition:
fixed_frame_pose_data.cc:34
cartographer::transform::ToRigid3
transform::Rigid3d ToRigid3(const proto::Rigid3d &rigid)
Definition:
transform.cc:71
cartographer::common::FromUniversal
Time FromUniversal(const int64 ticks)
Definition:
time.cc:34
cartographer::transform::ToProto
proto::Rigid2d ToProto(const transform::Rigid2d &transform)
Definition:
transform.cc:48
cartographer
Definition:
map_builder_stub.cc:31
transform.h
cartographer::common::ToUniversal
int64 ToUniversal(const Time time)
Definition:
time.cc:36
cartographer::sensor::OdometryData::time
common::Time time
Definition:
odometry_data.h:28
cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:58