Skip to content

Commit

Permalink
need to compare ROS_DISTRO not ROS_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasw committed Mar 13, 2024
1 parent 8803b4a commit 0adce14
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/default/controllers/ros/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ include/services/%.h: $(WEBOTS_HOME_PATH)/resources/webots_ros/srv/%.srv include
@echo "# generating service header" $(notdir $<)
$(SILENT)$(PYTHON_COMMAND) headersFromSRV.py $<

ifeq ($(ROS_PATH),noetic)
ifeq ($(ROS_DISTRO),noetic)
INCLUDE = -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include -isystem /opt/ros/$(ROS_DISTRO)/include
else
INCLUDE = -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include
Expand Down
12 changes: 10 additions & 2 deletions projects/vehicles/controllers/ros_automobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,20 @@ else
ros_automobile: $(CXX_SOURCES:.cxx=.d)
endif

INCLUDE = -I$(WEBOTS_HOME_PATH)/projects/default/controllers/ros -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include
ifeq ($(ROS_DISTRO),noetic)
INCLUDE = -I$(WEBOTS_HOME_PATH)/projects/default/controllers/ros -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include -isystem /opt/ros/$(ROS_DISTRO)/include
else
INCLUDE = -I$(WEBOTS_HOME_PATH)/projects/default/controllers/ros -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include
endif
LIBRARIES += -lCppDriver -lCppCar -ldriver -lcar

# include ros libraries

LIBRARIES += -W -lxmlrpcpp -lcpp_common -lrosconsole_backend_interface -lroscpp -lrosconsole -lrosconsole_log4cxx -lroscpp_serialization -lrostime -lboost_system # -lcontroller_manager
ifeq ($(ROS_DISTRO),noetic)
LIBRARIES += -L/opt/ros/$(ROS_DISTRO)/lib -Wl,-rpath-link=/opt/ros/$(ROS_DISTRO)/lib -lxmlrpcpp -lcpp_common -lrosconsole_backend_interface -lroscpp -lrosconsole -lrosconsole_log4cxx -lroscpp_serialization -lrostime -lcontroller_manager -lboost_system
else
LIBRARIES += -W -lxmlrpcpp -lcpp_common -lrosconsole_backend_interface -lroscpp -lrosconsole -lrosconsole_log4cxx -lroscpp_serialization -lrostime -lboost_system # -lcontroller_manager
endif
ifeq ($(OSTYPE),windows)
LIBRARIES += -lws2_32
ifeq ($(MAKECMDGOALS),debug)
Expand Down

0 comments on commit 0adce14

Please sign in to comment.