From def9ca06defbbc9586cd5244b346d1b3129acb53 Mon Sep 17 00:00:00 2001 From: Fujun Ruan <85526629+Flowerst-0416@users.noreply.github.com> Date: Wed, 30 Nov 2022 19:10:39 -0500 Subject: [PATCH 1/2] add install scrip & change readme --- README.md | 52 ++++------------------------------- install | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 46 deletions(-) create mode 100644 install diff --git a/README.md b/README.md index 5b5089b..269c309 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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) diff --git a/install b/install new file mode 100644 index 0000000..550d629 --- /dev/null +++ b/install @@ -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 + + + + From 68513fd09fd9d1a5308f203b339d3456d4b6a6cd Mon Sep 17 00:00:00 2001 From: Fujun Ruan <85526629+Flowerst-0416@users.noreply.github.com> Date: Wed, 30 Nov 2022 19:15:28 -0500 Subject: [PATCH 2/2] readme_update --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 269c309..c85a3eb 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ This repo combines camera intrinsics, hand-eye and camera-laser extrinsic calibr ## 0. Installation ### 0.1 Environment -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. +- 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) @@ -24,7 +24,7 @@ Follow instructions in 0.3 to install other dependencies ### 0.3 Build Calibration Workspace -Download the install download scrip in the repo +Download the [install](https://github.com/Flowerst-0416/UR_arm_camera_calibration/blob/main/install) download scrip in the repo To run the script,