stderr.log 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. In file included from /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.cpp:34:
  2. /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.h: In constructor ‘Joystick_pub::Joystick_pub(const string&, const string&)’:
  3. /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.h:57:17: warning: ‘Joystick_pub::filename’ will be initialized after []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wreorder-Wreorder]8;;]
  4. 57 | std::string filename; // 设备文件名
  5. | ^~~~~~~~
  6. /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.cpp:39:41: warning:  base ‘rclcpp::Node’ []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wreorder-Wreorder]8;;]
  7. 39 | : filename(filename), Node(node_name) // 初始化成员变量 filename
  8. | ^
  9. /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.cpp:38:1: warning:  when initialized here []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wreorder-Wreorder]8;;]
  10. 38 | Joystick_pub::Joystick_pub(const std::string &filename, const std::string &node_name)
  11. | ^~~~~~~~~~~~
  12. /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.cpp: In member function ‘void Joystick_pub::publish()’:
  13. /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.cpp:160:22: error: no match for ‘operator=’ (operand types are ‘sensor_msgs::msg::Joy_<std::allocator<void> >::_buttons_type’ {aka ‘std::vector<int>’} and ‘int’)
  14. 160 | message.buttons = heartbeat;
  15. | ^~~~~~~~~
  16. In file included from /usr/include/c++/11/vector:72,
  17. from /usr/include/c++/11/functional:62,
  18. from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
  19. from /usr/include/c++/11/algorithm:74,
  20. from /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.cpp:21:
  21. /usr/include/c++/11/bits/vector.tcc:198:5: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]’
  22. 198 | vector<_Tp, _Alloc>::
  23. | ^~~~~~~~~~~~~~~~~~~
  24. /usr/include/c++/11/bits/vector.tcc:199:42: note:  no known conversion for argument 1 from ‘int’ to ‘const std::vector<int>&’
  25. 199 | operator=(const vector<_Tp, _Alloc>& __x)
  26. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
  27. In file included from /usr/include/c++/11/vector:67,
  28. from /usr/include/c++/11/functional:62,
  29. from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
  30. from /usr/include/c++/11/algorithm:74,
  31. from /home/wub/work/1_nzzn/2_code/13_LG/src/Drive/g29_ros2_feedback_drive/src/g29_ros2_feedback/src/joystick.cpp:21:
  32. /usr/include/c++/11/bits/stl_vector.h:709:7: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]’
  33. 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
  34. | ^~~~~~~~
  35. /usr/include/c++/11/bits/stl_vector.h:709:26: note:  no known conversion for argument 1 from ‘int’ to ‘std::vector<int>&&’
  36. 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
  37. | ~~~~~~~~~^~~
  38. /usr/include/c++/11/bits/stl_vector.h:730:7: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]’
  39. 730 | operator=(initializer_list<value_type> __l)
  40. | ^~~~~~~~
  41. /usr/include/c++/11/bits/stl_vector.h:730:46: note:  no known conversion for argument 1 from ‘int’ to ‘std::initializer_list<int>’
  42. 730 | operator=(initializer_list<value_type> __l)
  43. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
  44. gmake[2]: *** [CMakeFiles/g29_ros2_feedback_node.dir/build.make:90:CMakeFiles/g29_ros2_feedback_node.dir/src/joystick.cpp.o] 错误 1
  45. gmake[1]: *** [CMakeFiles/Makefile2:137:CMakeFiles/g29_ros2_feedback_node.dir/all] 错误 2
  46. gmake: *** [Makefile:146:all] 错误 2