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

Add pblog args #47

Merged
merged 7 commits into from
May 3, 2023
Merged

Add pblog args #47

merged 7 commits into from
May 3, 2023

Conversation

andermi
Copy link
Collaborator

@andermi andermi commented Apr 12, 2023

and other fixes

required by osrf/mbari_wec_gz#140

@andermi andermi changed the base branch from main to henthorn/sim_pblog April 12, 2023 01:46
Signed-off-by: Michael Anderson <[email protected]>
Signed-off-by: Michael Anderson <[email protected]>
@mabelzhang mabelzhang linked an issue Apr 12, 2023 that may be closed by this pull request
@hamilton8415 hamilton8415 mentioned this pull request May 2, 2023
@hamilton8415
Copy link
Collaborator

This looks good, I will open the discussion about where the best default spot for the files is. Perhaps a directory called ~/logs would be sensible, it matches the buoy, and also keeps things from not being dependent upon where one starts things from. Pros and cons here, perhaps fine as is, especially as the batch-file processing (#140) is over-riding this location...

@andermi
Copy link
Collaborator Author

andermi commented May 3, 2023

best default spot for the files

Other options would be in the colcon workspace logs directory that already exists. Or, in ~/.ros/logs

@hamilton8415
Copy link
Collaborator

I think the workspace logs should be kept for their build process, I often delete that if I need a fresh start. Maybe similar for .ros/logs, and these logs aren't ros. maybe ~/.pblogs/... ?

@andermi
Copy link
Collaborator Author

andermi commented May 3, 2023

~/.pblogs sounds good

@andermi
Copy link
Collaborator Author

andermi commented May 3, 2023

@hamilton8415 ready for another check

Signed-off-by: Michael Anderson <[email protected]>
@hamilton8415
Copy link
Collaborator

Hmm, After pulling mbari_wec_gz and mbari_wec_util when I run it I am now seeing now files in the pblog directory (running with the batch proccessor). Also, previous to that I noticed that the log files are only outputing new data every second, this was with a RTF of 11, so perhaps it's using wall clock to update the output instead of sim time. That may be an issue in #40 rather than here...

@andermi
Copy link
Collaborator Author

andermi commented May 3, 2023

I'm not sure I follow about the pblog files with batch.

Regarding the logger rate, I did realize I forgot to mention the sim /clock or setting the use_sim_time parameter in the template/controller tutorials. I also neglected to mention to @rhenthorn that he could grab sim time from self.get_clock() after setting the use_sim_time param. So, yes the code is currently using wall time and updating based on the timestamp in the ROS 2 message headers. So there may be something tricky there.

@andermi
Copy link
Collaborator Author

andermi commented May 3, 2023

@hamilton8415 @rhenthorn I think if we are happy with the changes in this specific branch, we could merge to #44 and fix the rest there.

@hamilton8415
Copy link
Collaborator

Yes, I think your suggested merge into #44 won't hurt us, consolidation...

@andermi andermi merged commit a6ad9cb into henthorn/sim_pblog May 3, 2023
@andermi andermi deleted the andermi/add_pblog_args branch May 3, 2023 22:43
@andermi
Copy link
Collaborator Author

andermi commented May 3, 2023

Done. We can continue updates/fixes in #44

andermi added a commit that referenced this pull request May 29, 2023
* Created buoy-type logging for buoy_sim

* Clean up formatting to match buoy logging

* Fix flake8 and pep8 erros

* Fix flake8 and pep8 errors 2

* Fix flake8 and pep8 errors 3

* Formatting erros in launch script - empty line needed

* Add epoch seconds offset to simulation time, log that value as the timestamp

* Corrected header line

* Move log home and file interval to class attributes

* Add pblog args (#47)

* add launch args for log paths; add ros2 param for interval; fix symlinks; add rosdeps

Signed-off-by: Michael Anderson <[email protected]>

* Update package.xml

fix rosdep

* fix atexit gzip

Signed-off-by: Michael Anderson <[email protected]>

* linter

Signed-off-by: Michael Anderson <[email protected]>

* update default pblog root; stop gzipping at exit; fix gzipping at start

Signed-off-by: Michael Anderson <[email protected]>

* remove unused import

Signed-off-by: Michael Anderson <[email protected]>

* Correct faulty CrossbowID value from 5 to 3

---------

Signed-off-by: Michael Anderson <[email protected]>
Co-authored-by: Rich Henthorn <[email protected]>

* Corrected error: using pc_header to calculate the 'blank' cells in a record when xb_header, bc_header, and sc_header should have been used

* tweak msg time a little

Signed-off-by: Michael Anderson <[email protected]>

* Fix pbcmd terminate (#50)

* add async proxy to await future for pack rate calls

Signed-off-by: Michael Anderson <[email protected]>

* typo

Signed-off-by: Michael Anderson <[email protected]>

---------

Signed-off-by: Michael Anderson <[email protected]>

* line buffered csv

Signed-off-by: Michael Anderson <[email protected]>

* linter

Signed-off-by: Michael Anderson <[email protected]>

* Update sim_pblog/sim_pblog/sim_pblog.py

* fix data loss with log rolling

Signed-off-by: Michael Anderson <[email protected]>

* bugfix

Signed-off-by: Michael Anderson <[email protected]>

* linter

Signed-off-by: Michael Anderson <[email protected]>

* linter

Signed-off-by: Michael Anderson <[email protected]>

* Convert SC values from newtons and meters to lbs and inches

---------

Signed-off-by: Michael Anderson <[email protected]>
Co-authored-by: Michael Anderson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log files
3 participants