hijimasa / blv_ros2_samples

This packages are ROS2 samples to control BLV motors made by Oriental Motor Corporation.
MIT License
1 stars 0 forks source link

blvr_hardware package is not building #1

Open souravchandrasaha opened 1 year ago

souravchandrasaha commented 1 year ago

colcon build --symlink-install Starting >>> blv_diffbot_description Starting >>> blv_diffbot_hardware Finished <<< blv_diffbot_description [11.9s]
Starting >>> blv_diffbot_sim Finished <<< blv_diffbot_sim [4.12s]
Starting >>> blv_diffbot_bringup Finished <<< blv_diffbot_bringup [4.48s]
--- stderr: blv_diffbot_hardware
In file included from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:15: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:44:18: error: ‘CallbackReturn blv_diffbot_hardware::BlvDiffbotSystemHardware::on_init(const hardware_interface::HardwareInfo&)’ marked ‘override’, but does not override 44 | CallbackReturn on_init(const hardware_interface::HardwareInfo & info) override; | ^~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:53:18: error: ‘CallbackReturn blv_diffbot_hardware::BlvDiffbotSystemHardware::on_activate(const rclcpp_lifecycle::State&)’ marked ‘override’, but does not override 53 | CallbackReturn on_activate(const rclcpp_lifecycle::State & previous_state) override; | ^~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:56:18: error: ‘CallbackReturn blv_diffbot_hardware::BlvDiffbotSystemHardware::on_deactivate(const rclcpp_lifecycle::State&)’ marked ‘override’, but does not override 56 | CallbackReturn on_deactivate(const rclcpp_lifecycle::State & previous_state) override; | ^~~~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:59:35: error: ‘hardware_interface::return_type blv_diffbot_hardware::BlvDiffbotSystemHardware::read(const rclcpp::Time&, const rclcpp::Duration&)’ marked ‘override’, but does not override 59 | hardware_interface::return_type read(const rclcpp::Time & time, const rclcpp::Duration & period) override; | ^~~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:62:35: error: ‘hardware_interface::return_type blv_diffbot_hardware::BlvDiffbotSystemHardware::write(const rclcpp::Time&, const rclcpp::Duration&)’ marked ‘override’, but does not override 62 | hardware_interface::return_type write(const rclcpp::Time & time, const rclcpp::Duration & period) override; | ^~~~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp: In member function ‘CallbackReturn blv_diffbot_hardware::BlvDiffbotSystemHardware::on_init(const hardware_interface::HardwareInfo&)’: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:30:44: error: ‘on_init’ is not a member of ‘hardware_interface::SystemInterface’ 30 | if (hardware_interface::SystemInterface::on_init(info) != CallbackReturn::SUCCESS) | ^~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbotsystem.cpp:35:24: error: ‘info’ was not declared in this scope; did you mean ‘info’? 35 | hw_startsec = stod(info_.hardware_parameters["example_param_hw_start_duration_sec"]); | ^~~~~ | info /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:35:19: error: ‘stod’ was not declared in this scope; did you mean ‘std::cxx11::stod’? 35 | hw_startsec = stod(info_.hardware_parameters["example_param_hw_start_duration_sec"]); | ^~~~ | std::cxx11::stod In file included from /usr/include/c++/9/string:55, from /usr/include/c++/9/stdexcept:39, from /usr/include/c++/9/array:39, from /usr/include/c++/9/tuple:39, from /usr/include/c++/9/bits/unique_ptr.h:37, from /usr/include/c++/9/memory:80, from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:18, from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:15: /usr/include/c++/9/bits/basic_string.h:6642:3: note: ‘std::cxx11::stod’ declared here 6642 | stod(const wstring& str, size_t* __idx = 0) | ^~~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp: In member function ‘virtual std::vector blv_diffbot_hardware::BlvDiffbotSystemHardware::export_state_interfaces()’: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbotsystem.cpp:113:25: error: ‘info’ was not declared in this scope 113 | for (auto i = 0u; i < info_.joints.size(); i++) | ^~~~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp: In member function ‘virtual std::vector blv_diffbot_hardware::BlvDiffbotSystemHardware::export_command_interfaces()’: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbotsystem.cpp:129:25: error: ‘info’ was not declared in this scope 129 | for (auto i = 0u; i < info_.joints.size(); i++) | ^~~~~ In file included from /opt/ros/foxy/include/rclcpp/client.hpp:40, from /opt/ros/foxy/include/rclcpp/callback_group.hpp:23, from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20, from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24, from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18, from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20, from /opt/ros/foxy/include/rclcpp/executor.hpp:33, from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26, from /opt/ros/foxy/include/rclcpp/executors.hpp:21, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146, from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:22, from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:15: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp: In member function ‘hardware_interface::return_type blv_diffbot_hardware::BlvDiffbotSystemHardware::read(const rclcpp::Time&, const rclcpp::Duration&)’: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbotsystem.cpp:219:26: error: ‘info’ was not declared in this scope 219 | hwvelocities[i], info_.joints[i].name.c_str()); | ^~~~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:191:85: warning: unused parameter ‘time’ [-Wunused-parameter] 191 | urn_type BlvDiffbotSystemHardware::read(const rclcpp::Time & time, const rclcpp::Duration & period) | ~~~~~^~~~

In file included from /opt/ros/foxy/include/rclcpp/client.hpp:40, from /opt/ros/foxy/include/rclcpp/callback_group.hpp:23, from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20, from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24, from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18, from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20, from /opt/ros/foxy/include/rclcpp/executor.hpp:33, from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26, from /opt/ros/foxy/include/rclcpp/executors.hpp:21, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146, from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:22, from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:15: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp: In member function ‘hardware_interface::return_type blv_diffbot_hardware::BlvDiffbotSystemHardware::write(const rclcpp::Time&, const rclcpp::Duration&)’: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbotsystem.cpp:250:7: error: ‘info’ was not declared in this scope 250 | info_.joints[i].name.c_str()); | ^~~~~ /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:225:86: warning: unused parameter ‘time’ [-Wunused-parameter] 225 | rn_type BlvDiffbotSystemHardware::write(const rclcpp::Time & time, const rclcpp::Duration & period) | ~~~~~^~~~

/home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:225:117: warning: unused parameter ‘period’ [-Wunused-parameter] 225 | e::write(const rclcpp::Time & time, const rclcpp::Duration & period) | ~~~~~^~

In file included from /opt/ros/foxy/include/class_loader/class_loader_core.hpp:57, from /opt/ros/foxy/include/class_loader/class_loader.hpp:55, from /opt/ros/foxy/include/pluginlib/class_list_macros.hpp:40, from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:259: /opt/ros/foxy/include/class_loader/meta_object.hpp: In instantiation of ‘B* class_loader::impl::MetaObject<C, B>::create() const [with C = blv_diffbot_hardware::BlvDiffbotSystemHardware; B = hardware_interface::SystemInterface]’: /opt/ros/foxy/include/class_loader/meta_object.hpp:216:7: required from here /opt/ros/foxy/include/class_loader/meta_object.hpp:218:12: error: invalid new-expression of abstract class type ‘blv_diffbot_hardware::BlvDiffbotSystemHardware’ 218 | return new C; | ^~~~~ In file included from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:15: /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:38:7: note: because the following virtual functions are pure within ‘blv_diffbot_hardware::BlvDiffbotSystemHardware’: 38 | class BlvDiffbotSystemHardware : public hardware_interface::SystemInterface | ^~~~~~~~ In file included from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/include/blv_diffbot_hardware/blv_diffbot_system.hpp:26, from /home/yash/blv_ws/src/blv_ros2_samples/blv_diffbot_hardware/src/blv_diffbot_system.cpp:15: /opt/ros/foxy/include/hardware_interface/system_interface.hpp:48:23: note: ‘virtual hardware_interface::return_type hardware_interface::SystemInterface::configure(const hardware_interface::HardwareInfo&)’ 48 | virtual return_type configure(const HardwareInfo & system_info) = 0; | ^~~~~ /opt/ros/foxy/include/hardware_interface/system_interface.hpp:116:23: note: ‘virtual hardware_interface::return_type hardware_interface::SystemInterface::start()’ 116 | virtual return_type start() = 0; | ^~~~~ /opt/ros/foxy/include/hardware_interface/system_interface.hpp:122:23: note: ‘virtual hardware_interface::return_type hardware_interface::SystemInterface::stop()’ 122 | virtual return_type stop() = 0; | ^~~~ /opt/ros/foxy/include/hardware_interface/system_interface.hpp:128:23: note: ‘virtual std::string hardware_interface::SystemInterface::get_name() const’ 128 | virtual std::string get_name() const = 0; | ^~~~ /opt/ros/foxy/include/hardware_interface/system_interface.hpp:134:18: note: ‘virtual hardware_interface::status hardware_interface::SystemInterface::get_status() const’ 134 | virtual status get_status() const = 0; | ^~~~~~ /opt/ros/foxy/include/hardware_interface/system_interface.hpp:144:23: note: ‘virtual hardware_interface::return_type hardware_interface::SystemInterface::read()’ 144 | virtual return_type read() = 0; | ^~~~ /opt/ros/foxy/include/hardware_interface/system_interface.hpp:153:23: note: ‘virtual hardware_interface::return_type hardware_interface::SystemInterface::write()’ 153 | virtual return_type write() = 0; | ^~~~~ make[2]: [CMakeFiles/blv_diffbot_hardware.dir/build.make:63: CMakeFiles/blv_diffbot_hardware.dir/src/blv_diffbot_system.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:78: CMakeFiles/blv_diffbot_hardware.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

Failed <<< blv_diffbot_hardware [23.5s, exited with code 2]

Summary: 3 packages finished [25.0s] 1 package failed: blv_diffbot_hardware 1 package had stderr output: blv_diffbot_hardware

hijimasa commented 1 year ago

For various reasons, this repository is built with the ros2_control tag of 3.0.0 or higher instead of the default. Please clone ros2_control from Github and retry to build this repository.

souravchandrasaha commented 11 months ago

can i run this with ros galactic?