Skip to content

Commit e373c76

Browse files
committed
Add missing git ignore and missed name changes in tests
1 parent bb2babe commit e373c76

File tree

4 files changed

+37
-36
lines changed

4 files changed

+37
-36
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ mrsl_quadrotor/
44
msckf_vio/
55
ouster_example/
66
waypoint_navigation_plugin/
7+
kr_planning_msgs/
78

89
#===========
910
# C++

autonomy_core/map_plan/mapper/test/test_voxel_mapper.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include <planning_ros_msgs/VoxelMap.h>
2+
#include <kr_planning_msgs/VoxelMap.h>
33
#include <iostream>
44
#include <cmath>
55
#include <memory>
@@ -210,10 +210,10 @@ TEST_F(VoxelMapperTest, TestAllocateRelocate) {
210210
// True means that the relocating actually happened
211211
EXPECT_TRUE(p_test_mapper_->allocate(new_origin, new_dimensions));
212212

213-
planning_ros_msgs::VoxelMap relocated_map = p_test_mapper_->getMap();
213+
kr_planning_msgs::VoxelMap relocated_map = p_test_mapper_->getMap();
214214

215215
// Create the ground truth voxel map to compare it to the relocated map
216-
planning_ros_msgs::VoxelMap gt_voxel_map;
216+
kr_planning_msgs::VoxelMap gt_voxel_map;
217217

218218
// new map should have 300 voxels in x, 300 voxels in the y, and 20 in z
219219
int dim_x = 150 / resolution_;
@@ -261,8 +261,8 @@ TEST_F(VoxelMapperTest, TestAllocateRelocate) {
261261
*/
262262
TEST_F(VoxelMapperTest, TestSetMapUknown) {
263263
p_test_mapper_->setMapUnknown();
264-
planning_ros_msgs::VoxelMap vox_map = p_test_mapper_->getMap();
265-
planning_ros_msgs::VoxelMap inflated_vox_map =
264+
kr_planning_msgs::VoxelMap vox_map = p_test_mapper_->getMap();
265+
kr_planning_msgs::VoxelMap inflated_vox_map =
266266
p_test_mapper_->getInflatedMap();
267267
for (auto &voxel : vox_map.data) {
268268
EXPECT_EQ(voxel, val_unknown_);
@@ -278,8 +278,8 @@ TEST_F(VoxelMapperTest, TestSetMapUknown) {
278278
*/
279279
TEST_F(VoxelMapperTest, TestSetMapFree) {
280280
p_test_mapper_->setMapFree();
281-
planning_ros_msgs::VoxelMap vox_map = p_test_mapper_->getMap();
282-
planning_ros_msgs::VoxelMap inflated_vox_map =
281+
kr_planning_msgs::VoxelMap vox_map = p_test_mapper_->getMap();
282+
kr_planning_msgs::VoxelMap inflated_vox_map =
283283
p_test_mapper_->getInflatedMap();
284284
for (auto &voxel : vox_map.data) {
285285
EXPECT_EQ(voxel, val_free_);
@@ -324,10 +324,10 @@ TEST_F(VoxelMapperTest, TestDecayLocalCloud) {
324324
p_test_mapper_->decayLocalCloud(position, max_range);
325325
}
326326

327-
planning_ros_msgs::VoxelMap decayed_map = p_test_mapper_->getMap();
327+
kr_planning_msgs::VoxelMap decayed_map = p_test_mapper_->getMap();
328328

329329
// Create the ground truth voxel map to compare it to the decayed map
330-
planning_ros_msgs::VoxelMap gt_voxel_map;
330+
kr_planning_msgs::VoxelMap gt_voxel_map;
331331
int dim_x = x_dim_ / resolution_;
332332
int dim_y = y_dim_ / resolution_;
333333
int dim_z = z_dim_ / resolution_;
@@ -407,14 +407,14 @@ TEST_F(VoxelMapperTest, TestAddCloud) {
407407

408408
p_test_mapper_->addCloud(lidar_points, t_map_lidar, neighbors, false,
409409
max_range);
410-
planning_ros_msgs::VoxelMap processed_map = p_test_mapper_->getMap();
411-
planning_ros_msgs::VoxelMap processed_inflated_map;
410+
kr_planning_msgs::VoxelMap processed_map = p_test_mapper_->getMap();
411+
kr_planning_msgs::VoxelMap processed_inflated_map;
412412
processed_inflated_map = p_test_mapper_->getInflatedMap();
413413

414414
// Create the ground truth voxel maps to compare to the normal map and the
415415
// inflated map
416-
planning_ros_msgs::VoxelMap gt_voxel_map;
417-
planning_ros_msgs::VoxelMap gt_inflated_voxel_map;
416+
kr_planning_msgs::VoxelMap gt_voxel_map;
417+
kr_planning_msgs::VoxelMap gt_inflated_voxel_map;
418418
int x_dim = x_dim_ / resolution_;
419419
int y_dim = y_dim_ / resolution_;
420420
int z_dim = z_dim_ / resolution_;
@@ -483,8 +483,8 @@ TEST_F(VoxelMapperTest, TestAddCloud) {
483483
* will just compare the maps to each other after being created.
484484
*/
485485
TEST_F(VoxelMapperTest, TestGetInflatedMap) {
486-
planning_ros_msgs::VoxelMap normal_map = p_test_mapper_->getMap();
487-
planning_ros_msgs::VoxelMap inflated_map = p_test_mapper_->getInflatedMap();
486+
kr_planning_msgs::VoxelMap normal_map = p_test_mapper_->getMap();
487+
kr_planning_msgs::VoxelMap inflated_map = p_test_mapper_->getInflatedMap();
488488

489489
int num_voxels = 3200000;
490490
ASSERT_EQ(normal_map.data.size(), num_voxels);
@@ -516,11 +516,11 @@ TEST_F(VoxelMapperTest, TestGetInflatedLocalMap) {
516516
Eigen::Vector3d origin(75, 25, 2.5); // Prev origin was (-100, -100, -5)
517517
Eigen::Vector3d dimensions(100, 100, 10); // Prev dimen was (200, 200, 10)
518518

519-
planning_ros_msgs::VoxelMap local_map;
519+
kr_planning_msgs::VoxelMap local_map;
520520
local_map = p_test_mapper_->getInflatedLocalMap(origin, dimensions);
521521

522522
// Create the ground truth voxel map to compare it to the local map
523-
planning_ros_msgs::VoxelMap gt_voxel_map;
523+
kr_planning_msgs::VoxelMap gt_voxel_map;
524524
int dim_x = dimensions(0) / resolution_;
525525
int dim_y = dimensions(1) / resolution_;
526526
int dim_z = dimensions(2) / resolution_;
@@ -825,11 +825,11 @@ TEST_F(VoxelMapperTest, TestgetInflatedOccMap) {
825825
p_test_mapper_->addCloud(scan_points, t_map_lidar, vec_Vec3i(), false, 180);
826826

827827
// Should consider vertical space between [-1.0, 3.5]
828-
planning_ros_msgs::VoxelMap sliced_map =
828+
kr_planning_msgs::VoxelMap sliced_map =
829829
p_test_mapper_->getInflatedOccMap(1.25, 2.25);
830830

831831
// Create the ground truth voxel map
832-
planning_ros_msgs::VoxelMap gt_slice;
832+
kr_planning_msgs::VoxelMap gt_slice;
833833
int x_dim = x_dim_ / resolution_;
834834
int y_dim = y_dim_ / resolution_;
835835
gt_slice.data.resize(x_dim * y_dim, val_free_);

autonomy_core/map_plan/mpl/test/benchmark_map_util.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class BenchmarkMapUtil : public benchmark::Fixture {
1111

1212
// Initialize the map with val_free as the default value
1313
std::vector<signed char> base_map(dim(0) * dim(1) * dim(2),
14-
planning_ros_msgs::VoxelMap::val_free);
14+
kr_planning_msgs::VoxelMap::val_free);
1515

1616
/* Modify the values of some voxels to not have a uniform map */
1717

@@ -20,7 +20,7 @@ class BenchmarkMapUtil : public benchmark::Fixture {
2020
for (int y = 25; y < 375; y++) {
2121
for (int x = 25; x < 375; x++) {
2222
int idx = x + dim(0) * y + dim(0) * dim(1) * z;
23-
base_map[idx] = planning_ros_msgs::VoxelMap::val_occ;
23+
base_map[idx] = kr_planning_msgs::VoxelMap::val_occ;
2424
}
2525
}
2626
}
@@ -30,7 +30,7 @@ class BenchmarkMapUtil : public benchmark::Fixture {
3030
for (int y = 75; y < 325; y++) {
3131
for (int x = 75; x < 325; x++) {
3232
int idx = x + dim(0) * y + dim(0) * dim(1) * z;
33-
base_map[idx] = planning_ros_msgs::VoxelMap::val_unknown;
33+
base_map[idx] = kr_planning_msgs::VoxelMap::val_unknown;
3434
}
3535
}
3636
}

autonomy_core/map_plan/mpl/test/test_map_util.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include <planning_ros_msgs/VoxelMap.h>
2+
#include <kr_planning_msgs/VoxelMap.h>
33
#include <iostream>
44
#include <cmath>
55
#include "mpl_collision/map_util.h"
@@ -53,7 +53,7 @@ TEST(MapUtilTest, TestIsOutside) {
5353

5454
// Create a base map for the MapUtil object with val_free as the default value
5555
std::vector<signed char> base_map(dim(0) * dim(1) * dim(2),
56-
planning_ros_msgs::VoxelMap::val_free);
56+
kr_planning_msgs::VoxelMap::val_free);
5757

5858
// Initialize the MapUtil object with the previously created map
5959
test_map.setMap(origin, dim, base_map, resolution);
@@ -101,7 +101,7 @@ TEST(MapUtilTest, TestIsFree) {
101101

102102
// Create a base map for the MapUtil object with val_free as the default value
103103
std::vector<signed char> base_map(dim(0) * dim(1) * dim(2),
104-
planning_ros_msgs::VoxelMap::val_free);
104+
kr_planning_msgs::VoxelMap::val_free);
105105

106106
vec_Vec3i non_free_voxels;
107107
non_free_voxels.push_back(Vec3i(176, 91, 6));
@@ -111,7 +111,7 @@ TEST(MapUtilTest, TestIsFree) {
111111
non_free_voxels.push_back(Vec3i(123, 158, 16));
112112
for (auto &vox : non_free_voxels) {
113113
int idx = vox(0) + dim(0) * vox(1) + dim(0) * dim(1) * vox(2);
114-
base_map[idx] = planning_ros_msgs::VoxelMap::val_occ;
114+
base_map[idx] = kr_planning_msgs::VoxelMap::val_occ;
115115
}
116116

117117
// Initialize the MapUtil object with the previously created map
@@ -166,7 +166,7 @@ TEST(MapUtilTest, TestIsOccupied) {
166166

167167
// Create a base map for the MapUtil object with val_occ as the default value
168168
std::vector<signed char> base_map(dim(0) * dim(1) * dim(2),
169-
planning_ros_msgs::VoxelMap::val_occ);
169+
kr_planning_msgs::VoxelMap::val_occ);
170170

171171
vec_Vec3i non_occ_voxels;
172172
non_occ_voxels.push_back(Vec3i(176, 91, 6));
@@ -176,7 +176,7 @@ TEST(MapUtilTest, TestIsOccupied) {
176176
non_occ_voxels.push_back(Vec3i(123, 158, 16));
177177
for (auto &vox : non_occ_voxels) {
178178
int idx = vox(0) + dim(0) * vox(1) + dim(0) * dim(1) * vox(2);
179-
base_map[idx] = planning_ros_msgs::VoxelMap::val_free;
179+
base_map[idx] = kr_planning_msgs::VoxelMap::val_free;
180180
}
181181

182182
// Initialize the MapUtil object with the previously created map
@@ -232,7 +232,7 @@ TEST(MapUtilTest, TestIsUnknown) {
232232
// Create a base map for the MapUtil object with val_unknown as the
233233
// default value
234234
std::vector<signed char> base_map(dim(0) * dim(1) * dim(2),
235-
planning_ros_msgs::VoxelMap::val_unknown);
235+
kr_planning_msgs::VoxelMap::val_unknown);
236236

237237
vec_Vec3i non_unknown_voxels;
238238
non_unknown_voxels.push_back(Vec3i(176, 91, 6));
@@ -242,7 +242,7 @@ TEST(MapUtilTest, TestIsUnknown) {
242242
non_unknown_voxels.push_back(Vec3i(123, 158, 16));
243243
for (auto &vox : non_unknown_voxels) {
244244
int idx = vox(0) + dim(0) * vox(1) + dim(0) * dim(1) * vox(2);
245-
base_map[idx] = planning_ros_msgs::VoxelMap::val_occ;
245+
base_map[idx] = kr_planning_msgs::VoxelMap::val_occ;
246246
}
247247

248248
// Initialize the MapUtil object with the previously created map
@@ -379,7 +379,7 @@ TEST(MapUtilTest, TestGetCloud) {
379379

380380
// Create a base map for the MapUtil object with val_free as the default value
381381
std::vector<signed char> base_map(dim(0) * dim(1) * dim(2),
382-
planning_ros_msgs::VoxelMap::val_free);
382+
kr_planning_msgs::VoxelMap::val_free);
383383

384384
vec_Vec3i occ_voxels;
385385
vec_Vec3f occ_cloud;
@@ -399,7 +399,7 @@ TEST(MapUtilTest, TestGetCloud) {
399399
occ_cloud.push_back(Vec3f(26.75, -31.25, -2.75));
400400
for (auto &vox : occ_voxels) {
401401
int idx = vox(0) + dim(0) * vox(1) + dim(0) * dim(1) * vox(2);
402-
base_map[idx] = planning_ros_msgs::VoxelMap::val_occ;
402+
base_map[idx] = kr_planning_msgs::VoxelMap::val_occ;
403403
}
404404

405405
// Initialize the MapUtil object with the previously created map
@@ -434,7 +434,7 @@ TEST(MapUtilTest, TestGetFreeCloud) {
434434

435435
// Create a base map for the MapUtil object with val_occ as the default value
436436
std::vector<signed char> base_map(dim(0) * dim(1) * dim(2),
437-
planning_ros_msgs::VoxelMap::val_occ);
437+
kr_planning_msgs::VoxelMap::val_occ);
438438

439439
vec_Vec3i free_voxels;
440440
vec_Vec3f free_cloud;
@@ -454,7 +454,7 @@ TEST(MapUtilTest, TestGetFreeCloud) {
454454
free_cloud.push_back(Vec3f(26.75, -31.25, -2.75));
455455
for (auto &vox : free_voxels) {
456456
int idx = vox(0) + dim(0) * vox(1) + dim(0) * dim(1) * vox(2);
457-
base_map[idx] = planning_ros_msgs::VoxelMap::val_free;
457+
base_map[idx] = kr_planning_msgs::VoxelMap::val_free;
458458
}
459459

460460
// Initialize the MapUtil object with the previously created map
@@ -489,7 +489,7 @@ TEST(MapUtilTest, TestGetUnkwownCloud) {
489489

490490
// Create a base map for the MapUtil object with val_free as the default value
491491
std::vector<signed char> base_map(dim(0) * dim(1) * dim(2),
492-
planning_ros_msgs::VoxelMap::val_free);
492+
kr_planning_msgs::VoxelMap::val_free);
493493

494494
vec_Vec3i unknown_voxels;
495495
vec_Vec3f unknown_cloud;
@@ -509,7 +509,7 @@ TEST(MapUtilTest, TestGetUnkwownCloud) {
509509
unknown_cloud.push_back(Vec3f(26.75, -31.25, -2.75));
510510
for (auto &vox : unknown_voxels) {
511511
int idx = vox(0) + dim(0) * vox(1) + dim(0) * dim(1) * vox(2);
512-
base_map[idx] = planning_ros_msgs::VoxelMap::val_unknown;
512+
base_map[idx] = kr_planning_msgs::VoxelMap::val_unknown;
513513
}
514514

515515
// Initialize the MapUtil object with the previously created map

0 commit comments

Comments
 (0)