-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor changes #80
Open
RapidRoger18
wants to merge
2
commits into
SRA-VJTI:humble
Choose a base branch
from
RapidRoger18:minor-changes
base: humble
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Minor changes #80
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
!/usr/bin/env bash | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
|
@@ -9,7 +9,7 @@ reset=`tput sgr0` | |
|
||
echo "Installing ESP IDF" | ||
|
||
_shell_="${0##*/}" | ||
_shell_="${SHELL#${SHELL%/*}/}" | ||
# Check whether esp-idf has already been installed | ||
if [ -d $HOME/esp/esp-idf ]; then | ||
echo "${red}======================$reset" | ||
|
@@ -23,7 +23,7 @@ else | |
sudo apt update && sudo apt upgrade -y | ||
sudo usermod -a -G dialout $USER | ||
sudo apt install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 -y | ||
sudo apt install python3-venv | ||
sudo apt install python3-venv -y | ||
;; | ||
Darwin*) | ||
if brew --version | grep -q 'Homebrew'; then | ||
|
@@ -52,7 +52,7 @@ else | |
# Clone ESP-IDF Repository | ||
git clone -b release/v5.1 --recursive https://github.com/espressif/esp-idf.git | ||
cd $HOME/esp/esp-idf | ||
./install.sh esp32 | ||
./install.sh esp32 -y | ||
|
||
# Check if installation is successful | ||
. $HOME/esp/esp-idf/export.sh | ||
|
@@ -66,7 +66,7 @@ else | |
fi | ||
echo "$reset" | ||
# Clone Mario repository if not already cloned | ||
if [ ! -d $HOME/MARIO ]; then | ||
if [ ! -d "$HOME/MARIO" ]; then | ||
echo "${blue}======================$reset" | ||
echo "Cloning Mario" | ||
echo "${red}======================$reset" | ||
|
@@ -93,32 +93,32 @@ case "${unameOut}" in | |
|
||
# Check for UTF-8 locale | ||
locale | ||
sudo apt update && sudo apt install locales | ||
sudo apt update && sudo apt install locales -y | ||
sudo locale-gen en_US en_US.UTF-8 | ||
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 | ||
export LANG=en_US.UTF-8 | ||
locale # verify settings | ||
|
||
# Add ROS 2 repository | ||
sudo apt install software-properties-common | ||
sudo add-apt-repository universe | ||
sudo apt install software-properties-common -y | ||
sudo add-apt-repository universe -y | ||
sudo apt update && sudo apt install curl -y | ||
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
sudo apt update | ||
sudo apt upgrade | ||
sudo apt update -y | ||
sudo apt upgrade -y | ||
|
||
# Install ROS 2 | ||
sudo apt install ros-humble-desktop-full | ||
sudo apt install ros-humble-desktop-full -y | ||
echo "source /opt/ros/humble/setup.bash" >> $HOME/."$_shell_"rc | ||
|
||
# Install additional ROS 2 packages | ||
echo "Installing Additional Ros2 packages" | ||
sudo apt install -y ros-humble-control-msgs ros-humble-control-toolbox ros-humble-joint-state-broadcaster ros-humble-joint-state-publisher ros-humble-joint-state-publisher-gui ros-humble-forward-command-controller ros-humble-robot-state-publisher ros-humble-gazebo-ros2-control ros-humble-robot-controllers ros-humble-robot-controllers-interface ros-humble-robot-controllers-msgs ros-humble-joint-trajectory-controller ros-humble-controller-manager ros-humble-controller-manager-msgs ros-humble-ros2-control ros-humble-gazebo-ros-pkgs ros-humble-gazebo-ros-dbgsym | ||
sudo apt install -y ros-humble-control-msgs ros-humble-control-toolbox ros-humble-gazebo-ros2-control ros-humble-joint-state-broadcaster ros-humble-joint-state-publisher ros-humble-joint-state-publisher-gui ros-humble-forward-command-controller ros-humble-robot-state-publisher ros-humble-gazebo-ros2-control ros-humble-robot-controllers ros-humble-robot-controllers-interface ros-humble-robot-controllers-msgs ros-humble-joint-trajectory-controller ros-humble-controller-manager ros-humble-controller-manager-msgs ros-humble-ros2-control ros-humble-micro-ros-msgs | ||
echo "${red}======================$reset" | ||
echo "ROS 2 installed successfully." | ||
echo "${red}======================$reset" | ||
source $HOME/."$_shell_"rc | ||
source ~/.bashrc | ||
else | ||
echo "${red}======================$reset" | ||
echo "ROS 2 is already installed." | ||
|
@@ -157,7 +157,7 @@ case "${unameOut}" in | |
conda config --env --remove channels defaults || true | ||
# Install ROS packages | ||
mamba install ros-humble-desktop-full | ||
mamba install -n ros_env -y ros-humble-control-msgs ros-humble-control-toolbox ros-humble-joint-state-broadcaster ros-humble-joint-state-publisher ros-humble-joint-state-publisher-gui ros-humble-forward-command-controller ros-humble-robot-state-publisher ros-humble-controller-manager ros-humble-controller-manager-msgs ros-humble-joint-trajectory-controller ros-humble-ros2-control | ||
mamba install -n ros_env -y ros-humble-control-msgs ros-humble-control-toolbox ros-humble-joint-state-broadcaster ros-humble-joint-state-publisher ros-humble-joint-state-publisher-gui ros-humble-forward-command-controller ros-humble-robot-state-publisher ros-humble-controller-manager ros-humble-controller-manager-msgs ros-humble-joint-trajectory-controller ros-humble-ros2-control ros-humble-micro-ros-msgs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove these packages as they are also included in the package.xml |
||
mamba install catkin_tools | ||
echo "${red}======================$reset" | ||
echo "ROS 2 installed successfully." | ||
|
@@ -178,8 +178,8 @@ else | |
echo "${red}======================$reset" | ||
echo "Creating a ros2_ws" | ||
echo "${red}======================$reset" | ||
sudo apt update | ||
sudo apt install python3-colcon-common-extensions | ||
sudo apt update -y | ||
sudo apt install python3-colcon-common-extensions -y | ||
echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> $HOME/."$_shell_"rc | ||
mkdir $HOME/ros2_ws | ||
cd $HOME/ros2_ws | ||
|
@@ -262,7 +262,6 @@ if [ "$unameOut" == "Darwin" ]; then | |
source $HOME/mambaforge/etc/profile.d/conda.sh | ||
conda activate ros_env | ||
fi | ||
colcon build | ||
echo "${red}======================$reset" | ||
echo "Successfully copied mario's folders to ros2_ws" | ||
echo "${red}======================$reset" | ||
|
@@ -272,10 +271,20 @@ case "${unameOut}" in | |
Linux*) | ||
echo "Cloning microrosagent" | ||
cd $HOME/ros2_ws/src | ||
git clone -b humble https://github.com/micro-ROS/micro-ROS-Agent.git | ||
if [ ! -d $HOME/ros2_ws/src/micro-ROS-Agent ]; then | ||
git clone -b humble https://github.com/micro-ROS/micro-ROS-Agent.git | ||
fi | ||
cd .. | ||
pip3 install catkin_pkg lark-parser colcon-common-extensions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add sudo apt install python3-pip |
||
pip3 install catkin_pkg lark-parser colcon-common-extensions | ||
sudo apt install python3-rosdep2 -y | ||
if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then | ||
sudo rosdep init | ||
fi | ||
set -e | ||
rosdep update | ||
rosdep install --from-paths src --ignore-src -y | ||
colcon build | ||
source install/setup.bash | ||
echo "${red}======================$reset" | ||
echo "Done with cloning" | ||
echo "${red}======================$reset" | ||
|
@@ -285,7 +294,7 @@ case "${unameOut}" in | |
echo "Cloning microrosagent" | ||
echo "${red}======================$reset" | ||
cd $HOME/ros2_ws/src | ||
pip3 install catkin_pkg lark-parser | ||
pip3 install catkin_pkg lark-parser | ||
git clone -b humble https://github.com/micro-ROS/micro-ROS-Agent.git | ||
echo "${red}======================$reset" | ||
echo "Done with cloning microrosagent" | ||
|
@@ -295,4 +304,4 @@ case "${unameOut}" in | |
echo "micros_ws couldn't be setup" | ||
exit 1 | ||
;; | ||
esac | ||
esac |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test this shell for zsh and bash both