TechmanRobotInc / tmr_ros2

TM Robots supporting ROS2 drivers and some extended external applications. (experimental) (not support the new TM S-Series)
Other
41 stars 22 forks source link

CMake cannot find "control_msgs" #3

Closed daan-schepers closed 3 years ago

daan-schepers commented 3 years ago

Hi there, I'm doing my graduation internship at VWCO (Techman europe) and i'm trying to use ROS2 on a Raspberry Pi 4 with the TM5-900. I can receive images with the AI vision tool, so the connection with the cobot can be made, but I cannot get 'tm_driver' to work.

When I install and Colcon build the TM-ROS2 Github page, I get the following error:

ubuntu@ubuntu:~/ROS2/tmr_ros2$ colcon build --symlink-install
Starting >>> tm_msgs 
Starting >>> techman_robot_msgs
Starting >>> tmr_description
Starting >>> tmr_msgs                                  
Finished <<< tmr_description [1.62s]                             
Starting >>> tmrlib
Finished <<< tmrlib [1.41s]                                       
Starting >>> tm_get_status
Finished <<< techman_robot_msgs [4.42s]                           
Starting >>> tmr_mod_urdf
Finished <<< tm_get_status [4.29s]                             
Starting >>> tmr_moveit_cpp_demo
Finished <<< tmr_msgs [7.89s]                                  
Starting >>> custom_package
Finished <<< tm_msgs [8.21s]                                   
Starting >>> demo
Finished <<< tmr_moveit_cpp_demo [0.95s]                    
Starting >>> tm_driver
Finished <<< tmr_mod_urdf [4.84s]                           
Starting >>> tmr_driver
--- stderr: tmr_driver                                                    
CMake Error at CMakeLists.txt:28 (find_package):
  By not providing "Findcontrol_msgs.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "control_msgs", but CMake did not find one.

  Could not find a package configuration file provided by "control_msgs" with
  any of the following names:

    control_msgsConfig.cmake
    control_msgs-config.cmake

  Add the installation prefix of "control_msgs" to CMAKE_PREFIX_PATH or set
  "control_msgs_DIR" to a directory containing one of the above files.  If
  "control_msgs" provides a separate development package or SDK, be sure it
  has been installed.

---
Failed   <<< tmr_driver [4.72s, exited with code 1]
Aborted  <<< custom_package [6.63s]               
Aborted  <<< tm_driver [6.86s]                                             
Aborted  <<< demo [1min 20s]                                           

Summary: 8 packages finished [1min 29s]
  1 package failed: tmr_driver
  3 packages aborted: custom_package demo tm_driver
  1 package had stderr output: tmr_driver
  2 packages not processed

When I try to install and build the 'control_msgs' package from Github, I get an error that I do not have Catkin installed. But Catkin is not available for ROS2 so thats why we built with Colcon.

I'm quite stuck here... Do you know something that might help? Thanks in advance!

janandries commented 3 years ago

I have the same issue since I upgraded from commit 7948540 to the latest c91fc10.

In the previous version, #find_package(control_msgs REQUIRED) was commented out in tmr_driver/CMakeLists.txt, and in the newest not anymore. When I comment it again, it builds without problem.

guanyewtan commented 3 years ago

Hi @daan-schepers ! I managed to resolve the problem by running sudo apt install ros-foxy-control-msgs, you could give it a try. I also tried @janandries method of commenting out that line (and it works!) but unfortunately it causes some issues with running the moveit demo because of dependencies.