Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…_calibration into main
  • Loading branch information
archit2604 committed Dec 1, 2022
2 parents 069e6ec + 68513fd commit 6baad43
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 47 deletions.
54 changes: 7 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ This repo combines camera intrinsics, hand-eye and camera-laser extrinsic calibr

## 0. Installation
### 0.1 Environment
Use Ubuntu 18.04/20.04 with ROS [Melodic](http://wiki.ros.org/melodic/Installation/Ubuntu) / [Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu).
- Ubuntu 18.04 with ROS [Melodic](http://wiki.ros.org/melodic/Installation/Ubuntu). Comes with Python 2.7 and OpenCV 3.2
- Ubuntu 20.04 with ROS [Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu). Comes with Python 3.8 and OpenCV 4.2.
### 0.2 Dependencies
1. [blaser_ros Melodic](https://github.com/biorobotics/blaser_mapping/tree/master/blaser_ros) / [blaser_ros Noetic](https://github.com/biorobotics/blaser_mapping/tree/tina/add-ubuntu20-compatibility/blaser_ros)
2. ximea_ros_cam (Install with the Blaser Dependencies)
3. [Universal_Robots_ROS_Driver
](https://github.com/UniversalRobots/Universal_Robots_ROS_Driver)
4. MoveIt Melodic [Tutorials]](http://docs.ros.org/en/melodic/api/moveit_tutorials/html/index.html)
4. MoveIt Melodic [Tutorials](http://docs.ros.org/en/melodic/api/moveit_tutorials/html/index.html)
/ MoveIt Noetic [Tutorials](https://ros-planning.github.io/moveit_tutorials/)
5. [apriltag_ros
](https://github.com/AprilRobotics/apriltag_ros)
Expand All @@ -23,54 +24,13 @@ Follow instructions in 0.3 to install other dependencies

### 0.3 Build Calibration Workspace

- ximea_ros_cam
Download the [install](https://github.com/Flowerst-0416/UR_arm_camera_calibration/blob/main/install) download scrip in the repo

```shell
cd ~
mkdir -p ~/calibration_ws/src
cd ~/calibration_ws/src
git clone https://github.com/wavelab/ximea_ros_cam.git
```

- camera_model

Download the folder from this [link](https://drive.google.com/drive/folders/1xBam90TTU8bbKEM8wfbRfDEYF7RcXm7B?usp=sharing), and place it in `~/calibration_ws/src`.

- apriltag
```shell
cd ~/calibration_ws/src
git clone https://github.com/AprilRobotics/apriltag.git
```

- Build the workspace

```shell
cd ~/calibration_ws
catkin build
```

- Install MoveIt and UR Drivers for MoveIt

```shell
cd ~/calibration_ws/src
mkdir ~/calibration_ws/src/src
cd ~/calibration_ws/src/src
git clone -b boost https://github.com/UniversalRobots/Universal_Robots_Client_Library.git src/Universal_Robots_Client_Library
git clone https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver
git clone -b calibration_devel https://github.com/fmauch/universal_robot.git src/fmauch_universal_robot
sudo apt update -qq
rosdep update
rosdep install --from-paths src --ignore-src -y
cd ~/calibration_ws
catkin build
```

- Install this calibration repo
To run the script,

```shell
cd ~/calibration_ws/src
git clone https://github.com/biorobotics/UR_arm_camera_calibration.git
catkin build
chmod +x install
./install
```

catkin build several time (mostly three)
Expand Down
82 changes: 82 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/usr/bin/env bash

## Install script for mutil calibration tool box
BLASER_DEPENDENCIES=$HOME/blaser_dependencies
###

mkdir -p $HOME/Calibration_ws/src
mkdir -p $HOME/blaser_dependencies

# Check ROS version and install Python libraries
if [[ $ROS_DISTRO == 'melodic'* ]]; then
sudo apt-get install -y python-matplotlib python-numpy
elif [[ $ROS_DISTRO == 'noetic'* ]]; then
sudo apt-get install -y python3-matplotlib python3-numpy
else
echo "[ERROR] Unsupported ROS version '${ROS_DISTRO}'"
exit 1
fi

# Install dependencies
# https://github.com/tbeu/matio
cd $BLASER_DEPENDENCIES
git clone git://git.code.sf.net/p/matio/matio
cd matio
./autogen.sh
./configure
make
sudo make install

# Install Ceres Solver 1.14
# http://ceres-solver.org/installation.html
cd $BLASER_DEPENDENCIES
wget http://ceres-solver.org/ceres-solver-1.14.0.tar.gz
sudo apt-get install -y libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev
tar zxf ceres-solver-1.14.0.tar.gz
mkdir ceres-bin
cd ceres-bin
cmake ../ceres-solver-1.14.0
make -j8
sudo make install

# Install XIMEA camera Linux software package
# https://www.ximea.com/support/wiki/apis/XIMEA_Linux_Software_Package
cd $BLASER_DEPENDENCIES
wget https://www.ximea.com/downloads/recent/XIMEA_Linux_SP.tgz
tar xzf XIMEA_Linux_SP.tgz
mv package ximea_linux_sp
cd ximea_linux_sp
sudo ./install

## build UR5 robot driver & MOVEIT
mkdir $HOME/Calibration_ws/src/src
cd $HOME/Calibration_ws/src/src
git clone -b boost https://github.com/UniversalRobots/Universal_Robots_Client_Library.git src/Universal_Robots_Client_Library
git clone https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver
git clone -b calibration_devel https://github.com/fmauch/universal_robot.git src/fmauch_universal_robot
sudo apt update -qq
rosdep update
rosdep install --from-paths src --ignore-src -y
cd $HOME/Calibration_ws
catkin build


## build Calibration_ws(ximea_ros_cam & apriltag_ros)
cd $HOME/Calibration_ws/src
git clone https://github.com/Flowerst-0416/UR_arm_camera_calibration.git
git clone https://github.com/wavelab/ximea_ros_cam.git
git clone https://github.com/AprilRobotics/apriltag.git
cd $HOME/Calibration_ws
catkin build

##########################################
# Enable high speed USB and USB permission
sudo adduser $USER dialout
# if file /etc/rc.local already exists
echo 'echo 0 > /sys/module/usbcore/parameters/usbfs_memory_mb' | sudo tee -a /etc/rc.local
# if file /etc/rc.local does not exist
printf '%s\n' '#!/bin/bash' 'echo 0 > /sys/module/usbcore/parameters/usbfs_memory_mb' | sudo tee /etc/rc.local; sudo chmod +x /etc/rc.local




0 comments on commit 6baad43

Please sign in to comment.