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

InitOptions::auto_initialize_logging(true) does not work with assignment operator. #1258

Closed
fujitatomoya opened this issue Aug 4, 2020 · 1 comment · Fixed by #1272
Closed
Labels
bug Something isn't working

Comments

@fujitatomoya
Copy link
Collaborator

Bug report

  • Operating System:
    • Ubuntu20.04
  • Installation type:
    • source build
  • Version or commit hash:
  • DDS implementation:
    • N.A
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

  • build the following test.
int main(int argc, char * argv[])
{
  rclcpp::init(argc, argv);
  auto options = rclcpp::InitOptions().auto_initialize_logging(false);
  if (options.auto_initialize_logging()) {
    std::cout << "options.auto_initialize_logging() is true\n";
    return EXIT_FAILURE;
  } else {
    std::cout << "options.auto_initialize_logging() is false\n";
    return EXIT_SUCCESS;
  }
}
  • run application
# ros2 run ros2_test_prover tmp
options.auto_initialize_logging() is true

Expected behavior

# ros2 run ros2_test_prover tmp
options.auto_initialize_logging() is false

Actual behavior

# ros2 run ros2_test_prover tmp
options.auto_initialize_logging() is true

Additional information

initialize_logging_ should be copied via constructor and assignment operator =. also it would be better to add test.

fujitatomoya added a commit to fujitatomoya/ros2_test_prover that referenced this issue Aug 4, 2020
…ent operator.

  ros2/rclcpp#1258

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link
Collaborator Author

i will be working on this after #1165.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants