From 82c50301c3ac81e00a0eadc2dc1c1f7acf00e1f5 Mon Sep 17 00:00:00 2001 From: asbird Date: Tue, 7 Apr 2020 16:26:07 +0000 Subject: [PATCH 1/5] melodic branch --- .vscode/c_cpp_properties.json | 15 +++++++++++++++ .vscode/settings.json | 5 +++++ install | 16 ++++++++-------- pkglist-gazebo | 2 +- pkglist-ros | 7 +++---- pkglist-rosdeps | 11 ++++++----- scripts/ros_setup.sh | 13 +++++++++---- scripts/user_setup.sh | 2 +- 8 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..579e2c1 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,15 @@ +{ + "configurations": [ + { + "browse": { + "databaseFilename": "", + "limitSymbolsToIncludedHeaders": true + }, + "includePath": [ + "/opt/ros/melodic/include/**", + "/usr/include/**" + ], + "name": "ROS" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a560512 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "python.autoComplete.extraPaths": [ + "/opt/ros/melodic/lib/python2.7/dist-packages" + ] +} \ No newline at end of file diff --git a/install b/install index 12ecdab..cfafb56 100644 --- a/install +++ b/install @@ -5,7 +5,7 @@ set_colors -echo -e "${BLUE}This is ROS setup sript${NOCOLOR}" +echo -e "${BLUE}This is ROS Melodic setup sript${NOCOLOR}" read -p "Do you wish to start the installtion? [Y/n]" -n 1 -s ans && echo [ "${ans}" != "n" ] || exit 0 @@ -14,14 +14,14 @@ sudo apt update && sudo apt upgrade -y [ $? -eq 0 ] || error "Failed to update apt-get, aborting..." echo -e "${GREEN}System update done${NOCOLOR}" -echo -e "${BLUE}Installing ROS dependencies${NOCOLOR}" +echo -e "${BLUE}Installing ROS Melodic dependencies${NOCOLOR}" install_rosdeps -[ $? -eq 0 ] || error "Failed to install ROS dependencies, aborting..." +[ $? -eq 0 ] || error "Failed to install ROS Melodic dependencies, aborting..." echo -e "${GREEN}ROS dependencies installation done${NOCOLOR}" -echo -e "${BLUE}Installing ROS${NOCOLOR}" +echo -e "${BLUE}Installing ROS Melodic${NOCOLOR}" install_ros -[ $? -eq 0 ] || error "Failed to install ROS, aborting..." +[ $? -eq 0 ] || error "Failed to install ROS Melodic, aborting..." echo -e "${GREEN}ROS installation done${NOCOLOR}" echo -e "${BLUE}Installing pip modules${NOCOLOR}" @@ -30,9 +30,9 @@ python3 -m pip install -r requirements.txt [ $? -eq 0 ] || echo "${RED}Failed install pip modules, continuing...${NOCLOR}" echo -e "${GREEN}Pip modules installaion done${NOCOLOR}" -read -p "Do you wish to install simulator (Gazebo) [Y/n]" -n 1 -s ans && echo -[ "${ans}" != "n" ] && install_gazebo -echo -e "${GREEN}Gazebo installation done${NOCOLOR}" +# read -p "Do you wish to install simulator (Gazebo) [Y/n]" -n 1 -s ans && echo +# [ "${ans}" != "n" ] && install_gazebo +# echo -e "${GREEN}Gazebo installation done${NOCOLOR}" read -p "Do you wish to install desktop environment (xfce4) [Y/n]" -n 1 -s ans \ && echo diff --git a/pkglist-gazebo b/pkglist-gazebo index a13807f..8b13789 100644 --- a/pkglist-gazebo +++ b/pkglist-gazebo @@ -1 +1 @@ -ros-dashing-gazebo-ros-pkgs + diff --git a/pkglist-ros b/pkglist-ros index 5ea6cff..a659b34 100644 --- a/pkglist-ros +++ b/pkglist-ros @@ -1,4 +1,3 @@ -ros-dashing-ros-base -ros-dashing-desktop -ros-dashing-geometry* -ros-dashing-rqt* +ros-melodic-desktop-full +ros-melodic-ros-control +ros-melodic-ros-controllers \ No newline at end of file diff --git a/pkglist-rosdeps b/pkglist-rosdeps index 8c618ba..4011e09 100644 --- a/pkglist-rosdeps +++ b/pkglist-rosdeps @@ -1,6 +1,7 @@ -curl git -gnupg2 -lsb-release -python3-argcomplete -python3-pip +python-rosdep +python-rosinstall +python-rosinstall-generator +python-wstool +build-essential +catkin_tools \ No newline at end of file diff --git a/scripts/ros_setup.sh b/scripts/ros_setup.sh index 501d643..382cb9a 100644 --- a/scripts/ros_setup.sh +++ b/scripts/ros_setup.sh @@ -6,14 +6,19 @@ function install_rosdeps function install_ros { - ROS_KEY_URL=https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc + sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' - curl -s $ROS_KEY_URL | sudo apt-key add - - sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu \ - `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list' + sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654z + curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add - sudo apt update sudo apt -y install --no-install-recommends `cat pkglist-ros` + + echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc + source ~/.bashrc + + sudo rosdep init + rosdep update } function install_gazebo diff --git a/scripts/user_setup.sh b/scripts/user_setup.sh index a1423fe..f134067 100644 --- a/scripts/user_setup.sh +++ b/scripts/user_setup.sh @@ -1,6 +1,6 @@ function setup_user { - SOURCE_ROS="source /opt/ros/dashing/setup.bash" + SOURCE_ROS="source /opt/ros/melodic/setup.bash" grep "${SOURCE_ROS}" ${HOME}/.bashrc 2> /dev/null || \ echo "${SOURCE_ROS}" >> ${HOME}/.bashrc } From fc7e5d646c1a2697a9bad3c0ab21b43d0aab9ee6 Mon Sep 17 00:00:00 2001 From: asbird Date: Tue, 7 Apr 2020 16:28:48 +0000 Subject: [PATCH 2/5] readme update --- README.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 72c16b9..490bb29 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Setup scripts for ROS environment +# Setup scripts for ROS Melodic environment ![Build](https://github.com/agv-polsl/ros-setup-scripts/workflows/Build/badge.svg) -Shell scripts for installing ROS2 Dashing on Ubuntu 18.04.4 LTS Bionic. +Shell scripts for installing ROS Melodic on Ubuntu 18.04.4 LTS Bionic. Includes Gazebo installation. ## Setup steps @@ -17,13 +17,6 @@ Includes Gazebo installation. 7. To enter desktop environment start X server `startx`. 8. Setting up xfce theming may require re-running the script after entering gui. -## Setup test - -After typing following commands you should see a simple robot moving. - -1. `gazebo --verbose /opt/ros/dashing/share/gazebo_plugins/worlds/gazebo_ros_diff_drive_demo.world`. -2. `ros2 topic pub /demo/cmd_demo geometry_msgs/Twist '{linear: {x: 1.0}}' -1`. - ## Files in repo When extending the setup please put packages in according files: From 198cd9791eacf0e782765525d96de2c4748a75bc Mon Sep 17 00:00:00 2001 From: asbird Date: Tue, 7 Apr 2020 16:42:14 +0000 Subject: [PATCH 3/5] change catkin_tools installation to pip --- pkglist-rosdeps | 4 ++-- scripts/ros_setup.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkglist-rosdeps b/pkglist-rosdeps index 4011e09..3837877 100644 --- a/pkglist-rosdeps +++ b/pkglist-rosdeps @@ -1,7 +1,7 @@ +python3-pip git python-rosdep python-rosinstall python-rosinstall-generator python-wstool -build-essential -catkin_tools \ No newline at end of file +build-essential \ No newline at end of file diff --git a/scripts/ros_setup.sh b/scripts/ros_setup.sh index 382cb9a..2b90b81 100644 --- a/scripts/ros_setup.sh +++ b/scripts/ros_setup.sh @@ -19,6 +19,8 @@ function install_ros sudo rosdep init rosdep update + + sudo pip install -U catkin_tools } function install_gazebo From cef13dfa5020c16c7b81743b88fcf5c7185d1ec2 Mon Sep 17 00:00:00 2001 From: asbird Date: Tue, 7 Apr 2020 17:03:35 +0000 Subject: [PATCH 4/5] remove catkin_tools installation --- .vscode/c_cpp_properties.json | 31 ++++++++++++++++++------------- pkglist-rosdeps | 1 - scripts/ros_setup.sh | 1 - 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 579e2c1..3a72db8 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,15 +1,20 @@ { - "configurations": [ - { - "browse": { - "databaseFilename": "", - "limitSymbolsToIncludedHeaders": true - }, - "includePath": [ - "/opt/ros/melodic/include/**", - "/usr/include/**" - ], - "name": "ROS" - } - ] + "configurations": [ + { + "browse": { + "databaseFilename": "", + "limitSymbolsToIncludedHeaders": true + }, + "includePath": [ + "/opt/ros/melodic/include/**", + "/usr/include/**" + ], + "name": "ROS", + "intelliSenseMode": "gcc-x64", + "compilerPath": "/usr/bin/gcc", + "cStandard": "c11", + "cppStandard": "c++17" + } + ], + "version": 4 } \ No newline at end of file diff --git a/pkglist-rosdeps b/pkglist-rosdeps index 3837877..fdda94b 100644 --- a/pkglist-rosdeps +++ b/pkglist-rosdeps @@ -1,4 +1,3 @@ -python3-pip git python-rosdep python-rosinstall diff --git a/scripts/ros_setup.sh b/scripts/ros_setup.sh index 2b90b81..897758c 100644 --- a/scripts/ros_setup.sh +++ b/scripts/ros_setup.sh @@ -20,7 +20,6 @@ function install_ros sudo rosdep init rosdep update - sudo pip install -U catkin_tools } function install_gazebo From acec01cab0048c1c61a7d2d3f707d66be979b5bb Mon Sep 17 00:00:00 2001 From: asbird Date: Tue, 7 Apr 2020 17:45:09 +0000 Subject: [PATCH 5/5] pkglist-rosdeps moved to pkglist-ros --- pkglist-ros | 6 ++++++ pkglist-rosdeps | 6 ------ scripts/ros_setup.sh | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkglist-ros b/pkglist-ros index a659b34..4021362 100644 --- a/pkglist-ros +++ b/pkglist-ros @@ -1,3 +1,9 @@ +git ros-melodic-desktop-full +python-rosdep +python-rosinstall +python-rosinstall-generator +python-wstool +build-essential ros-melodic-ros-control ros-melodic-ros-controllers \ No newline at end of file diff --git a/pkglist-rosdeps b/pkglist-rosdeps index fdda94b..e69de29 100644 --- a/pkglist-rosdeps +++ b/pkglist-rosdeps @@ -1,6 +0,0 @@ -git -python-rosdep -python-rosinstall -python-rosinstall-generator -python-wstool -build-essential \ No newline at end of file diff --git a/scripts/ros_setup.sh b/scripts/ros_setup.sh index 897758c..74e1c9c 100644 --- a/scripts/ros_setup.sh +++ b/scripts/ros_setup.sh @@ -17,6 +17,7 @@ function install_ros echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc source ~/.bashrc + sudo apt install python-rosdep sudo rosdep init rosdep update