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(perception_online_evaluator): fix build error #6595

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Mar 12, 2024

Description

Fix -Werror=deprecated-declarations error.

In file included from /opt/ros/humble/include/rclcpp/rclcpp/subscription_base.hpp:32,                                                                                                                                                                                                                                                                                                                                           
                 from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:29,                                                                                                                                                                                                                                                                                                                                              
                 from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,                                                                                                                                                                                                                                                                                                                                              
                 from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,                                                                                                                                                                                                                                                                                                                                             
                 from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,                                                                                                                                                                                                                                                                                                                                           
                 from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,                                                                                                                                                                                                                                                                                                                                            
                 from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,                                                                                                                                                                                                                                                                                                                                                    
                 from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,                                                                                                                                                                                                                                                                                                                           
                 from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,                                                                                                                                                                                                                                                                                                                                                   
                 from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,                                                                                                                                                                                                                                                                                                                                                     
                 from /home/satoshi/pilot-auto/src/autoware/universe/evaluator/perception_online_evaluator/test/test_perception_online_evaluator_node.cpp:15:                                                                                                                                                                                                                                                                   
/opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp: In instantiation of ‘rclcpp::AnySubscriptionCallback<MessageT, AllocatorT> rclcpp::AnySubscriptionCallback<MessageT, AllocatorT>::set(CallbackT) [with CallbackT = EvalTest::SetUp()::<lambda(visualization_msgs::msg::MarkerArray_<std::allocator<void> >::SharedPtr)>; MessageT = visualization_msgs::msg::MarkerArray_<std::allocator<void> >; Allocator
T = std::allocator<void>]’:                                                                                                                                                                                                                                                                                                                                                                                                     
/opt/ros/humble/include/rclcpp/rclcpp/subscription_factory.hpp:94:32:   required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<ROSMessageType> >) [with MessageT = visualization_msgs::msg::MarkerArray_<std
::allocator<void> >; CallbackT = EvalTest::SetUp()::<lambda(visualization_msgs::msg::MarkerArray_<std::allocator<void> >::SharedPtr)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<visualization_msgs::msg::MarkerArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<visualization_msgs::msg::MarkerArray_<std::allocator<void> >, std
::allocator<void> >; ROSMessageType = visualization_msgs::msg::MarkerArray_<std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<visualization_msgs::msg::MarkerArray_<std::allocator<void> >, std::allocator<void> > >]’                                                                                                                
/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp:122:63:   required from ‘std::shared_ptr<ROSMessageT> rclcpp::detail::create_subscription(NodeParametersT&, NodeTopicsT&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = visualization_msgs::msg::MarkerArray_<std::allocator<void> >; 
CallbackT = EvalTest::SetUp()::<lambda(visualization_msgs::msg::MarkerArray_<std::allocator<void> >::SharedPtr)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<visualization_msgs::msg::MarkerArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<visualization_msgs::msg::MarkerArray_<std::allocator<void> >, std::allocator<void> >; 
NodeParametersT = std::shared_ptr<rclcpp::Node>; NodeTopicsT = std::shared_ptr<rclcpp::Node>; ROSMessageType = visualization_msgs::msg::MarkerArray_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<visualization_msgs::msg::MarkerArray_<std::allocator<void> >, std::allocator<vo
id> > >]’                                                                                                                                                                                                                                                                                                                                                                                                                       
/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp:191:76:   required from ‘std::shared_ptr<ROSMessageT> rclcpp::create_subscription(NodeT&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = visualization_msgs::msg::MarkerArray_<std::allocator<void> >; CallbackT = EvalTest::SetUp()::<
lambda(visualization_msgs::msg::MarkerArray_<std::allocator<void> >::SharedPtr)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<visualization_msgs::msg::MarkerArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<visualization_msgs::msg::MarkerArray_<std::allocator<void> >, std::allocator<void> >; NodeT = std::shared_ptr<rclcpp::
Node>; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<visualization_msgs::msg::MarkerArray_<std::allocator<void> >, std::allocator<void> > >]’                                                                                                                                                             
/home/satoshi/pilot-auto/src/autoware/universe/evaluator/perception_online_evaluator/test/test_perception_online_evaluator_node.cpp:80:59:   required from here                                                                                                                                                                                                                                                                 
/opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp:391:21: error: ‘void rclcpp::AnySubscriptionCallback<MessageT, AllocatorT>::set_deprecated(std::function<void(std::shared_ptr<_Yp>)>) [with SetT = visualization_msgs::msg::MarkerArray_<std::allocator<void> >; MessageT = visualization_msgs::msg::MarkerArray_<std::allocator<void> >; AllocatorT = std::allocator<void>]’ is deprecated: use 'void(std::
shared_ptr<const MessageT>)' instead [-Werror=deprecated-declarations]                                                                                                                                                                                                                                                                                                                                                          
  391 |       set_deprecated(static_cast<typename scbth::callback_type>(callback));                                                                                                                                                                                                                                                                                                                                             
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                              
/opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp:408:3: note: declared here                                                                                                                                                                                                                                                                                                                                  
  408 |   set_deprecated(std::function<void(std::shared_ptr<SetT>)> callback)                                                                                                                                                                                                                                                                                                                                                   
      |   ^~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                                                                                        
cc1plus: all warnings being treated as errors                                                                                                                                                                                                                                                                                                                                                                                   
gmake[2]: *** [CMakeFiles/test_perception_online_evaluator.dir/build.make:76: CMakeFiles/test_perception_online_evaluator.dir/test/test_perception_online_evaluator_node.cpp.o] Error 1                                                                                                                                                                                                                                         
gmake[1]: *** [CMakeFiles/Makefile2:241: CMakeFiles/test_perception_online_evaluator.dir/all] Error 2                                                                                                                                                                                                                                                                                                                           
gmake: *** [Makefile:146: all] Error 2

Tests performed

Confirmed it was able to build without error.

Effects on system behavior

Nothing.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@github-actions github-actions bot added the component:evaluator Evaluation tools for planning, localization etc. (auto-assigned) label Mar 12, 2024
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 12, 2024
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 14.80%. Comparing base (5adc394) to head (58615e3).
Report is 1 commits behind head on main.

Files Patch % Lines
...tor/test/test_perception_online_evaluator_node.cpp 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6595   +/-   ##
=======================================
  Coverage   14.80%   14.80%           
=======================================
  Files        1915     1915           
  Lines      132252   132253    +1     
  Branches    39317    39317           
=======================================
+ Hits        19576    19577    +1     
  Misses      90845    90845           
  Partials    21831    21831           
Flag Coverage Δ *Carryforward flag
differential 47.92% <50.00%> (?)
total 14.80% <ø> (+<0.01%) ⬆️ Carriedforward from 5adc394

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kosuke55 kosuke55 merged commit 94bbe3a into autowarefoundation:main Mar 12, 2024
39 checks passed
@kosuke55 kosuke55 deleted the fix/deprecated-declaration branch March 12, 2024 01:38
kaigohirao pushed a commit to kaigohirao/autoware.universe that referenced this pull request Mar 22, 2024
…#6595)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: kaigohirao <kaigo.hirao@proxima-ai-tech.com>
badai-nguyen pushed a commit to tier4/autoware.universe that referenced this pull request Apr 23, 2024
…#6595)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
badai-nguyen pushed a commit to tier4/autoware.universe that referenced this pull request Apr 23, 2024
…#6595)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
badai-nguyen pushed a commit to tier4/autoware.universe that referenced this pull request May 9, 2024
…#6595)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…#6595)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:evaluator Evaluation tools for planning, localization etc. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants