deborggraever / ros2-mecanum-bot

ROS2 Mecanum wheel robot
GNU General Public License v3.0
91 stars 26 forks source link

Colcon Build Error #13

Closed CodeBravish closed 4 months ago

CodeBravish commented 4 months ago

Describe the bug Running colcon build --symlink-install returns the following error. I tried removing ros-humble-hardware-interface and reinstalling with rosdep but the error remains identical.

Starting >>> mecanumbot_description
Starting >>> mecanumbot_control                      
Starting >>> mecanumbot_controller                                                           
Starting >>> mecanumbot_hardware                                                                 
--- stderr: mecanumbot_controller                                                                
In file included from /home/sahdeek/workspaces/ros2-mecanum-bot/src/mecanumbot_controller/src/mecanumbot_wheel.cpp:2:
/home/sahdeek/workspaces/ros2-mecanum-bot/src/mecanumbot_controller/include/mecanumbot_controller/mecanumbot_wheel.hpp:5:10: fatal error: hardware_interface/loaned_command_interface.hpp: No such file or directory
    5 | #include <hardware_interface/loaned_command_interface.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/mecanumbot_controller.dir/build.make:90: CMakeFiles/mecanumbot_controller.dir/src/mecanumbot_wheel.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/home/sahdeek/workspaces/ros2-mecanum-bot/src/mecanumbot_controller/src/mecanumbot_drive_controller.cpp:2:10: fatal error: hardware_interface/types/hardware_interface_type_values.hpp: No such file or directory
    2 | #include <hardware_interface/types/hardware_interface_type_values.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/mecanumbot_controller.dir/build.make:76: CMakeFiles/mecanumbot_controller.dir/src/mecanumbot_drive_controller.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/mecanumbot_controller.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< mecanumbot_controller [0.67s, exited with code 2]
--- stderr: mecanumbot_hardware
/home/sahdeek/workspaces/ros2-mecanum-bot/src/mecanumbot_hardware/src/mecanumbot_hardware.cpp:2:10: fatal error: hardware_interface/types/hardware_interface_type_values.hpp: No such file or directory
    2 | #include <hardware_interface/types/hardware_interface_type_values.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/mecanumbot_hardware.dir/build.make:76: CMakeFiles/mecanumbot_hardware.dir/src/mecanumbot_hardware.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/mecanumbot_hardware.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< mecanumbot_hardware [0.62s, exited with code 2]
Aborted  <<< mecanumbot_description [1.00s]                                             
Aborted  <<< mecanumbot_control [6.22s]                                

Summary: 0 packages finished [7.93s]
  2 packages failed: mecanumbot_controller mecanumbot_hardware
  2 packages aborted: mecanumbot_control mecanumbot_description
  3 packages had stderr output: mecanumbot_control mecanumbot_controller mecanumbot_hardware
  2 packages not processed

To Reproduce Steps to reproduce the behaviour:

Operating system

ROS Distro

deborggraever commented 4 months ago

Hi,

Did u use the latest version on the main branch? This has been tested against a clean install of Ubuntu 20.04 LTS using apt ros-humble-desktop packages.

Did u setup the ROS environment correctly? Run source /opt/ros/humble/setup.bash or add this to your profile, so it's initialized every time.

Kind regards, Randy

CodeBravish commented 4 months ago

After a reinstall of all ROS packages, I was able to build. Although with these warnings:

Starting >>> mecanumbot_description
Starting >>> mecanumbot_control
Starting >>> mecanumbot_controller                                   
Starting >>> mecanumbot_hardware                                     
Finished <<< mecanumbot_description [0.74s]                                  
Starting >>> mecanumbot_teleop
Finished <<< mecanumbot_hardware [0.98s]                                 
Starting >>> mecanumbot_bringup
Finished <<< mecanumbot_control [1.32s]                                  
Finished <<< mecanumbot_teleop [1.06s]                                        
Finished <<< mecanumbot_bringup [1.57s]                                       
--- stderr: mecanumbot_controller                                
/home/sahdeek/workspaces/ros2-mecanum-bot/src/mecanumbot_controller/src/mecanumbot_drive_controller.cpp: In member function ‘virtual controller_interface::return_type debict::mecanumbot::controller::MecanumbotDriveController::update(const rclcpp::Time&, const rclcpp::Duration&)’:
/home/sahdeek/workspaces/ros2-mecanum-bot/src/mecanumbot_controller/src/mecanumbot_drive_controller.cpp:60:90: warning: unused parameter ‘time’ [-Wunused-parameter]
   60 | type MecanumbotDriveController::update(const rclcpp::Time & time, const rclcpp::Duration & period)
      |                                        ~~~~~~~~~~~~~~~~~~~~~^~~~

/home/sahdeek/workspaces/ros2-mecanum-bot/src/mecanumbot_controller/src/mecanumbot_drive_controller.cpp:60:121: warning: unused parameter ‘period’ [-Wunused-parameter]
   60 | ler::update(const rclcpp::Time & time, const rclcpp::Duration & period)
      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

---
Finished <<< mecanumbot_controller [12.5s]

Summary: 6 packages finished [14.1s]
  1 package had stderr output: mecanumbot_controller

Sorry for the hasty issue post, kinda on crunch brain right now.

deborggraever commented 4 months ago

@CodeBravish I'm aware of the warnings. Most of them (if not all warnings) are unused parameters. They have not been removed to resolve the warning as they still have to be implemented correctly.

Kind regards, Randy