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

Improve rosout logging #50

Merged
merged 6 commits into from
Nov 26, 2021
Merged

Improve rosout logging #50

merged 6 commits into from
Nov 26, 2021

Conversation

icolwell-as
Copy link
Member

Resolves #38 by improving the rosout logging.

  • Make use of ROS_DEBUG API instead of a special debug_print parameter.
  • Improve the output that is generated from configuration and re-configuration via dynamic reconfigure.
  • Improve the output when the vimba system starts up and looks for cameras.
  • Re-arrange and refactor a bit of related code while I was there.
  • Remove code/output that isn't very useful.

std::string accessModeToString(VmbAccessModeType modeType) {
std::string s;
if (modeType & VmbAccessModeFull)
s = std::string("Read and write access");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about return \"Read and write access\" so it matches interfaceToString function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! this function was just moved from another file, I'll improve it though.

CameraPtrVector cameras;
if (VmbErrorSuccess == vs.Startup()) {
if (VmbErrorSuccess == vs.GetCameras(cameras)) {
for (CameraPtrVector::iterator iter = cameras.begin();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about for (const auto& camera : cameras)?

@@ -142,7 +141,7 @@ class AvtVimbaCamera {
std::string trigger_source_;
int trigger_source_int_;

CameraPtr openCamera(std::string id_str);
CameraPtr openCamera(std::string id_str, bool print_all_features);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const std::string&

@dvangeyn-as
Copy link

Much cleaner to read now. Appreciate that.

@icolwell-as icolwell-as merged commit ab14601 into master Nov 26, 2021
@icolwell-as icolwell-as deleted the 38_improve_rosout_logging branch November 26, 2021 20:48
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.

Improve rosout/logging output
3 participants