This package contains two ROS workspace one is for depthai capture and calibration node and another is for Interbotix ViperX 300 Robot Arm 6DOF (KIT-VIPX300-6DOF) arm bot control using moveit.
This repository contains the charuco board used in this calibration setup.
The reason for two workspace is because we need python3 for depthai and python2 for interbotix moveit interface provided by interbotix here.
Follow the video here till 30 min. and then pip install depthai.
- Install ROS melodic from here
- install dependencies →
sudo apt install git cmake python-pip python3-pip
- install python virual env using
sudo pip install virtualenv
- Go to home directory
cd ~
- Clone the repo
git clone https://github.com/luxonis/Factory-calibration-DepthAI.git
- Init the submodules
git submodule update --init --recursive
- Go to python_ws directory
cd ~/Factory-calibration-DepthAI/python3_ws
- Create a virtual environment using
virtualenv py3venv --python=python3
- Activate the virutalenv using
source py3venv/bin/activate
- Go to the repository main directory
cd ~/Factory-calibration-DepthAI
- Install the libraries in virtual env using
python -m pip install -r requirements.txt
- Go back to python3_ws workspace
cd ~/Factory-calibration-DepthAI/python3_ws
- Build the calibration package using
catkin_make
- Add the ros package sourcing to .bashrc
echo "source ~/Factory-calibration-DepthAI/python3_ws/devel/setup.bash" >> ~/.bashrc
- USB rules for Movidius
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
- Reload the usb rules
sudo udevadm control --reload-rules && udevadm trigger
- Install the image viewer
sudo apt install ros-melodic-rqt-image-view
- Open a new terminal
- Install rosdep
sudo apt install python-rosdep2
- Open interbotix_ws workspace
cd ~/Factory-calibration-DepthAI/interbotix_ws
- Initialize rosdep using
sudo rosdep init
- Build the project using
catkin_make
(will throw errors thats fine) rosdep update
updates the required dependencies- Install the missing dependencies using
rosdep install --from-paths src --ignore-src -r -y
- Build the package again.
catkin_make
- Installing python dependency not declared in package.xml
python -m pip install rospkg pygame
- Add pacakage paths to
echo "source ~/Factory-calibration-DepthAI/interbotix_ws/devel/setup.bash" >> ~/.bashrc
- Load usb rules
sudo cp src/interbotix_sdk/10-interbotix-udev.rules /etc/udev/rules.d
- Reload the usb rules
sudo udevadm control --reload-rules && udevadm trigger
- Open two terminals say #1 and #2
- In #1 start virtual env using
source ~/Factory-calibration-DepthAI/python3_ws/py3venv/bin/activate
- In #1 start calibration node using
roslaunch calibration depthai_calib.launch brd:=bw1098obc
(change the board name and add the config file if it is not available) - In #2 use the following command to launch the arm
roslaunch interbotix_moveit_interface moveit_interface.launch robot_name:=vx300s use_actual:=true dof:=6
- Alternative to step 4. An Applications icon called
arm node
has been created during build which can also be used to launch the arm. usecatkin_make install
ininterbotix_ws
to enable this.
Running calibration without arm Robot(Not Recommended. Please use the python script here).
- Open three terminals say #1, #2 and #3
- In #1 start virtual env using
source ~/Factory-calibration-DepthAI/python3_ws/py3venv/bin/activate
- In #1 start calibration node using
roslaunch calibration depthai_calib.launch brd:=bw1098obc
- Select the CCM in the window. (This is a local logging selection window and doesn't affect the calibration in any way as of now but needed to proceed.)
- Run all the following commands in #3 terminal
- Run
rosservice call /device_status "name: ''"
first to check connection and make window available. - In #2 (if using rgb_calibration branc) start rqt visualization
rqt_image_view
(at the top right corner of the window selectcolor
) - Run
rosservice call /capture_checkerboard "name: 'right_1'"
execute this command to capture image when in position. (need to run this for different positon and while doing so change the name in the command.) And while doing so check the window created by #2 terminal to see if the image is sharp and not out of focus. - After capturing 6+ sharp images in different position execute the following command to calibrate and write to eeprom.
rosservice call /calibrate_stereo "name: 'charuco'"
- Alternative to step 4. An Applications icon called
arm node
has been created during build which can also be used to launch the arm.
- Interbotix ViperX 300 Robot Arm 6DOF (KIT-VIPX300-6DOF): $5,000
- Intel NUC 8 (NUC8i5BEH): $300
- Corsair Memory Kit 16GB ((2x8GB) DDR4 2400MHz SODIMM Memory): $75
- Samsung 970 EVO Plus SSD 500GB (MZ-V7S500B/AM): $90
- 4-Port USB 3.0 Hub (HB-UM43): $11 (The USB Hub allows shorter cable to be plugged in on-arm.)
TOTAL: $5,476