-
Notifications
You must be signed in to change notification settings - Fork 3
Jammy develop #59
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
Merged
Merged
Jammy develop #59
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a2be275
updating the robot setup tools
padhupradheep 3407138
updating autostart scripts
padhupradheep 63fac6b
installing the corresponding moveit packages as well
padhupradheep 343c09e
fixing cyclone dds install
padhupradheep 581bbe3
fixes
padhupradheep 2ca4d48
add extra spaces
padhupradheep be092ea
minor space fix
padhupradheep 6e0fff3
some more updates
padhupradheep 87924ec
add the missing rosdep command
padhupradheep f246e02
update rosdep init with a continuation condition
padhupradheep 258fc02
adding script for installing packages for client PC
padhupradheep 7510157
fixing indentation
padhupradheep 9ed0f46
updates to the client setup script
padhupradheep 1d42756
neo_nav2_bringup is a binary now
padhupradheep 481c941
update abort
padhupradheep e4046d1
setting up ROX simulation from the script
padhupradheep 5294fd9
adding cyclonedds installation
padhupradheep 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,147 @@ | ||
#!/bin/bash | ||
|
||
# exit if any command below fails | ||
set -e | ||
GREEN='\033[0;32m' | ||
RED='\033[0;31m' | ||
YELLOW='\033[0;33m' | ||
WHITE='\033[0;37m' | ||
|
||
echo "Welcome to the support assistant for setting up the client PC Neobotix packages" | ||
echo "The workspace will be created in the /home/USER/ folder. In the future, we will add the option, to create the workspace in any desired directory" | ||
|
||
# Check if the client ws is already there in the home folder | ||
cd ~/ | ||
is_ws_installed="" | ||
|
||
if [ -d "client_nbx_ws" ]; then | ||
echo "client_nbx_ws already exists." | ||
echo -n "Do you want to delete it before continuing? (Y/n)" | ||
read is_ws_installed | ||
|
||
if [[ "$is_ws_installed" == "y" || "$is_ws_installed" == "Y" ]]; then | ||
echo -e " Deleting.." | ||
rm -rf "client_nbx_ws" | ||
echo -e " client_nbx_ws has been deleted" | ||
else | ||
echo "Abort" | ||
exit 0 | ||
fi | ||
fi | ||
|
||
# Check if ROS is sourced | ||
empty_ros_distro=true | ||
ros_distros=" " | ||
if [ "$ROS_DISTRO" == "" ]; then | ||
echo "ROS Distro is not sourced." | ||
for dir in /opt/ros/*/; do | ||
if [ "$(ls -A "$dir")" ]; then | ||
empty_ros_distro=false | ||
echo -e "$GREEN" | ||
echo " " $(basename "$dir") | ||
fi | ||
done | ||
|
||
if [ $empty_ros_distro == true ]; then | ||
echo "ROS 2 is not installed at all" | ||
echo "Please continue the installation once ROS 2 is installed" | ||
echo "Abort" | ||
else | ||
echo -e "${RED} Please source any one of the ROS Distros above and try again later" | ||
echo -e "${RED} Example: source /opt/ros/YOUR_DISTRO/setup.bash" | ||
echo "Abort" | ||
exit 0 | ||
fi | ||
fi | ||
|
||
uni_ans="" | ||
robot_model="" | ||
|
||
# Go to home directory | ||
cd ~ | ||
|
||
echo "Creating a client_nbx workspace" | ||
|
||
mkdir -p client_nbx_ws/src | ||
cd client_nbx_ws/src | ||
|
||
while [[ "$robot_model" != "mp_400" && | ||
"$robot_model" != "mp_500" && | ||
"$robot_model" != "mpo_500" && | ||
"$robot_model" != "mpo_700" && | ||
"$robot_model" != "rox" ]]; do | ||
echo -e -n "${GREEN} Choose your robot (mp_400/mp_500/mpo_500/mpo_700/rox):" | ||
|
||
read robot_model | ||
|
||
echo -e "${WHITE}" | ||
|
||
if [ "$robot_model" == "rox" ]; then | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/rox.git | ||
elif [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" || "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git | ||
else | ||
echo -e "${RED} Please select a valid option" | ||
fi | ||
done | ||
|
||
echo "Performing rosdep initialization and update" | ||
sudo rosdep init || { true; echo -e "${YELLOW} rosdep init is not required"; } | ||
rosdep update | ||
|
||
# Install build tool | ||
echo "Installing colcon extensions" | ||
sudo apt install python3-colcon-common-extensions | ||
|
||
# Installing CycloneDDS | ||
echo "Installing CycloneDDS" | ||
sudo apt install ros-$ROS_DISTRO-cyclonedds | ||
|
||
#Install xterm - useful when | ||
sudo apt install xterm | ||
|
||
git clone --branch master https://github.com/neobotix/neo_msgs2 | ||
git clone --branch master https://github.com/neobotix/neo_srvs2 | ||
|
||
cd ~/client_nbx_ws | ||
|
||
# Install relevant dependencies | ||
rosdep install --from-paths ./src/rox/rox_navigation/ ./src/rox/rox_description --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } | ||
|
||
cd ~/client_nbx_ws/src | ||
|
||
if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" || "$robot_model" == "rox" ]]; then | ||
while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do | ||
echo -e "${GREEN} Universal robots ? (y/n)" | ||
read uni_ans | ||
|
||
if [ "$uni_ans" == "y" ]; then | ||
if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then | ||
git clone --branch main https://github.com/neobotix/neo_mpo_moveit2.git | ||
rosdep install --from-paths ./neo_mpo_moveit2 --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } | ||
elif [ "$robot_model" == "rox" ]; then | ||
git clone --branch main https://github.com/neobotix/neo_rox_moveit2.git | ||
rosdep install --from-paths ./neo_rox_moveit2 --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } | ||
else | ||
uni_ans = "n" | ||
fi | ||
fi | ||
done | ||
fi | ||
|
||
cd ~/client_nbx_ws | ||
|
||
echo -e "${WHITE}" | ||
|
||
# build workspace | ||
colcon build --symlink-install | ||
|
||
echo "source ~/client_nbx_ws/install/setup.bash" >> ~/.bashrc | ||
|
||
echo "Setting CycloneDDS as the Middleware" | ||
|
||
echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc | ||
|
||
echo "Installation successful !!!" | ||
|
||
exit 0 |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,164 @@ | ||
#!/bin/bash | ||
|
||
# exit if any command below fails | ||
set -e | ||
|
||
# create folders | ||
mkdir -p ~/.config/autostart/ | ||
|
||
# copy files | ||
cp ../generic/ROS-Neobotix-Autostart.desktop ~/.config/autostart/ | ||
cp ../generic/startROS.desktop ~/Desktop/ | ||
|
||
# Check if ROS is sourced | ||
|
||
if [ "$ROS_DISTRO" == "" ]; | ||
then | ||
echo "Installation cannot continue. No ROS sourced, please check if ROS is installed and sourced. Please try again after that!" | ||
exit 0 | ||
fi | ||
|
||
echo "Welcome to the setup of your MP robot, please select the dependencies that are required for your robot" | ||
|
||
uni_ans="" | ||
phi_ans="" | ||
realsense_ans="" | ||
skip_depend="" | ||
arm_type=" " | ||
use_imu="False" | ||
use_d435="False" | ||
|
||
while [[ "$robot_model" != "mp_400" && "$robot_model" != "mp_500" && "$robot_model" != "mpo_500" && "$robot_model" != "mpo_700" ]]; do | ||
echo "Choose your robot (mp_400/mp_500/mpo_500/mpo_700)" | ||
read robot_model | ||
if [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]]; then | ||
echo "neo_kinematics_differential2 package will be cloned" | ||
elif [ "$robot_model" == "mpo_500" ]; then | ||
echo "neo_kinematics_mecanum2 package will be cloned" | ||
elif [ "$robot_model" == "mpo_700" ]; then | ||
echo "neo_kinematics_omnidrive2 package will be cloned" | ||
else | ||
echo "Wrong option - Please try again" | ||
fi | ||
done | ||
|
||
if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then | ||
while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do | ||
echo "Universal robots ? (y/n)" | ||
read uni_ans | ||
if [ "$uni_ans" == "n" ]; then | ||
skip_depend+="ur_client_library ur_msgs ur_description ur_robot_driver " | ||
elif [ "$uni_ans" == "y" ]; then | ||
echo "Universal robots dependencies will be installed and added to autstart" | ||
while [[ "$arm_type" != "ur10" && "$arm_type" != "ur10e" && "$arm_type" != "ur5" && "$arm_type" != "ur5e" ]]; do | ||
echo "arm_type? (ur10/ur10e/ur5/ur5e)" | ||
read arm_type | ||
done | ||
else | ||
echo "Wrong option - Please try again" | ||
fi | ||
done | ||
fi | ||
|
||
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" | ||
use_imu="False" | ||
elif [ "$phi_ans" == "y" ]; then | ||
echo "Phidget IMU dependencies will be installed and added to autstart" | ||
use_imu="True" | ||
else | ||
echo "Wrong option - Please try again" | ||
fi | ||
done | ||
|
||
while [[ "$realsense_ans" != "y" && "$realsense_ans" != "n" ]]; do | ||
echo "Realsense Camera (URDF only supports D435i) ? (y/n)" | ||
read realsense_ans | ||
if [ "$realsense_ans" == "n" ]; then | ||
skip_depend+="realsense2_camera realsense2_camera_msgs realsense2_description" | ||
use_d435="False" | ||
elif [ "$realsense_ans" == "y" ]; then | ||
echo "Realsense camera dependencies will be installed and added to autstart" | ||
use_d435="True" | ||
else | ||
echo "Wrong option - Please try again" | ||
fi | ||
done | ||
|
||
echo "Performing rosdep initialization and update" | ||
sudo rosdep init || { true; echo -e "${YELLOW} rosdep init is not required"; } | ||
rosdep update | ||
|
||
# Install build tool | ||
echo "Installing colcon extensions" | ||
sudo apt install python3-colcon-common-extensions | ||
|
||
# Installing CycloneDDS | ||
echo "Installing CycloneDDS" | ||
sudo apt install ros-$ROS_DISTRO-cyclonedds | ||
|
||
#Install xterm - useful when | ||
sudo apt install xterm | ||
|
||
cd ~ | ||
|
||
mkdir -p ros2_workspace/src | ||
cd ros2_workspace/src | ||
|
||
# clone git repos here... | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git | ||
git clone --branch master https://github.com/neobotix/neo_common2 | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_relayboard_v2-2 | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_sick_s300-2 | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_teleop2 | ||
git clone --branch master https://github.com/neobotix/neo_msgs2 | ||
git clone --branch master https://github.com/neobotix/neo_srvs2 | ||
git clone https://github.com/neobotix/joystick_drivers.git | ||
|
||
if [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]]; then | ||
git clone --branch main https://github.com/neobotix/neo_kinematics_differential2.git | ||
elif [ "$robot_model" == "mpo_500" ]; then | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_kinematics_mecanum2.git | ||
elif [ "$robot_model" == "mpo_700" ]; then | ||
git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_kinematics_omnidrive2.git | ||
fi | ||
|
||
if [ "$uni_ans" == "y" ]; then | ||
git clone --branch main https://github.com/neobotix/neo_mpo_moveit2.git | ||
fi | ||
|
||
# build workspace | ||
cd .. | ||
|
||
echo "Installing dependencies, skipping the following" $skip_depend | ||
# Install relevant dependencies | ||
rosdep install --from-paths ./src --ignore-src --rosdistro $ROS_DISTRO -r -y --skip-keys "$skip_depend" | ||
|
||
colcon build --symlink-install | ||
|
||
echo "export LC_NUMERIC="en_US.UTF-8" " >> ~/.bashrc | ||
|
||
echo "source ~/ros2_workspace/install/setup.bash" >> ~/.bashrc | ||
|
||
echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc | ||
|
||
echo "Setting up startup scripts" | ||
|
||
echo "source ~/ros2_workspace/install/setup.bash" >> ROS_AUTOSTART.sh | ||
|
||
echo "sleep 2" >> ROS_AUTOSTART.sh | ||
|
||
echo "ros2 launch neo_"$robot_model"-2 bringup.launch.py arm_type:="$arm_type" use_imu:="$use_imu" use_d435:="$use_d435>> ROS_AUTOSTART.sh | ||
|
||
chmod +x ROS_AUTOSTART.sh | ||
|
||
mv ROS_AUTOSTART.sh ~/ | ||
|
||
echo "Installation successful !!!" | ||
|
||
exit 0 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.