Skip to content

Commit f663cf6

Browse files
committed
read sim configs
1 parent c93cd95 commit f663cf6

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ install(TARGETS
161161
websocket
162162
DESTINATION lib/${PROJECT_NAME})
163163

164+
# Copy simulator configs
165+
install(DIRECTORY
166+
config
167+
DESTINATION share/${PROJECT_NAME}
168+
OPTIONAL)
169+
164170
# ROS 2 package finalization
165171
# Install launch files, config files, etc.
166172
install(DIRECTORY

src/simulator/simulator.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ using vector_map::VectorMap;
7070
DEFINE_bool(localize, false, "Publish localization");
7171

7272
const string kAmrlMapsDir = ament_index_cpp::get_package_share_directory("amrl_maps");
73+
const string kConfigDir = ament_index_cpp::get_package_share_directory("ut_automata");
7374

7475
CONFIG_STRING(cMapName, "map_name");
7576
CONFIG_FLOAT(cCarLength, "car_length");
@@ -93,7 +94,8 @@ CONFIG_FLOAT(cAngularErrorRate, "angular_error_rate");
9394
CONFIG_FLOAT(cMaxLaserRange, "max_laser_range");
9495
CONFIG_FLOAT(cLaserAngleIncrement, "laser_angle_increment");
9596
CONFIG_FLOAT(cLaserFOV, "laser_fov");
96-
config_reader::ConfigReader reader({"config/simulator.lua"});
97+
98+
config_reader::ConfigReader reader({kConfigDir + "/config/simulator.lua"});
9799

98100
string MapNameToFile(const string& map) {
99101
return kAmrlMapsDir + "/" + map + "/" + map + ".vectormap.txt";

0 commit comments

Comments
 (0)