Skip to content

Commit

Permalink
install ros in Ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasw committed Mar 13, 2024
1 parent f578a01 commit 8803b4a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test_suite_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
export PATH=$JAVA_HOME/bin:$PATH
export LIBGL_ALWAYS_SOFTWARE=true
export ROS_DISTRO=${{ matrix.ROS_DISTRO }}
source /opt/ros/$ROS_DISTRO/setup.bash || true
xvfb-run --auto-servernum make distrib -j4
- name: Create/Update GitHub release
if: ${{ matrix.os == 'ubuntu-20.04' && (github.event_name == 'push' || github.event_name == 'schedule') }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test_suite_linux_develop.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Linux build (develop)

on:
push:
schedule:
- cron: '0 23 * * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
13 changes: 11 additions & 2 deletions projects/default/controllers/ros/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,20 @@ include/services/%.h: $(WEBOTS_HOME_PATH)/resources/webots_ros/srv/%.srv include
@echo "# generating service header" $(notdir $<)
$(SILENT)$(PYTHON_COMMAND) headersFromSRV.py $<

INCLUDE = -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include
ifeq ($(ROS_PATH),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
endif

# include ros libraries

LIBRARIES += -W -lxmlrpcpp -lcpp_common -lrosconsole_backend_interface -lroscpp -lrosconsole -lrosconsole_log4cxx -lroscpp_serialization -lrostime -lboost_system
ifeq ($(ROS_PATH),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
endif

ifeq ($(OSTYPE),windows)
LIBRARIES += -lws2_32
ifeq ($(MAKECMDGOALS),debug)
Expand Down
8 changes: 7 additions & 1 deletion scripts/install/linux_test_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ if [[ $@ != *"--exclude-ros"* ]]; then
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
apt update -qq
apt install -y ros-$ROS_DISTRO-ros-base ros-$ROS_DISTRO-sensor-msgs ros-$ROS_DISTRO-tf ros-$ROS_DISTRO-ros-controllers ros-$ROS_DISTRO-controller-manager ros-$ROS_DISTRO-ros-control ros-$ROS_DISTRO-class-loader ros-$ROS_DISTRO-roslib liburdfdom-tools
apt install -y ros-$ROS_DISTRO-*msgs
apt install -y python3-rosdep
elif [[ $UBUNTU_VERSION != "22.04" ]]; then
elif [[ $UBUNTU_VERSION == "22.04" ]]; then
echo "Adding ROS dependencies"
apt update -qq
apt install -y ros-*
apt install -y *-msgs-dev
else
echo "Unsupported Linux version: dependencies may not be completely installed. Only the two latest Ubuntu LTS are supported."
fi
fi
Expand Down

0 comments on commit 8803b4a

Please sign in to comment.