Skip to content

Commit

Permalink
fixes dep issues and checks if the ws exists
Browse files Browse the repository at this point in the history
  • Loading branch information
padhupradheep committed Jan 14, 2025
1 parent 46a11ab commit 4d7cd31
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions package-setup/setup-mp-robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ while [[ "$phi_ans" != "y" && "$phi_ans" != "n" ]]; do
echo "Phidget IMU ? (y/n)"
read phi_ans
if [ "$phi_ans" == "n" ]; then
skip_depend+="phidgets-drivers"
skip_depend+="phidgets_drivers "
use_imu="False"
elif [ "$phi_ans" == "y" ]; then
echo "Phidget IMU dependencies will be installed and added to autstart"
Expand Down Expand Up @@ -105,9 +105,25 @@ sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp
sudo apt install xterm

cd ~

mkdir -p ros2_workspace/src
cd ros2_workspace/src
delete_ws="n"

if [ -d "ros2_workspace" ]; then
echo "Folder exists. Do you want to delete the ros2 workspace and reinstall it fresh? (Y/n)"
read delete_ws
if [ "$delete_ws" == "y" ]; then
echo "Deleting workspace"
rm -rf ros2_workspace
mkdir -p ros2_workspace/src
cd ros2_workspace/src
else
echo "Exiting the setup"
exit 0
fi
else
echo "Folder does not exist."
mkdir -p ros2_workspace/src
cd ros2_workspace/src
fi

# clone git repos here...
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git
Expand Down

0 comments on commit 4d7cd31

Please sign in to comment.