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

Fix timestamp logging for the cameras #748

Merged
merged 2 commits into from
Nov 3, 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ All notable changes to this project are documented in this file.
- Modify CI to install `RobotDynamicsEstimator` library (https://github.com/ami-iit/bipedal-locomotion-framework/pull/746)
- Restructure the balancing-position-control script (https://github.com/ami-iit/bipedal-locomotion-framework/pull/716)

### Fixed
- Fix timestamp logging for the cameras (https://github.com/ami-iit/bipedal-locomotion-framework/pull/748)

## [0.15.0] - 2023-09-05
### Added
- 🤖 Add the configuration files to use `YarpRobotLogger` with `ergoCubGazeboV1` (https://github.com/ami-iit/bipedal-locomotion-framework/pull/690)
Expand Down
10 changes: 5 additions & 5 deletions devices/YarpRobotLoggerDevice/src/YarpRobotLoggerDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ VISITABLE_STRUCT(TextLoggingEntry,
yarprun_timestamp,
local_timestamp);

void findAndReplaceAll(std::string& data, std::string toSearch, std::string replaceStr)
void findAndReplaceAll(std::string& data, const std::string& toSearch, const std::string& replaceStr)
{
// Get the first occurrence
size_t pos = data.find(toSearch);
Expand Down Expand Up @@ -1120,8 +1120,8 @@ void YarpRobotLoggerDevice::recordVideo(const std::string& cameraName, VideoWrit
std::lock_guard lock(m_bufferManagerMutex);

// TODO here we may save the frame itself
m_bufferManager.push_back(time.count(),
time.count(),
m_bufferManager.push_back(std::chrono::duration<double>(time).count(),
std::chrono::duration<double>(time).count(),
"camera::" + cameraName + "::rgb");
}
}
Expand Down Expand Up @@ -1167,8 +1167,8 @@ void YarpRobotLoggerDevice::recordVideo(const std::string& cameraName, VideoWrit
std::lock_guard lock(m_bufferManagerMutex);

// TODO here we may save the frame itself
m_bufferManager.push_back(time.count(),
time.count(),
m_bufferManager.push_back(std::chrono::duration<double>(time).count(),
std::chrono::duration<double>(time).count(),
"camera::" + cameraName + "::depth");
}
}
Expand Down
Loading