-
Notifications
You must be signed in to change notification settings - Fork 17
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
RSDK-5334 - Remove unused code #317
RSDK-5334 - Remove unused code #317
Conversation
e6f1cd9
to
fe403c4
Compare
std::string filename = | ||
"temp_internal_state_" + boost::uuids::to_string(uuid) + ".pbstream"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be in a tmp dir?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - I think so. @JohnN193 can you take a look and confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think having a temp dir just adds more for us to cleanup, but if its better practice to use one then thats fine with me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better practice - for linux machines anything in that directory will get cleaned up during boot according to https://linuxhandbook.com/tmp-directory/amp/
This would at least protect us on some machines in the case of a crash before cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just had one question
@@ -28,6 +28,7 @@ const SensorId kOdometerSensorId{SensorId::SensorType::ODOMETRY, "odometry"}; | |||
|
|||
class MapBuilder { | |||
public: | |||
MapBuilder() : trajectory_builder(){}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[q] what does adding this here do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The valgrind test was complaining that trajectory_builder
was not initialized but used in an if-statement (Conditional jump or move depends on uninitialised value(s)
), which happens when we error out here.
This change initializes trajectory_builder
to nullptr
and fixes the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Ticket: https://viam.atlassian.net/browse/RSDK-5334
Done:
data_dir
,cloud_story_enabled
,map_rate_sec
Tested on: