Adds support for inverted LaserScan messages. (#138)
parent
a39bbff70c
commit
015519cf23
|
@ -40,8 +40,11 @@ std::vector<uint8> ReorderReflectivities(
|
||||||
PointCloud ToPointCloud(const proto::LaserScan& proto) {
|
PointCloud ToPointCloud(const proto::LaserScan& proto) {
|
||||||
CHECK_GE(proto.range_min(), 0.f);
|
CHECK_GE(proto.range_min(), 0.f);
|
||||||
CHECK_GE(proto.range_max(), proto.range_min());
|
CHECK_GE(proto.range_max(), proto.range_min());
|
||||||
CHECK_GT(proto.angle_increment(), 0.f);
|
if (proto.angle_increment() > 0.f) {
|
||||||
CHECK_GT(proto.angle_max(), proto.angle_min());
|
CHECK_GT(proto.angle_max(), proto.angle_min());
|
||||||
|
} else {
|
||||||
|
CHECK_GT(proto.angle_min(), proto.angle_max());
|
||||||
|
}
|
||||||
PointCloud point_cloud;
|
PointCloud point_cloud;
|
||||||
float angle = proto.angle_min();
|
float angle = proto.angle_min();
|
||||||
for (const auto& range : proto.range()) {
|
for (const auto& range : proto.range()) {
|
||||||
|
|
Loading…
Reference in New Issue