Skip to content

Commit

Permalink
add install scrip & change readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowerst-0416 authored Dec 1, 2022
1 parent a332871 commit def9ca0
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 46 deletions.
52 changes: 6 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ 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)
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 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 def9ca0

Please sign in to comment.