48 MoveItSetupTest::SetUp();
49 config_data_->registerType(
"sensors",
"moveit_setup::app::PerceptionConfig");
63 EXPECT_EQ(sensors_config->getSensorPluginConfig().size(), 0u);
66 auto configs = sensors_config->load3DSensorsYAML(default_yaml_path_);
70 ASSERT_EQ(configs.size(), 2u);
72 EXPECT_EQ(configs[0][
"sensor_plugin"], std::string(
"occupancy_map_monitor/PointCloudOctomapUpdater"));
74 EXPECT_EQ(configs[1][
"sensor_plugin"], std::string(
"occupancy_map_monitor/DepthImageOctomapUpdater"));
83 EXPECT_EQ(sensors_config->getSensorPluginConfig().size(), 0u);
85 generateFiles<PerceptionConfig>(
"sensors");
87 std::filesystem::path generated = output_dir_ /
"config/sensors_3d.yaml";
89 ASSERT_TRUE(std::filesystem::is_regular_file(generated));
91 sensors_config->loadPrevious(std::filesystem::path(
"fake_path"), YAML::Node());
94 EXPECT_EQ(sensors_config->getSensorPluginConfig().size(), 2u);
96 generateFiles<PerceptionConfig>(
"sensors");
101 int main(
int argc,
char** argv)
103 testing::InitGoogleTest(&argc, argv);
104 rclcpp::init(argc, argv);
105 return RUN_ALL_TESTS();
std::filesystem::path templates_path_
std::filesystem::path default_yaml_path_
Test environment with DataWarehouse setup and help for generating files in a temp dir.
moveit_setup::DataWarehousePtr config_data_
std::filesystem::path getSharePath(const std::string &package_name)
Return a path for the given package's share folder.
void expectYamlEquivalence(const YAML::Node &generated, const YAML::Node &reference, const std::filesystem::path &generated_path, const std::string &yaml_namespace="")
int main(int argc, char **argv)
TEST_F(PerceptionTest, ReadingSensorsConfig)