Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error output from esmini to log #593

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion launch/launch_utils/validate_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def validate_certs(directory_path):

def validate_files():
atos_dir = os.path.join(os.path.expanduser('~'), '.astazero', 'ATOS')
dirs_to_validate = ["conf", "pointclouds"]
dirs_to_validate = ["conf", "pointclouds", "logs"]
for dir_to_validate in dirs_to_validate:
validate_directory(atos_dir / Path(dir_to_validate))

Expand Down
4 changes: 3 additions & 1 deletion modules/EsminiAdapter/src/esminiadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,13 @@ void EsminiAdapter::InitializeEsmini()
me->idToIp.clear();
me->pathPublishers.clear();
me->gnssPathPublishers.clear();
auto logFilePath = std::string(getenv("HOME")) + std::string("/.astazero/ATOS/logs/esmini.log");
SE_SetLogFilePath(logFilePath.c_str());
SE_Close(); // Stop ScenarioEngine in case it is running

RCLCPP_INFO(me->get_logger(), "Initializing esmini with scenario file %s", me->oscFilePath.c_str());
if (SE_Init(me->oscFilePath.c_str(),1,0,0,0) < 0) { // Disable controllers, let DefaultController be used
throw std::runtime_error("Failed to initialize esmini with scenario file " + me->oscFilePath.string());
throw std::runtime_error("Failed to initialize esmini with scenario file " + me->oscFilePath.string() + ". For more information, see " + logFilePath + ".");
}

for (int j = 0; j < SE_GetNumberOfObjects(); j++){
Expand Down