ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

when run colcon build Nav2_util package i have a error

asked 2023-04-14 10:05:04 -0500

Venkat gravatar image

here is error definition
--- stderr: nav2_util
In file included from /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/lifecycle_service_client.hpp:24, from /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/src/lifecycle_service_client.cpp:15: /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp: In constructor ‘nav2_util::ServiceClient<servicet>::ServiceClient(const string&, const SharedPtr&)’: /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:51:17: error: expected primary-expression before ‘qos_profile’ 51 | rclcpp::QoS qos_profile(rclcpp::SystemDefaultsQoS()); | ^~~~~~~~~~~ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:51:17: error: expected ‘)’ before ‘qos_profile’ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:50:5: note: to match this ‘(’ 50 | ( | ^ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:52:60: error: ‘qos_profile’ was not declared in this scope 52 | client_ = node_->create_client<servicet>(service_name, qos_profile); | ^~~~~~~~~~~ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:54:22: error: expected ‘;’ before ‘)’ token 54 | callback_group_) | ^ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp: In function ‘int main(int, char)’: /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:168:26: error: parentheses were disambiguated as a function declaration [-Werror=vexing-parse] 168 | rclcpp::QoS qos_profile(rclcpp::SystemDefaultsQoS()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:168:26: note: replace parentheses with braces to declare a variable 168 | rclcpp::QoS qos_profile(rclcpp::SystemDefaultsQoS()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | - | { - | } /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:172:38: error: no matching function for call to ‘nav2_util::ServiceClient<lifecycle_msgs::srv::changestate>::ServiceClient(const char [13], std::shared_ptr<rclcpp::node>&, rclcpp::QoS (&)(rclcpp::SystemDefaultsQoS ()()))’ 172 | "change_state", node, qos_profile); | ^ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:41:12: note: candidate: ‘nav2_util::ServiceClient<servicet>::ServiceClient(const string&, const SharedPtr&) [with ServiceT = lifecycle_msgs::srv::ChangeState; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::node>]’ 41 | explicit ServiceClient( | ^~~~~~~~~~~~~ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:41:12: note: candidate expects 2 arguments, 3 provided /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp: In instantiation of ‘nav2_util::ServiceClient<servicet>::ServiceClient(const string&, const SharedPtr&) [with ServiceT = lifecycle_msgs::srv::ChangeState; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::node>]’: /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/src/lifecycle_service_client.cpp:35:3: required from here /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:54:7: error: statement has no effect [-Werror=unused-value] 54 | callback_group_) | ^~~~~~~~~~~~~~~ /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp: In instantiation of ‘nav2_util::ServiceClient<servicet>::ServiceClient(const string&, const SharedPtr&) [with ServiceT = lifecycle_msgs::srv::GetState; std::string = std::__cxx11::basic_string<char>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::node>]’: /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/src/lifecycle_service_client.cpp:36:3: required from here /home/ve/agriculture_ugv_ws/src/navigation2/nav2_util/include/nav2_util/service_client.hpp:54:7: error: statement has no effect [-Werror=unused-value] cc1plus: all warnings being treated as errors gmake[2]: * [src/CMakeFiles/nav2_util_core.dir/build.make:104: src/CMakeFiles/nav2_util_core.dir/lifecycle_service_client.cpp.o] Error 1 gmake[1]: ** [CMakeFiles/Makefile2:210: src/CMakeFiles/nav2_util_core.dir/all] Error 2

gmake: * [Makefile:146: all ...

(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-04-14 10:39:18 -0500

You're probably trying to compile the wrong branch for your distribution.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2023-04-14 10:05:04 -0500

Seen: 68 times

Last updated: Apr 14 '23