J87 / justin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running instructions

Prequisites

Requires Ubuntu 20.04 running ROS Noetic

Install Package Dependencies

Run:

sudo snap install --classic code
sudo apt install ros-noetic-catkin
sudo apt install python3-catkin-tools
sudo apt install python3-wstool
sudo apt install ros-noetic-moveit
sudo apt install ros-noetic-trac-ik-kinematics-plugin
sudo apt install ros-noetic-moveit-kinematics
sudo apt install ros-noetic-position-controllers
sudo apt install ros-noetic-effort-controllers
sudo apt install ros-noetic-joint-trajectory-controller
sudo apt install python3-pip
sudo apt install ros-noetic-object-recognition-msgs
sudo apt install ros-noetic-realsense2-camera
sudo apt install ros-noetic-realsense2-description
sudo pip install squaternion
sudo pip install pyrealsense2
sudo pip install opencv-python
sudo pip install numpy

Install CUDA

  • 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}}
fi

Install libcudnn8

Add 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 libcudnn8

I recommend now to reboot the system for the changes to take effect.

  • After it reboots check the installations:

Setup

  • Clone the GIT rep:
cd <CATKIN_WS_NAME>/src
git clone <GIT_URL>
  • Set up credential helper:
git config credential.helper store
mifoodrobot
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
  • Source the setup.bash of the workspace by default:
source ~/<CATKIN_WS_NAME>/devel/setup.bash
  • Add "export DOBOT_TYPE=nova5" to ~/.bashrc file:
echo "export DOBOT_TYPE=nova5" >> ~/.bashrc
  • Make python scripts executable:
cd ~/<CATKIN_WS_NAME>/src/MiFood/HarvestingRobot/src/dobot_control/src
sudo chmod +x pick_strawberry.py
  • Load header files via VS Code:
code
  • Open CATKIN workspace source folder in VS Code and with CTRL+P search for dh_gripper_Test.cpp

  • Build the CATKIN workspace:

cd ~/<CATKIN_WS_NAME>
catkin_make

Running The Simulation

Run:

roslaunch dobot_control simulation.launch
roslaunch dobot_moveit moveit.launch
rosrun dobot_control pick_strawberry.py

NOTE: The scripts must be ran in that order due to subscriber connections.

About


Languages

Language:C++ 34.8%Language:Makefile 29.2%Language:CMake 11.9%Language:Python 9.9%Language:Common Lisp 8.3%Language:JavaScript 2.9%Language:C 1.6%Language:Shell 1.3%Language:Starlark 0.0%Language:Jinja 0.0%Language:Dockerfile 0.0%Language:HTML 0.0%Language:Meson 0.0%Language:Cuda 0.0%Language:Swift 0.0%Language:CSS 0.0%