Requires Ubuntu 20.04 running ROS Noetic
Run:
sudo snap install --classic codesudo apt install ros-noetic-catkinsudo apt install python3-catkin-toolssudo apt install python3-wstoolsudo apt install ros-noetic-moveitsudo apt install ros-noetic-trac-ik-kinematics-pluginsudo apt install ros-noetic-moveit-kinematicssudo apt install ros-noetic-position-controllerssudo apt install ros-noetic-effort-controllerssudo apt install ros-noetic-joint-trajectory-controllersudo apt install ros-noetic-xacrosudo apt-get install ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-controlsudo apt install python3-pipsudo apt install ros-noetic-object-recognition-msgssudo apt install ros-noetic-realsense2-camerasudo apt install ros-noetic-realsense2-descriptionsudo pip install squaternionsudo pip install pyrealsense2sudo pip install opencv-pythonsudo pip install numpysudo pip install ultralytics- Install the NVIDIA driver:
sudo apt install nvidia-driver-495-
Reboot the system so the new driver takes effect.
-
Now, download the CUDA 11.5.0 .run file from NVIDIA:
wget https://developer.download.nvidia.com/compute/cuda/11.5.0/local_installers/cuda_11.5.0_495.29.05_linux.run- Run the .run file as sudo:
sudo sh ./cuda_11.5.0_495.29.05_linux.run- If you get the following, just choose Continue:
- Accept the EULA:
- Unselect the video driver by pressing the spacebar while [X] Driver is highlighted:
-
Then press the down arrow to Install. Press Enter then wait for installation to complete.
-
After the installation is complete add the following to the bottom of your ~/.profile or add it to the /etc/profile.d/cuda.sh file which you might have to create for all users (global):
# set PATH for cuda 11.5 installation
if [ -d "/usr/local/cuda-11.5/bin/" ]; then
export PATH=/usr/local/cuda-11.5/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.5/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fiAdd the Repo:
NOTE: The 20.04 repo from NVIDIA does not supply libcudnn but the 18.04 repo does and installs just fine into 20.04.
echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda_learn.list- Install the key:
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub- Update the system:
sudo apt update- Install libcudnn 8.0.4:
sudo apt install libcudnn8I recommend now to reboot the system for the changes to take effect.
- After it reboots check the installations:
- Clone the GIT rep:
cd <CATKIN_WS_NAME>/src
git clone <GIT_URL>- Set up credential helper:
git config credential.helper store- Username for 'https://github.com':
mifoodrobot- Password for 'https://mifood@github.com':
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- Source the setup.bash of the workspace by default:
echo "source ~/<CATKIN_WS_NAME>/devel/setup.bash" >> ~/.bashrc- Add "export DOBOT_TYPE=nova5" to ~/.bashrc file:
echo "export DOBOT_TYPE=nova5" >> ~/.bashrc- Add "export MOBILE_PLATFORM=" to ~/.bashrc file (types: panther, hunter):
echo "export MOBILE_PLATFORM=<TYPE>" >> ~/.bashrc- Add "export CAMERA_POSITION=<MOUNTING_POSITION>" to ~/.bashrc file (mounting positions: arm, platform):
echo "export CAMERA_POSITION=<MOUNTING_POSITION>" >> ~/.bashrc- Build the CATKIN workspace:
cd ~/<CATKIN_WS_NAME>
catkin_makeRun:
roslaunch dobot_control simulation.launchroslaunch dobot_moveit moveit.launchrosrun dobot_control pick_strawberry.pyrosrun realsense_cv realsense_subscriber.pyNOTE: The scripts must be ran in that order due to subscriber connections.