PX4 / px4_msgs

ROS/ROS2 messages that match the uORB messages counterparts on the PX4 Firmware
http://px4.io
BSD 3-Clause "New" or "Revised" License
71 stars 132 forks source link

[ROS2 Galactic] Fix CMakeLists error at line 25 and 52 #12

Closed sumedhreddy90 closed 1 year ago

sumedhreddy90 commented 2 years ago

ROS2 Galactic and Ubuntu 20.04

Usage:

sumedh@starfleeet:~/px4_ros_com_ros2/src/px4_ros_com/scripts$ bash build_ros2_workspace.bash 
openjdk version "13.0.7" 2021-04-20
OpenJDK Runtime Environment (build 13.0.7+5-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 13.0.7+5-Ubuntu-0ubuntu120.04, mixed mode)
[0.128s] WARNING:colcon.colcon_core.package_selection:ignoring unknown package 'ros1_bridge' in --packages-skip
Starting >>> px4_msgs
--- stderr: px4_msgs                         
CMake Error at CMakeLists.txt:25 (if):
  if given arguments:

    "MATCHES" "ardent" "OR" "MATCHES" "bouncy" "OR" "MATCHES" "crystal"

  Unknown arguments specified

---
Failed   <<< px4_msgs [0.19s, exited with code 1]

Summary: 0 packages finished [0.32s]
  1 package failed: px4_msgs
  1 package had stderr output: px4_msgs
  1 package not processed
ROS_DISTRO was set to 'foxy' before. Please make sure that the environment does not mix paths from different distributions.

ROS2 workspace ready...

Fix:

Changed line number 25 and 52 to if((${ROS_DISTRO} MATCHES "ardent") OR (${ROS_DISTRO} MATCHES "bouncy") OR (${ROS_DISTRO} MATCHES "crystal"))

Output after Fix:

sumedh@starfleeet:~/px4_ros_com_ros2/src/px4_ros_com/scripts$ bash build_ros2_workspace.bash 
openjdk version "13.0.7" 2021-04-20
OpenJDK Runtime Environment (build 13.0.7+5-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 13.0.7+5-Ubuntu-0ubuntu120.04, mixed mode)
[0.128s] WARNING:colcon.colcon_core.package_selection:ignoring unknown package 'ros1_bridge' in --packages-skip
Starting >>> px4_msgs
[Processing: px4_msgs]                             
[Processing: px4_msgs]                                     
[Processing: px4_msgs]                                       
[Processing: px4_msgs]                                       
[Processing: px4_msgs]                                        
Finished <<< px4_msgs [2min 37s] 
beniaminopozzan commented 1 year ago

Closing as deprecated by #15